PR Stanley wrote:
failure :: (Parser a) failure = \inp -> []
The code might contain some syntax errors and I'd be grateful for any corrections.

It looks right conceptually. Depending on the definition of Parser, you may need

failure = P (\inp -> [])

or whatever constructor name instead of P.

The type checker will know.

I don't know about dual parser failure.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to