ANNOUNCE: GHC 7.4.1 Release Candidate 1

José Pedro Magalhães jpm at cs.uu.nl
Thu Dec 22 00:10:50 CET 2011


Hi Bas,

On Wed, Dec 21, 2011 at 23:02, Bas van Dijk <v.dijk.bas at gmail.com> wrote:

> On 21 December 2011 19:29, Ian Lynagh <igloo at earth.li> wrote:
> >  * There is a new feature constraint kinds (-XConstraintKinds):
> >
> http://www.haskell.org/ghc/dist/stable/docs/html/users_guide/constraint-kind.html
>
> I'm trying to run the ConstraintKinds example from the documentation:
>
> {-# LANGUAGE ConstraintKinds, TypeFamilies #-}
> type family Typ a b :: Constraint
> type instance Typ Int  b = Show b
> type instance Typ Bool b = Num b
>
> But GHC complains:
>    Not in scope: type constructor or class `Constraint'
>
> Do I have to import some GHC module for this?
>

Yes: GHC.Prim.

(Which reminds me, Simon, we had agreed to re-export Constraint from
GHC.Exts, but it wasn't clear to me how to do this, since Constraint is a
kind, not a type, so it can't just go on the export list of the module...)


Cheers,
Pedro


>
> Cheers,
>
> Bas
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20111221/f1d71798/attachment.htm>


More information about the Glasgow-haskell-users mailing list