@@ -129,7 +129,7 @@ many1' p = liftM2' (:) p (many' p)
129-- | @sepBy p sep@ applies /zero/ or more occurrences of @p@, separated
129-- | @sepBy p sep@ applies /zero/ or more occurrences of @p@, separated
130-- by @sep@. Returns a list of the values returned by @p@.
130-- by @sep@. Returns a list of the values returned by @p@.
132−-- > commaSep p = p `sepBy` (symbol ",")
132+-- > commaSep p = p `sepBy` (char ',')
133sepBy :: Alternative f => f a -> f s -> f [a]
133sepBy :: Alternative f => f a -> f s -> f [a]
134sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
134sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
135{-# SPECIALIZE sepBy :: Parser ByteString a -> Parser ByteString s
135{-# SPECIALIZE sepBy :: Parser ByteString a -> Parser ByteString s
@@ -141,7 +141,7 @@ sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
141-- by @sep@. Returns a list of the values returned by @p@. The value
141-- by @sep@. Returns a list of the values returned by @p@. The value
142-- returned by @p@ is forced to WHNF.
142-- returned by @p@ is forced to WHNF.
144−-- > commaSep p = p `sepBy'` (symbol ",")
144+-- > commaSep p = p `sepBy'` (char ',')
145sepBy' :: (MonadPlus m) => m a -> m s -> m [a]
145sepBy' :: (MonadPlus m) => m a -> m s -> m [a]
146sepBy' p s = scan `mplus` return []
146sepBy' p s = scan `mplus` return []
147 where scan = liftM2' (:) p ((s >> sepBy1' p s) `mplus` return [])
147 where scan = liftM2' (:) p ((s >> sepBy1' p s) `mplus` return [])
@@ -153,7 +153,7 @@ sepBy' p s = scan `mplus` return []
153-- | @sepBy1 p sep@ applies /one/ or more occurrences of @p@, separated
153-- | @sepBy1 p sep@ applies /one/ or more occurrences of @p@, separated
154-- by @sep@. Returns a list of the values returned by @p@.
154-- by @sep@. Returns a list of the values returned by @p@.
156−-- > commaSep p = p `sepBy1` (symbol ",")
156+-- > commaSep p = p `sepBy1` (char ',')
157sepBy1 :: Alternative f => f a -> f s -> f [a]
157sepBy1 :: Alternative f => f a -> f s -> f [a]
158sepBy1 p s = scan
158sepBy1 p s = scan
159 where scan = liftA2 (:) p ((s *> scan) <|> pure [])
159 where scan = liftA2 (:) p ((s *> scan) <|> pure [])
@@ -166,7 +166,7 @@ sepBy1 p s = scan
166-- by @sep@. Returns a list of the values returned by @p@. The value
166-- by @sep@. Returns a list of the values returned by @p@. The value
167-- returned by @p@ is forced to WHNF.
167-- returned by @p@ is forced to WHNF.
169−-- > commaSep p = p `sepBy1'` (symbol ",")
169+-- > commaSep p = p `sepBy1'` (char ',')
170sepBy1' :: (MonadPlus m) => m a -> m s -> m [a]
170sepBy1' :: (MonadPlus m) => m a -> m s -> m [a]
171sepBy1' p s = scan
171sepBy1' p s = scan
172 where scan = liftM2' (:) p ((s >> scan) `mplus` return [])
172 where scan = liftM2' (:) p ((s >> scan) `mplus` return [])