
#14547: Wrong warning by -Wincomplete-patterns -------------------------------------+------------------------------------- Reporter: YoshikuniJujo | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.2.1 Keywords: incomplete- | Operating System: Linux patterns OverloadedLists | TypeFamilies | Type of failure: Incorrect Architecture: x86 | error/warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Wrong warning occur where I use -Wincomplete-patterns with OverloadedLists and TypeFamilies. {{{#!hs {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wall -fno-warn-tabs #-} class Foo f where type It f foo :: [It f] -> f data List a = Empty | a :! List a deriving Show instance Foo (List a) where type It (List a) = a foo [] = Empty foo (x : xs) = x :! foo xs }}} Pattern match(es) are non-exhaustive In an equation for `foo': Patterns not matched: [] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14547 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler