[GHC] #14555: GHC Panic with TypeInType / levity polymorphism

GHC ghc-devs at haskell.org
Tue Dec 5 00:03:27 UTC 2017


#14555: GHC Panic with TypeInType / levity polymorphism
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:
                                     |  LevityPolymorphism, TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 Simpler example

 {{{#!hs
 data Exp :: TYPE rep -> Type where
   Lam :: Exp (a -> b)
 }}}

 can be fixed by explicitly quantifying over `rep`

 {{{#!hs
 data Exp :: forall rep. TYPE rep -> Type where -- ...
 --
 data Exp :: forall (rep::RuntimeRep). TYPE rep -> Type where -- ...
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14555#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list