git.iko.soy/typeable/attoparsec
on master help sign in
Rename some functions.
51cdd45Bryan O'Sullivan
src/Data/ParserCombinators/ByteStringParser/Internal.hs+12−12
@@ -40,9 +40,9 @@ module Data.ParserCombinators.ByteStringParser.Internal
40
40
41 -- * Things like in @Parsec.Char@
41 -- * Things like in @Parsec.Char@
42 , satisfy
42 , satisfy
43− , anyChar
43+ , anyWord8
44− , char
44+ , word8
45− , notChar
45+ , notWord8
46 , string
46 , string
47 , stringTransform
47 , stringTransform
48
48
@@ -178,19 +178,19 @@ satisfy p =
178 Nothing -> unParser (nextChunk >> satisfy p) s
178 Nothing -> unParser (nextChunk >> satisfy p) s
179{-# INLINE satisfy #-}
179{-# INLINE satisfy #-}
180
180
181−anyChar :: Parser Word8
181+anyWord8 :: Parser Word8
182−anyChar = satisfy $ const True
182+anyWord8 = satisfy $ const True
183−{-# INLINE anyChar #-}
183+{-# INLINE anyWord8 #-}
184
184
185-- | Satisfy a specific character.
185-- | Satisfy a specific character.
186−char :: Word8 -> Parser Word8
186+word8 :: Word8 -> Parser Word8
187−char c = satisfy (== c) <?> show c
187+word8 c = satisfy (== c) <?> show c
188−{-# INLINE char #-}
188+{-# INLINE word8 #-}
189
189
190-- | Satisfy a specific character.
190-- | Satisfy a specific character.
191−notChar :: Word8 -> Parser Word8
191+notWord8 :: Word8 -> Parser Word8
192−notChar c = satisfy (/= c) <?> "not " ++ show c
192+notWord8 c = satisfy (/= c) <?> "not " ++ show c
193−{-# INLINE notChar #-}
193+{-# INLINE notWord8 #-}
194
194
195sepBy :: Parser a -> Parser s -> Parser [a]
195sepBy :: Parser a -> Parser s -> Parser [a]
196sepBy p s = liftM2 (:) p ((s >> sepBy1 p s) <|> return []) <|> return []
196sepBy p s = liftM2 (:) p ((s >> sepBy1 p s) <|> return []) <|> return []