[GHC] #11440: GHC.Prim does not export Constraint

GHC ghc-devs at haskell.org
Sat Jan 16 00:30:53 UTC 2016


#11440: GHC.Prim does not export Constraint
-------------------------------------+-------------------------------------
           Reporter:  thomie         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  highest        |         Milestone:  8.0.1
          Component:  Compiler       |           Version:  8.0.1-rc1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This code from the `effect-monad` library worked in ghc-7.10, but fails
 with ghc-8.0.1-rc1:

 {{{
 {-# LANGUAGE TypeFamilies, ConstraintKinds, PolyKinds #-}

 module Control.Effect.Cond where

 import GHC.Prim

 class Cond (m :: k -> * -> *) where
     type AltInv m (s :: k) (t :: k) :: Constraint
 }}}

 It seems one now needs to import `Constraint` from `GHC.Exts`.

 This should be mentioned in the migration guide
 (https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0), together with  any
 other breaking changes there might be from the kind equalities patch
 (6746549772c5cc0ac66c0fce562f297f4d4b80a2).

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


More information about the ghc-tickets mailing list