fmap f p = Parser ((.) (fmapEither (fmap1st f)) (runParser p)); fmapEither f e = case e of { Left x -> Left x; Right x -> Right (f x) }; fmap1st f p = case p of { (l, r) -> (f l, r) }; runParser p = case p of { Parser g -> g }; (.) f g x = f (g x); id x = x; v = fmap id (Parser g); x = fmap ((.) f g) (Parser g); y = ((.) (fmap f) (fmap g)) (Parser g);