[Haskell-cafe] [ghc-proposals/cafe] Partially applied type families
anthony_clayden at clear.net.nz
Fri May 12 10:46:45 UTC 2017
> 2 days ago Richard Eisenberg (and mniip) wrote:
> On incremental improvements / the "half-baked" nature of
> type families: I agree completely. ...
["half-baked" is Richard quoting mniip]
> ... the weird place of type families in the language.
> It is my hope that Dependent Haskell will obviate
> a lot of these concerns, allowing us to deprecate
> type families as we know them
> (you would just use an ordinary function in types
I don't want to sidetrack the github discussion
on mniip's proposal.
So please explain here in what way
type families are "half baked".
The part of type families I find
hard to use and hard to reason about
is closed type families.
I'd be very happy to deprecate them,
if there was something that did overlaps better.
>From what I can make out, though,
in Richard's Dissertation,
they can't be promoted to "ordinary functions
If the closed equations were ordinary
functions in types, you could go:
> type family F a b
> type instance F Int b = b
> type instance F a Bool | a /~ Int = a
> -- non-unifiability guard
With no need for a closed sequence of choices.
Is this the "case-like computations"
others talk about on the proposal?
More information about the Haskell-Cafe