[GHC] #14155: GHC mentions unlifted types out of the blue (to me anyway)

GHC ghc-devs at haskell.org
Fri Aug 25 08:50:09 UTC 2017


#14155: GHC mentions unlifted types out of the blue (to me anyway)
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  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:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * keywords:   => TypeInType
 * priority:  normal => highest
 * milestone:   => 8.4.1


Comment:

 Aha.  Based on comment:1 I very rapidly found that the constraint solver
 was going wrong thus.  We have
 {{{
 m :: k0 -> k0 -> * -> *
 i :: k0
 }}}
 and a wanted constraint
 {{{
 [W] (m i :: k0 -> * -> *)  ~#  ((->) LR LR :: * -> * -> *)
 }}}
 where `LR` is `LiftedRep`.  This much is fine.  But then the canonicaliser
 decomposes it thus
 {{{
 [W] (i :: k0)  ~#  (LR :: *)
 [W] (m :: k0 -> k0 -> * -> *)  ~#  ((->) LR :: forall r. * -> TYPE r -> *)
 }}}
 which is utterly bogus.

 Presumably we need an extra guard in the `can_eq_app` that checks that
 neither function kind is a forall?

 Richard please comment.

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


More information about the ghc-tickets mailing list