Text.ParserCombinators.UU.Idioms
Documentation
iI :: Idiomatic (Str Char state loc) (a -> a) g => gSource
The function iI is to be pronouunced as start
class Idiomatic st f g | g -> f st whereSource
Instances
| Idiomatic st f g => Idiomatic st ((a -> b) -> f) ((a -> b) -> g) | |
| (Idiomatic (Str Char state loc) f g, IsLocationUpdatedBy loc Char, ListLike state Char) => Idiomatic (Str Char state loc) f (Char -> g) | |
| (Idiomatic (Str Char state loc) f g, IsLocationUpdatedBy loc Char, ListLike state Char) => Idiomatic (Str Char state loc) f (String -> g) | |
| Idiomatic (Str Char state loc) x (Ii -> P (Str Char state loc) x) | |
| (Idiomatic (Str Char state loc) f g, IsLocationUpdatedBy loc Char, ListLike state Char) => Idiomatic (Str Char state loc) (a -> f) (P (Str Char state loc) a -> g) |
The idea of the Idiom concept is that sequential composition operators can be inferred from the type of the various operands
>>>run (iI (+) '(' pNatural "+" pNatural ')' Ii) "(2+3"Result: 5 Correcting steps: Inserted ')' at position LineColPos 0 4 4 expecting one of [')', Whitespace, '0'..'9']