git.iko.soy/typeable/attoparsec
on master help sign in
Merge
commit8134fccc72a4aac938e422589c526b220c06bac2 authorBryan O'Sullivan <bos@serpentine.com> dateTue 17 Feb 2015, 22:47 (12 years ago) parent752c7196e76e7f
2 files changed+6−6
Data/Attoparsec/Combinator.hs+4−4 Data/Attoparsec/Internal/Types.hs+2−2
Data/Attoparsec/Combinator.hs+4−4
@@ -132,7 +132,7 @@ many1' p = liftM2' (:) p (many' p)
132132-- | @sepBy p sep@ applies /zero/ or more occurrences of @p@, separated
133133-- by @sep@. Returns a list of the values returned by @p@.
134134--
135−-- > commaSep p = p `sepBy` (symbol ",")
135+-- > commaSep p = p `sepBy` (char ',')
136136sepBy :: Alternative f => f a -> f s -> f [a]
137137sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
138138{-# SPECIALIZE sepBy :: Parser ByteString a -> Parser ByteString s
@@ -144,7 +144,7 @@ sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
144144-- by @sep@. Returns a list of the values returned by @p@. The value
145145-- returned by @p@ is forced to WHNF.
146146--
147−-- > commaSep p = p `sepBy'` (symbol ",")
147+-- > commaSep p = p `sepBy'` (char ',')
148148sepBy' :: (MonadPlus m) => m a -> m s -> m [a]
149149sepBy' p s = scan `mplus` return []
150150 where scan = liftM2' (:) p ((s >> sepBy1' p s) `mplus` return [])
@@ -156,7 +156,7 @@ sepBy' p s = scan `mplus` return []
156156-- | @sepBy1 p sep@ applies /one/ or more occurrences of @p@, separated
157157-- by @sep@. Returns a list of the values returned by @p@.
158158--
159−-- > commaSep p = p `sepBy1` (symbol ",")
159+-- > commaSep p = p `sepBy1` (char ',')
160160sepBy1 :: Alternative f => f a -> f s -> f [a]
161161sepBy1 p s = scan
162162 where scan = liftA2 (:) p ((s *> scan) <|> pure [])
@@ -169,7 +169,7 @@ sepBy1 p s = scan
169169-- by @sep@. Returns a list of the values returned by @p@. The value
170170-- returned by @p@ is forced to WHNF.
171171--
172−-- > commaSep p = p `sepBy1'` (symbol ",")
172+-- > commaSep p = p `sepBy1'` (char ',')
173173sepBy1' :: (MonadPlus m) => m a -> m s -> m [a]
174174sepBy1' p s = scan
175175 where scan = liftM2' (:) p ((s >> scan) `mplus` return [])
Data/Attoparsec/Internal/Types.hs+2−2
@@ -86,8 +86,8 @@ instance Functor (IResult i) where
8686 fmap f (Partial k) = Partial (fmap f . k)
8787 fmap f (Done t r) = Done t (f r)
8888
89−-- | The core parser type. This is parameterised over the types @i@
90−-- of string being processed and @t@ of internal state representation.
89+-- | The core parser type. This is parameterised over the type @i@
90+-- of string being processed.
9191--
9292-- This type is an instance of the following classes:
9393--