[GHC] #14845: TypeInType, index GADT by constraint witness

GHC ghc-devs at haskell.org
Mon Feb 26 22:02:17 UTC 2018


#14845: TypeInType, index GADT by constraint witness
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13895            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Hmph. You're right. You could always just add a `NB: Constrained data
 constructors cannot be promoted` or `Have you tried promoting a
 constrained data constructor?`. I don't think people will often trip over
 this.

 The other place to check is in the `AGlobal (AConLike (RealDataCon dc))`
 case in `TcHsType.tcTyVar`. I don't suppose it would be hard to check if
 the datacon had constraints. The only access seems to be in the fourth
 component of a `dataConFullSig`, but the comments there refer to a
 `dataConDictTheta` (now extinct) that could be revived to return this
 nugget. That might be a better route.

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


More information about the ghc-tickets mailing list