[Haskell-cafe] Newbie question on Haskell type

Albert Lai trebla at vex.net
Sun Oct 16 22:57:36 EDT 2005


Huong Nguyen <hiperfume at gmail.com> writes:

> newtype Parser a = Parser(String -> [(a, String)])

[...]

> parse :: Parser a -> String -> [(a, String)]
> parse p cs = p cs
> \end{code}

Try this instead:

parse (Parser p) cs = p cs

(You forgot to deconstruct! :) )


More information about the Haskell-Cafe mailing list