[Haskell-cafe] Parsec: Where's +++?

Greg Fitzgerald garious at gmail.com
Fri Dec 1 21:49:34 EST 2006


> Text.ParserCombinators.ReadP.(+++) :: ReadP a -> ReadP a -> ReadP a

Wow, fast and complete, Thanks Don!    :)

Would it make sense to derive instances of Applicable and Alternative
for ReadP?  Something like this maybe:

instance Applicative ReadP where
	pure = return
	(<*>) = ap

instance Alternative ReadP where
	empty = pfail
	(<|>) = (<++)

Thanks,
Greg


More information about the Haskell-Cafe mailing list