Skip to content

Commit

Permalink
Polish docs
Browse files Browse the repository at this point in the history
- remove redundant sentence for `Aeson.decode`
- remove superfluous `the`
- remove redundant sentence for `Aeson.decodeL`
  • Loading branch information
markus1189 committed Dec 16, 2014
1 parent 55e579b commit a3d0dc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/Pipes/Aeson.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,11 @@ encodeArray = U.encode
-- 'Ae.FromJSON' instance.
--
-- Any of those steps can fail, in which case a 'I.DecodingError' will report
-- the precise error and at which the step it happened.
-- the precise error and at which step it happened.


-- | Decodes an 'Ae.Object' or 'Ae.Array' JSON value from the underlying state.
--
-- Returns either the decoded entitiy, or a 'I.DecodingError' in case of error.
--
-- It returns 'Nothing' if the underlying 'Producer' is exhausted, otherwise
-- it returns either the decoded entity or a 'I.DecodingError' in case of error.
--
Expand Down Expand Up @@ -178,4 +176,4 @@ decodedL f k p0 = fmap _encode (k (I.consecutively decode p0))
--------------------------------------------------------------------------------
-- Internal tools --------------------------------------------------------------

type Lens' s a = forall f . Functor f => (a -> f a) -> (s -> f s)
type Lens' s a = forall f . Functor f => (a -> f a) -> s -> f s
2 changes: 0 additions & 2 deletions src/Pipes/Aeson/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ consecutively parser = step where
-- | Decodes a 'Ae.FromJSON' value from the underlying state using the given
-- 'Attoparsec.Parser' in order to obtain an 'Ae.Value' first.
--
-- Returns either the decoded entitiy, or a 'I.DecodingError' in case of error.
--
-- It returns 'Nothing' if the underlying 'Producer' is exhausted, otherwise
-- it returns either the decoded entity or a 'I.DecodingError' in case of error.
decodeL
Expand Down
4 changes: 2 additions & 2 deletions src/Pipes/Aeson/Unchecked.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ encode = PB.fromLazy . Ae.encode
-- instance, not just 'Ae.Array' or 'Ae.Object'.
decode
:: (Monad m, Ae.FromJSON a)
=> Pipes.Parser B.ByteString m ((Maybe (Either I.DecodingError a))) -- ^
=> Pipes.Parser B.ByteString m (Maybe (Either I.DecodingError a)) -- ^
decode = fmap (fmap snd) `liftM` decodeL
{-# INLINABLE decode #-}

Expand Down Expand Up @@ -97,4 +97,4 @@ decodedL k p = fmap _encode (k (I.consecutively decodeL p))
--------------------------------------------------------------------------------
-- Internal tools --------------------------------------------------------------

type Lens' s a = forall f . Functor f => (a -> f a) -> (s -> f s)
type Lens' s a = forall f . Functor f => (a -> f a) -> s -> f s

0 comments on commit a3d0dc9

Please sign in to comment.