[GHC] #11715: Constraint vs *

GHC ghc-devs at haskell.org
Wed Mar 1 08:59:51 UTC 2017


#11715: Constraint vs *
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  8.0.1-rc1
  checker)                           |             Keywords:  Typeable,
      Resolution:                    |  LevityPolymorphism, Roles
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 simonpj):

 Just to record that Richard and I agreed that `constrainKind` currently
 has a bug. If `co :: Constraint ~ TYPE r`, then
 {{{
 coercionKind (mkNthCo 0 (mkKindCo co))
 }}}
 should succeed with `LiftedRep ~ r` but will fail because `Constraint` is
 syntactically `TYPE LiftedRep`.

 Stop-gap solution:

 * Make `coreView` do what `coreViewOneStarKind` does now; that is, expand
 `Constraint` to `TYPE LifteRep`.

 * Make the typechecker variants of `tcSplitTyConApp`, `tcSplitApp` use
 `tcView`; and make `tcView` '''not''' do this expansion.

 That is a more honest reflection of what is actually happening, until we
 fix it properly.

 Richard will have a go at this.

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


More information about the ghc-tickets mailing list