[GHC] #9085: Inaccessible equations in a closed type family should be a warning, not an error

#9085: Inaccessible equations in a closed type family should be a warning, not an error ------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- If I say {{{ foo _ = () foo False = () }}} I get {{{ /Users/rae/temp/Bug.hs:2:1: Warning: Pattern match(es) are overlapped In an equation for ‘foo’: foo False = ... }}} But, if I say {{{ {-# LANGUAGE TypeFamilies #-} type family Foo a where Foo x = () Foo Bool = () }}} I get {{{ /Users/rae/temp/Bug.hs:5:3: Inaccessible family instance equation: Foo Bool = () In the equations for closed type family ‘Foo’ In the type family declaration for ‘Foo’ }}} If this issues a warning at the term level, it probably should do the same at the type level. This was my design decision that I'm changing, and I will fix. The warning will be controlled by the same flag that controls the term-level version. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9085 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9085: Inaccessible equations in a closed type family should be a warning, not an error -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: new Component: Compiler | Milestone: Resolution: | Version: 7.8.2 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: indexed- | Unknown/Multiple types/should_compile/T9085 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by goldfire): * testcase: => indexed-types/should_compile/T9085 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9085#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9085: Inaccessible equations in a closed type family should be a warning, not an
error
-------------------------------------------------+-------------------------
Reporter: goldfire | Owner:
Type: bug | goldfire
Priority: normal | Status: new
Component: Compiler | Milestone:
Resolution: | Version: 7.8.2
Operating System: Unknown/Multiple | Keywords:
Type of failure: None/Unknown | Architecture:
Test Case: indexed- | Unknown/Multiple
types/should_compile/T9085 | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by Richard Eisenberg

#9085: Inaccessible equations in a closed type family should be a warning, not an
error
-------------------------------------------------+-------------------------
Reporter: goldfire | Owner:
Type: bug | goldfire
Priority: normal | Status: new
Component: Compiler | Milestone:
Resolution: | Version: 7.8.2
Operating System: Unknown/Multiple | Keywords:
Type of failure: None/Unknown | Architecture:
Test Case: indexed- | Unknown/Multiple
types/should_compile/T9085 | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by Richard Eisenberg

#9085: Inaccessible equations in a closed type family should be a warning, not an error -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: merge Component: Compiler | Milestone: 7.8.4 Resolution: | Version: 7.8.2 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: indexed- | Unknown/Multiple types/should_compile/T9085 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by goldfire): * status: new => merge * milestone: => 7.8.4 Comment: Recommending merge, but this is really minor. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9085#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9085: Inaccessible equations in a closed type family should be a warning, not an error -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: Component: Compiler | closed Resolution: fixed | Milestone: 7.8.3 Operating System: Unknown/Multiple | Version: 7.8.2 Type of failure: None/Unknown | Keywords: Test Case: indexed- | Architecture: types/should_compile/T9085 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: 7.8.4 => 7.8.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9085#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC