ConstraintKinds and default associated empty constraints

Edward Kmett ekmett at gmail.com
Mon Jan 9 17:21:57 CET 2012


On Sun, Jan 8, 2012 at 8:32 AM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:

> On 23 December 2011 17:44, Simon Peyton-Jones <simonpj at microsoft.com>
> wrote:
> > My attempt at forming a new understanding was driven by your example.
> >
> > class Functor f where
> >    type C f :: * -> Constraint
> >    type C f = ()
> >
> > sorry -- that was simply type incorrect.  () does not have kind *  ->
> > Constraint
>
> So am I correct that the `class Empty a; instance Empty a` trick is
> currently the only way to get default associated empty constraints?
>

Yes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20120109/d7b1c638/attachment-0001.htm>


More information about the Glasgow-haskell-users mailing list