[GHC] #8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies ------------------------------------+------------------------------------- Reporter: tensor5 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- The code is: {{{ data K = Foo | Bar data D1 :: K -> * where F1 :: D1 Foo B1 :: D1 Bar class C (a :: K -> *) where data D2 a :: K -> * foo :: a k -> D2 a k -> Bool instance C D1 where data D2 D1 k where F2 :: D2 D1 Foo B2 :: D2 D1 Bar foo F1 F2 = True foo B1 B2 = True }}} With -Wall it gives the warning: {{{ Test.hs:23:5: Warning: Pattern match(es) are non-exhaustive In an equation for `foo': Patterns not matched: F1 B2 B1 F2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8970 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies -------------------------------------------------+------------------------- Reporter: tensor5 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by tensor5): * failure: None/Unknown => Incorrect warning at compile-time -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8970#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies -------------------------------------------------+------------------------- Reporter: tensor5 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by simonpj): Yes, I think this is a long-outstanding bug, awaiting someone with some time and attention. See #6124 for example. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8970#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies -------------------------------------------------+------------------------- Reporter: tensor5 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: #3927 | #6124 -------------------------------------------------+------------------------- Changes (by jstolarek): * related: => #3927 #6124 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8970#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies
-------------------------------------------------+-------------------------
Reporter: tensor5 | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: duplicate | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect warning at | Unknown/Multiple
compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: #3927 #6124 |
-------------------------------------------------+-------------------------
Comment (by George Karachalias

#8970: Non-exhaustive pattern match warning with DataKinds and TypeFamilies -------------------------------------+------------------------------------- Reporter: tensor5 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: | PatternMatchWarnings Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #3927 #6124 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => PatternMatchWarnings -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8970#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC