Safe Haskell | Safe-Inferred |
---|
Home-grown parser, just because.
- data Parse a
- runParser :: Parse a -> String -> Maybe a
- char :: Char -> Parse Char
- charP :: (Char -> Bool) -> Parse Char
- string :: String -> Parse String
- oneOf :: [Parse a] -> Parse a
- possibly :: Parse a -> Parse (Maybe a)
- atLeast :: Int -> Parse a -> Parse [a]
- whitespace :: Parse String
- word :: Parse String
- words :: Parse [String]
- int :: Parse Int
- double :: Parse Double
- positiveDouble :: Parse Double
- suchThat :: Parse a -> (a -> Bool) -> Parse a
- quotedString :: Char -> Parse String
- skip :: Int -> Parse ()
- rest :: Parse String
- lookahead :: Parse a -> Parse a
- anyChar :: Parse Char
Documentation
whitespace :: Parse StringSource
Parse zero or more characters of whitespace.
Parse a non-empty word. A word is a string of at least one non-whitespace character.
positiveDouble :: Parse DoubleSource
Parse a non-negative floating point number.
quotedString :: Char -> Parse StringSource
A string quoted with the given quotation mark. Strings can contain escaped quotation marks; escape characters are stripped from the returned string.