Jed Brown writes:
On 13 Jan 2008, [EMAIL PROTECTED] wrote:

If I define the follwoing functions:
car (x:_) = x
car [] = []

This won't typecheck.  It helps to add a type signature
  car :: [a] -> a

Good will, wrong diagnosis. This WILL check. car :: forall a. [[a]] -> [a]

J. Karczmarczuk
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to