[GHC] #8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes

#8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes -------------------------------------------+------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.8.1-rc1 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------+------------------------------- Consider {{{ {-# LANGUAGE RankNTypes #-} module A where class C m where foo :: (forall b. b -> m b) -> c -> m c instance C [] where foo f c = f c }}} and {{{ {-# LANGUAGE GeneralizedNewtypeDeriving #-} module B where import A newtype MyList a = Mk [a] deriving C }}} When I compile B.hs, I get {{{ Illegal polymorphic or qualified type: forall b. b -> MyList b Perhaps you intended to use RankNTypes or Rank2Types In an expression type signature: forall (c :: *). (forall (b :: *). b -> MyList b) -> c -> MyList c In the expression: GHC.Prim.coerce (foo :: (forall (b :: *). b -> [] b) -> c -> [] c) :: forall (c :: *). (forall (b :: *). b -> MyList b) -> c -> MyList c In an equation for ‛foo’: foo = GHC.Prim.coerce (foo :: (forall (b :: *). b -> [] b) -> c -> [] c) :: forall (c :: *). (forall (b :: *). b -> MyList b) -> c -> MyList c }}} I will fix shortly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8758 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes
--------------------------------------------+------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.8.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by Richard Eisenberg

#8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: merge Component: Compiler (Type checker) | Milestone: Resolution: | Version: Operating System: Unknown/Multiple | 7.8.1-rc1 Type of failure: None/Unknown | Keywords: Test Case: | Architecture: deriving/should_compile/T8758 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by goldfire): * status: new => merge * testcase: => deriving/should_compile/T8758 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8758#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: merge Component: Compiler (Type checker) | Milestone: 7.8.1 Resolution: | Version: Operating System: Unknown/Multiple | 7.8.1-rc1 Type of failure: None/Unknown | Keywords: Test Case: | Architecture: deriving/should_compile/T8758 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * milestone: => 7.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8758#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8758: GeneralizedNewtypeDeriving sometimes needs RankNTypes -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | goldfire Priority: normal | Status: Component: Compiler (Type checker) | closed Resolution: fixed | Milestone: 7.8.1 Operating System: Unknown/Multiple | Version: Type of failure: None/Unknown | 7.8.1-rc1 Test Case: | Keywords: deriving/should_compile/T8758 | Architecture: Blocking: | Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8758#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC