bencoding 0.4.1.0 → 0.4.2.0
raw patch · 3 files changed
+16/−2 lines, 3 files
Files
- ChangeLog +6/−0
- bencoding.cabal +2/−2
- src/Data/BEncode.hs +8/−0
ChangeLog view
@@ -1,3 +1,9 @@+2013-12-14 Sam Truzjan <pxqr.sta@gmail.com>++ * 0.4.2.0: Override default fixity for operators: previously it+ has been impossible to mix bencode Get operators ((<$>!), (<$>?),+ (<*>!), (<*>?)) with applicative operators ((<$>), (<*>)).+ 2013-12-08 Sam Truzjan <pxqr.sta@gmail.com> * 0.4.1.0: Expose parser and builder so it is possible to use
bencoding.cabal view
@@ -1,5 +1,5 @@ name: bencoding-version: 0.4.1.0+version: 0.4.2.0 license: BSD3 license-file: LICENSE author: Sam Truzjan@@ -29,7 +29,7 @@ type: git location: git://github.com/cobit/bencoding.git branch: master- tag: v0.4.1.0+ tag: v0.4.2.0 library default-language: Haskell2010
src/Data/BEncode.hs view
@@ -683,20 +683,28 @@ f <$>! k = f <$> field (req k) {-# INLINE (<$>!) #-} +infixl 4 <$>!+ -- | Shorthand for /f <$> optional (field (req k))/. (<$>?) :: BEncode a => (Maybe a -> b) -> BKey -> Get b f <$>? k = f <$> optional (field (req k)) {-# INLINE (<$>?) #-} +infixl 4 <$>?+ -- | Shorthand for /f <*> field (req k)/. (<*>!) :: BEncode a => Get (a -> b) -> BKey -> Get b f <*>! k = f <*> field (req k) {-# INLINE (<*>!) #-} +infixl 4 <*>!+ -- | Shorthand for /f <*> optional (field (req k))/. (<*>?) :: BEncode a => Get (Maybe a -> b) -> BKey -> Get b f <*>? k = f <*> optional (field (req k)) {-# INLINE (<*>?) #-}++infixl 4 <*>? -- | Run a 'Get' monad. fromDict :: forall a. Typeable a => Get a -> BValue -> Result a