f ~(x:xs) = rhsgive a compile-time error since neither x nor xs is used in the right hand side, and hence nothing will ever get pattern matched when this function is called, which clearly indicates a mistake? That is, if I understand lazy pattern matching correctly... And then in these cases the user would have to annotate the pattern match as being strict, so he is aware of the eager evaluation taking place
HiNow why isn't pattern matching lazy by default? This seems odd for a newbie since everything else is lazy by default.f ~(x:xs) = rhs f ~[] = rhs' Now guess what f [] does... If you use a where binding then pattern matching is lazy. Thanks Neil