git.iko.soy/typeable/attoparsec
on master help sign in
Rename some functions.
commit51cdd453438fc84d3048935eb2facc53f969ce08 authorBryan O'Sullivan <bos@serpentine.com> dateSat 26 Jan 2008, 21:15 (19 years ago) parent104bfe5
1 file changed+12−12
src/Data/ParserCombinators/ByteStringParser/Internal.hs+12−12
src/Data/ParserCombinators/ByteStringParser/Internal.hs+12−12
@@ -40,9 +40,9 @@ module Data.ParserCombinators.ByteStringParser.Internal
4040
4141 -- * Things like in @Parsec.Char@
4242 , satisfy
43− , anyChar
44− , char
45− , notChar
43+ , anyWord8
44+ , word8
45+ , notWord8
4646 , string
4747 , stringTransform
4848
@@ -178,19 +178,19 @@ satisfy p =
178178 Nothing -> unParser (nextChunk >> satisfy p) s
179179{-# INLINE satisfy #-}
180180
181−anyChar :: Parser Word8
182−anyChar = satisfy $ const True
183−{-# INLINE anyChar #-}
181+anyWord8 :: Parser Word8
182+anyWord8 = satisfy $ const True
183+{-# INLINE anyWord8 #-}
184184
185185-- | Satisfy a specific character.
186−char :: Word8 -> Parser Word8
187−char c = satisfy (== c) <?> show c
188−{-# INLINE char #-}
186+word8 :: Word8 -> Parser Word8
187+word8 c = satisfy (== c) <?> show c
188+{-# INLINE word8 #-}
189189
190190-- | Satisfy a specific character.
191−notChar :: Word8 -> Parser Word8
192−notChar c = satisfy (/= c) <?> "not " ++ show c
193−{-# INLINE notChar #-}
191+notWord8 :: Word8 -> Parser Word8
192+notWord8 c = satisfy (/= c) <?> "not " ++ show c
193+{-# INLINE notWord8 #-}
194194
195195sepBy :: Parser a -> Parser s -> Parser [a]
196196sepBy p s = liftM2 (:) p ((s >> sepBy1 p s) <|> return []) <|> return []