@@ -132,7 +132,7 @@ many1' p = liftM2' (:) p (many' p)
132-- | @sepBy p sep@ applies /zero/ or more occurrences of @p@, separated
132-- | @sepBy p sep@ applies /zero/ or more occurrences of @p@, separated
133-- by @sep@. Returns a list of the values returned by @p@.
133-- by @sep@. Returns a list of the values returned by @p@.
135−-- > commaSep p = p `sepBy` (symbol ",")
135+-- > commaSep p = p `sepBy` (char ',')
136sepBy :: Alternative f => f a -> f s -> f [a]
136sepBy :: Alternative f => f a -> f s -> f [a]
137sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
137sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
138{-# SPECIALIZE sepBy :: Parser ByteString a -> Parser ByteString s
138{-# SPECIALIZE sepBy :: Parser ByteString a -> Parser ByteString s
@@ -144,7 +144,7 @@ sepBy p s = liftA2 (:) p ((s *> sepBy1 p s) <|> pure []) <|> pure []
144-- by @sep@. Returns a list of the values returned by @p@. The value
144-- by @sep@. Returns a list of the values returned by @p@. The value
145-- returned by @p@ is forced to WHNF.
145-- returned by @p@ is forced to WHNF.
147−-- > commaSep p = p `sepBy'` (symbol ",")
147+-- > commaSep p = p `sepBy'` (char ',')
148sepBy' :: (MonadPlus m) => m a -> m s -> m [a]
148sepBy' :: (MonadPlus m) => m a -> m s -> m [a]
149sepBy' p s = scan `mplus` return []
149sepBy' p s = scan `mplus` return []
150 where scan = liftM2' (:) p ((s >> sepBy1' p s) `mplus` return [])
150 where scan = liftM2' (:) p ((s >> sepBy1' p s) `mplus` return [])
@@ -156,7 +156,7 @@ sepBy' p s = scan `mplus` return []
156-- | @sepBy1 p sep@ applies /one/ or more occurrences of @p@, separated
156-- | @sepBy1 p sep@ applies /one/ or more occurrences of @p@, separated
157-- by @sep@. Returns a list of the values returned by @p@.
157-- by @sep@. Returns a list of the values returned by @p@.
159−-- > commaSep p = p `sepBy1` (symbol ",")
159+-- > commaSep p = p `sepBy1` (char ',')
160sepBy1 :: Alternative f => f a -> f s -> f [a]
160sepBy1 :: Alternative f => f a -> f s -> f [a]
161sepBy1 p s = scan
161sepBy1 p s = scan
162 where scan = liftA2 (:) p ((s *> scan) <|> pure [])
162 where scan = liftA2 (:) p ((s *> scan) <|> pure [])
@@ -169,7 +169,7 @@ sepBy1 p s = scan
169-- by @sep@. Returns a list of the values returned by @p@. The value
169-- by @sep@. Returns a list of the values returned by @p@. The value
170-- returned by @p@ is forced to WHNF.
170-- returned by @p@ is forced to WHNF.
172−-- > commaSep p = p `sepBy1'` (symbol ",")
172+-- > commaSep p = p `sepBy1'` (char ',')
173sepBy1' :: (MonadPlus m) => m a -> m s -> m [a]
173sepBy1' :: (MonadPlus m) => m a -> m s -> m [a]
174sepBy1' p s = scan
174sepBy1' p s = scan
175 where scan = liftM2' (:) p ((s >> scan) `mplus` return [])
175 where scan = liftM2' (:) p ((s >> scan) `mplus` return [])