Safe Haskell | Safe-Inferred |
---|
Some common types for parsers.
- type Subword = [Int]
- type Parser a b = Array Int a -> Subword -> [b]
- data ParserInfo
- type RichParser a b = (ParserInfo, Parser a b)
- class Parseable p a b | p -> a b where
- toParser :: p -> RichParser a b
Documentation
To support higher dimensions, a subword is a list of indices. Valid list lengths are 2n with n>0.
data ParserInfo Source
Static information about yield sizes of a parser. For supporting dimensions > 2, this type has to be expanded with more constructors, or redesigned to be generic.
Eq ParserInfo | |
Show ParserInfo | |
Parseable (RichParser a b) a b |
type RichParser a b = (ParserInfo, Parser a b)Source
class Parseable p a b | p -> a b whereSource
toParser :: p -> RichParser a bSource