[Haskell-cafe] Injective type families for GHC - syntax proposals

Carter Schonwald carter.schonwald at gmail.com
Wed Sep 17 14:32:59 UTC 2014


Jan,
I notice two things

1) that where notation in the style of closed type families is quite nice!

2) what about adding some annotation to the args that act injectively wrt
the result? eg

type family Foo *a *b  -- or some other marking annotation
rather than
type family Foo a b | $syntaxPlaceHolder -> a b  -- or

Or should we actually think of the solver process as being analagous to
fundeps?



On Wed, Sep 17, 2014 at 10:02 AM, Jan Stolarek <jan.stolarek at p.lodz.pl>
wrote:

> > > Use syntax similar to functional dependencies. The injectivity
> > > declaration begins with `|` following type family declaration head. `|`
> > > is followed by a
> > > list of comma-separated injectivity conditions. Each injectivity
> > > condition has
> > > the form:
> > >
> > > {{{
> > > result A -> B
> > > }}}
> >
> > Was `_` considered here as the result token?
> No, it wasn't.
>
> Also, I think it's best to actually take a look at the wiki as new
> proposals are being added
> there.
>
> Janek
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140917/8fe0c472/attachment.html>


More information about the Haskell-Cafe mailing list