by teaspoon · 15y ago · 0 comments
fn 0 = return ()
main = fn 1
Giving an empty list to head/tail is another: main = head [] $ ghc --make test.hs -Wall
test.hs:1:1:
Warning: Pattern match(es) are non-exhaustive
In an equation for `fn':
Patterns not matched: #x with #x `notElem` [0#] Warning: Pattern match(es) are non-exhaustive
In an equation for `fn':
Patterns not matched:
[]
#x : _ with #x `notElem` [0#]
0# : (_ : _)