Simon Peyton Jones simonpj at microsoft.com writes:
I think it's pretty good as-is.
Thank you Simon, I'm agreeing with pretty good,
though possibly not with pretty ;-)
...
* Use a closed family (with overlap and top-to-bottom matching)
to deal with that part of the space:
Doing
| To: glasgow-haskell-users@haskell.org
| Subject: Re: Closed Type Families: separate instance groups?
|
| Richard Eisenberg eir at cis.upenn.edu writes:
|
| You can always define a helper closed type family and have an open
| type family instance just call a closed type family.
|
| Thank you
On Jun 3, 2015, at 7:09 PM, AntC anthony_clay...@clear.net.nz wrote:
Is this separate instance group idea still a gleam in someone's eye?
If not, is there some deep theoretical reason against?
Not to my knowledge (to both questions). But I don't believe we've lost any
expressiveness over
Richard Eisenberg eir at cis.upenn.edu writes:
You can always define a helper closed type family
and have an open type family instance just call a closed type family.
Thank you Richard, you mean like:
type family OpenF a
...
type instance OpenF (Foo b c) = FFoo (Foo b c)
Currently (GHC 7.8.3) the only form for Closed Type Families is:
type family F a where ...
-- list your instances here
(This was considered a common use case
-- for example in HList to put the type-matching instance
with the non-matching, and that would be total coverage;
rather