[GHC] #11007: Type family injectivity annotations ignored in hs-boot files
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Here's the test case: {{{ -- A.hs-boot {-# LANGUAGE TypeFamilies #-} module A where type family Id x = r | r -> x where .. }}} {{{ -- needed to avoid illegal self-import module B where import {-# SOURCE #-} A }}} {{{ {-# LANGUAGE TypeFamilies #-} module A where import B type family Id x = r | r -> x where Id a = a }}} I get {{{ A.hs-boot:6:1: error: Type constructor ‘Id’ has conflicting definitions in the module and its hs-boot file Main module: type family Id x = r :: * | r -> x where Id a = a Boot file: type family Id x :: * }}} Even when declaring an abstract closed type family, it should still be able to be injective. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * Attachment "T11007.tar.gz" added. test case -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: jstolarek Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * owner: => jstolarek Comment: Duh. I tested this for open type families but not for closed ones. Will fix sometime soon. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: jstolarek Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T6018 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1453 Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * testcase: => typecheck/should_compile/T6018 * differential: => Phab:D1453 Comment: Richard, can you CC me on injectivity bugs that you report? This one nearly went past my radar. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: jstolarek Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T6018 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1453 Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Will do. Thanks for the fix! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: jstolarek Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T6018 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1453 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Jan Stolarek <jan.stolarek@…>): In [changeset:"3cfe60aebb9de2a1d897a111f779eacb6614b7cc/ghc" 3cfe60a/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3cfe60aebb9de2a1d897a111f779eacb6614b7cc" Abstract TFs can have injectivity information Summary: For abstract type families we incorrectly rejected their injectivity annotation. Fixes #11007. Test Plan: #6018 Reviewers: goldfire, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1453 GHC Trac Issues: #11007 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11007: Type family injectivity annotations ignored in hs-boot files -------------------------------------+------------------------------------- Reporter: goldfire | Owner: jstolarek Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T6018 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1453 Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11007#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC