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

Richard Eisenberg rae at cs.brynmawr.edu
Fri Jun 2 13:20:13 UTC 2017

> On Jun 2, 2017, at 3:22 AM, Anthony Clayden <anthony_clayden at clear.net.nz> wrote:
>> I hereby pronounce
>>> instance TypeError ... => C Int Bool
>> as "not an instance". ...
> Hmm. I'd be interested how you're going to stop
> the compiler matching some usage site to it.

That's what TypeError does. When the compiler matches a use site, it issues an error. I would imagine that's the behavior you want.

>> 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? 
> Good question. I've been struggling to explain it. ...

I'm afraid I didn't follow the description that followed. Can you write a concrete example of something you'd like to do that the current machinery doesn't?
> Oh! that I had "Deserts of vast eternity"
> to write the thing.
> As it is, it's easier to tackle as bite-size pieces on the
> forum.

It's always OK to write a proposal with open questions, such as how the feature interacts with overlapping instances, what the concrete syntax should be, etc. But the enormous advantage to moving to a proposal is that we then have a concrete artifact to stare at and evaluate, instead of some hypothetical design which might be different in all our heads.


More information about the Haskell-Cafe mailing list