The Glorious Glasgow Haskell Compilation System, version 7.4.2を使っています。
uniq :: Eq a => [a] -> [a]
uniq [] = []
uniq [x] = [x]
uniq (x1:xs@(x2:_)) | x1 == x2 = uniq xs
| x1 /= x2 = x1 : uniq xs
というコードを書いてコンパイルすると、
retu.hs:27:1:
Warning: Pattern match(es) are non-exhaustive
In an equation for `uniq': Patterns not matched: _ : (_ : _)
と言われます。
このuniqの定義は自分にはexhaustiveに思えるのですが、
何か見落としているのでしょうか。