[GHC] #11554: Self quantification in GADT data declarations

GHC ghc-devs at haskell.org
Sun May 29 20:15:02 UTC 2016


#11554: Self quantification in GADT data declarations
-------------------------------------+-------------------------------------
        Reporter:  Rafbill           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.2
       Component:  Compiler (Type    |              Version:  8.0.1-rc2
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by alexvieth):

 > Or what am I missing?

 Nothing, you're right about this. The patch is now very small.

 {{{
 --- a/compiler/typecheck/TcHsType.hs
 +++ b/compiler/typecheck/TcHsType.hs
 @@ -881,7 +881,10 @@ tcTyVar mode name         -- Could be a tyvar, a
 tycon, or a datacon
         ; case thing of
             ATyVar _ tv -> return (mkTyVarTy tv, tyVarKind tv)

 -           ATcTyCon tc_tc -> do { check_tc tc_tc
 +           ATcTyCon tc_tc -> do { unless
 +                                    (isTypeLevel (mode_level mode))
 +                                    (promotionErr name TyConPE)
 +                                ; check_tc tc_tc
                                  ; tc <- get_loopy_tc name tc_tc
                                  ; handle_tyfams tc tc_tc }
                               -- mkNakedTyConApp: see Note [Type-checking
 inside the knot]
 }}}

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


More information about the ghc-tickets mailing list