[Haskell-cafe] Equality constraints in type families

Hugo Pacheco hpacheco at gmail.com
Sun Mar 30 00:28:02 EDT 2008


Anyway, do you think it is feasible to have a flag such as
-fallow-unsafe-type-families for users to use at their own risk? (supposing
we know how to guarantee these constraints).
I speak for my own, there are currently some nice thinks that I can only
accomplish with partially applied type synonyms in type families, otherwise
code starts to get dummier in terms of type contexts and context variables.

Thanks,
hugo

On Sun, Mar 30, 2008 at 4:14 AM, Hugo Pacheco <hpacheco at gmail.com> wrote:

> On Sun, Mar 30, 2008 at 3:54 AM, Manuel M T Chakravarty <
> chak at cse.unsw.edu.au> wrote:
>
> > Hugo Pacheco:
> > > Yes, but doesn't the confluence problem only occur for type synonyms
> > > that ignore one or more of the parameters? If so, this could be
> > > checked...
> >
> > You can't check this easily (for the general case).
> >
>
> I was most interested in knowing that this assumption was enough, and it
> looks like it does.
>
>
> >
> > Given
> >
> >   type family G a b
> >    type FList a x = G a x
> >    type instance F [a] = FList a
> >
> > Does FList ignore its second argument?  Depends on the type instances
> > of G.
> >
> > Manuel
> >
>
> I haven't thought of that, thanks for the example.
>
> hugo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080330/3c56f397/attachment.htm


More information about the Haskell-Cafe mailing list