
19 Sep
2007
19 Sep
'07
9:11 a.m.
It seems GHC does give a warning at compile-time about it, so you did get it right the first time :-)
Well the warning happens at compile time certainly. But the irrefutable pattern error only occurs at runtime. cmb21$ ghc --make Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Main.hs:3:0: Warning: Pattern match(es) are overlapped In the definition of `f': f ~[] = ... Linking Main ... cmb21$ ./a.out a.out: Main.hs:(3,0)-(4,10): Irrefutable pattern failed for pattern (x : xs) Cheers, Chris.
Thanks for the info, Peter