[Haskell-cafe] Current research on overlapping/closed type families?

Simon Peyton-Jones simonpj at microsoft.com
Fri Jan 23 21:06:20 EST 2009

Provided all the overlapping instances are supplied together, as you suggest, I think what you say makes perfect sense and does not threaten soundness.

But we have not yet implemented the idea yet.  First priority is to get type families working properly, and in conjunction with type classes.  Then we can move on to adding features.


| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe-
| bounces at haskell.org] On Behalf Of Ryan Ingram
| Sent: 19 January 2009 23:24
| To: Haskell Cafe
| Subject: [Haskell-cafe] Current research on overlapping/closed type families?
| What's the status of overlapping/closed type families?  I'm interested
| in something like the following, which can currently be implemented in
| GHC with Oleg-magic using functional dependencies, but cannot, to my
| knowledge, be implemented with type families:
| data HTrue = HTrue
| data HFalse = HFalse
| type family IsFunction f
| {- not legal in GHC6.10 -}
| type instances
|    IsFunction (a -> b) = HTrue
|    IsFunction a = HFalse
|   -- ryan
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list