[GHC] #10020: GHC 7.10 rejects nullary type class with associated data
#10020: GHC 7.10 rejects nullary type class with associated data -------------------------------------+------------------------------------- Reporter: | Owner: RyanGlScott | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1-rc1 Component: Compiler | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects Architecture: | valid program Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- In GHC 7.8.4, the following code is legal: {{{#!hs {-# LANGUAGE NullaryTypeClasses, TypeFamilies #-} module NullaryData where class NullaryClass where data NullaryData }}} In GHC 7.10, {{{NullaryTypeClasses}}} was [https://ghc.haskell.org/trac/ghc/ticket/8993 deprecated] in favor of {{{MultiParamTypeClasses}}}. However, running this code on GHC 7.10-rc1: {{{#!hs {-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-} module NullaryData where class NullaryClass where data NullaryData }}} results in this error: {{{ NullaryData.hs:4:1: The associated type ‘NullaryData’ mentions none of the type or kind variables of the class ‘NullaryClass’ In the class declaration for ‘NullaryClass’ }}} It's probably related to [https://ghc.haskell.org/trac/ghc/ticket/9167 this earlier bugfix]. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10020> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10020: GHC 7.10 rejects nullary type class with associated data -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"dda652826326022e4604d7b0fdc82c1993e32a67/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="dda652826326022e4604d7b0fdc82c1993e32a67" Fix the nullary-type-class case for associated types It was already ok for methods. Fixes Trac #10020 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10020#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10020: GHC 7.10 rejects nullary type class with associated data -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: indexed- Blocked By: | types/should_compile/T10020 Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => merge * testcase: => indexed-types/should_compile/T10020 Comment: Thanks for reporting this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10020#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10020: GHC 7.10 rejects nullary type class with associated data -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.10.1-rc1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: indexed- Blocked By: | types/should_compile/T10020 Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: => 7.10.1 Comment: Merged to `ghc-7.10` (via 4c8b65218c3ad4d040691453b60091b38a41a0b0). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10020#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC