C.M.Brown wrote:
f ~(x:xs) = x + 2
f ~[] = 42

Then f [] would give a complie error:
 Irrefutable pattern failed for pattern (x : xs)

Sorry, that should be *runtime* error!

Chris.
It seems GHC does give a warning at compile-time about it, so you did get it right the first time :-)

Thanks for the info,
Peter


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

Reply via email to