[Haskell-cafe] Why isn't pattern matching lazy by default?
bf3 at telenet.be
Wed Sep 19 08:34:52 EDT 2007
>> 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!
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,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe