Injective type families

Simon Peyton Jones simonpj at microsoft.com
Fri Jan 8 11:41:42 UTC 2016


|  > If I actually want to write backward-compatible type family code
|  using
|  > GHC-8.0, I'd prefer to be able to enable TypeFamilies yet not
|  > InjectiveTypeFamilies, and have GHC check that I am in the common
|  subset.
|  Good point. I wonder if others agree.

Yes I agree (see my last email).

But I think the same flag should deal with the richer form of improvement in the new branch, eg

	type family F a b = r  | r a -> b, r b -> a

Is "InjectiveTypeFamilies" a good name for this?  Or "TypeFamilyDependencies"?  Or what?

Simon


More information about the ghc-devs mailing list