[Haskell-cafe] [ghc-proposals/cafe] Partially applied type families

mniip 14 at mniip.com
Sat May 13 06:40:47 UTC 2017

On Fri, May 12, 2017 at 01:22:35PM -0400, Richard Eisenberg wrote:
> > On May 12, 2017, at 6:46 AM, Anthony Clayden <anthony_clayden at clear.net.nz> wrote:
> > 
> > So please explain here in what way 
> > type families are "half baked".
> My interpretation of mniip’s use of this descriptor was a reference to the fact that type families aren’t just functions, don’t support `case`, can’t be partially applied, etc. Instead, we should just be able to use functions in types. :)

That is very much correct, but what I was exactly referring to was not
the necessary limitations of type families (such as inability of partial
application) but rather their unnecessary limitations. For example only
being able to pattern-match at the top-level, or, with
InjectiveTypeFamilies, lack of 'result arg1 -> arg2' type injectivity.

> I agree that closed type families are bizarre and perhaps a misfeature -- though I think they are a good incremental step toward something better.

Closed type families have proven very useful to me, so I don't agree
with calling them a misfeature, however I can see where you're coming
from : throughout the entire language we enforce the notion that we
can't have a "proof of type inequality" and then closed type families
give us just that. Indeed, their semantics could be made more apparent.

More information about the Haskell-Cafe mailing list