exhaustive pattern warning bug with irrefutable patterns

John Meacham john at repetae.net
Sat Dec 3 20:53:24 EST 2005


the following gives a 'non-exhaustive pattern matching' error when it
shouldn't. the ~-pattern always matches. It is not the function that is
non-exhausitive, but the irrefutable binding, which are necessarily
always non-exhausive so warning about it is the wrong thing to do.

f :: [a] -> a
f [x] = x
f ~(_:xs) = f xs   

John

-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Glasgow-haskell-users mailing list