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
To support higher dimensions, a subword is a list of indices. Valid list lengths are 2n with n>0.
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.