Safe Haskell | Safe-Infered |
---|
- rangeLettersToSymbols :: Char -> Bool
- rangeLetters :: Char -> Bool
- rangeMathCurrency :: Char -> Bool
- rangeSymbols :: Char -> Bool
- rangeLettersNumbers :: Char -> Bool
- lexeme :: Parser a -> Parser a
- eol :: Parser ()
- spaces :: Parser ()
- checkText :: HasText a => NonEmpty (Char -> Bool, b) -> a -> Maybe b
- listIsOK :: HasTextNonEmptyList a => (Char -> Bool) -> a -> Bool
- firstCharOfListIsOK :: HasTextNonEmptyList a => (Char -> Bool) -> a -> Bool
- renMaybe :: Maybe a -> (a -> Maybe Text) -> Maybe Text
- txtWords :: [Text] -> Text
Documentation
rangeLetters :: Char -> BoolSource
rangeMathCurrency :: Char -> BoolSource
rangeSymbols :: Char -> BoolSource
lexeme :: Parser a -> Parser aSource
Creates a new parser that behaves like the old one, but also parses any whitespace remaining afterward.
Parses any trailing whitespace followed by a newline followed by additional whitespace.
checkText :: HasText a => NonEmpty (Char -> Bool, b) -> a -> Maybe bSource
Applied to a non-empty list of pairs, with the first element of the pair being a predicate that returns True if a character is OK and the second element being something of an arbitrary type, and to something that has a Text. The pairs must be ordered from most restrictive to least restrictive predicates. If at least one of the predicates indicates that the Text is valid, returns the leftmost b associated with that predicate. If none of the predicates indicates that the Text is valid, returns the rightmost error.
Here, most restrictive means the predicate that indicates True for the narrowest range of characters, while least restrictive means the predicate that indicates True for the widest range of characters.
:: HasTextNonEmptyList a | |
=> (Char -> Bool) | Returns True for characters that are allowed |
-> a | |
-> Bool |
:: HasTextNonEmptyList a | |
=> (Char -> Bool) | Returns True if the first character is allowed |
-> a | |
-> Bool |