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

Richard Eisenberg rae at cs.brynmawr.edu
Fri Jun 2 02:32:39 UTC 2017

> On May 31, 2017, at 12:31 AM, Anthony Clayden <anthony_clayden at clear.net.nz> wrote:
> If we want to part-apply a type Fun
> which has a non-linear lhs,
> how does that go with your case-equation style?

Problematically. This is why my thesis muses on -- but stops well short of solving -- the problem of non-linear patterns. I'm not sure how it all fits together.
>> You could always view
>>> instance TypeError ... => C Int Bool
>> as sugar for
>>> instance C Int Bool fails
> Yes I understand that.
> But no I don't want any instance.
> (Sugar on rotten fruit doesn't hide the smell.)

I hereby pronounce

> instance TypeError ... => C Int Bool

as "not an instance". In other words, I'm not sure what you're getting at here other than concrete syntax. How does not having an instance differ than the TypeError solution?
> OK. Perhaps you're seeing something I can't.
> To adapt your example from a parallel message, suppose:
> <snip>

What you're getting at here is that there may be interesting interplay between instance guards and OverlappingInstances. Indeed. This would have to be worked out (or left as an open question) in the proposal.

Regardless, I think that hashing out this level of detail here is the wrong place. Put it in the proposal! That way, the ensuing debate involves more of the community and persists better.


More information about the Haskell-Cafe mailing list