
Somehow I didn't receive David's mail, but his explanation makes a lot of sense. I'm still wondering how this results in a type error involving rigid type variables. Ryan Ingram wrote:
On Fri, Aug 14, 2009 at 12:03 PM, Dan Weston
wrote: But presumably he can use a data family instead of a type family to restore injectivity, at the cost of adding an extra wrapped bottom value and one more layer of value constructor?
Actually, you don't even necessarily pay this penalty, since you can put newtypes into data families.
data family Foo a newtype instance Foo () = UnitFoo Int
You do need to add the constructor wrap/unwrapping in code, but they all get erased after typechecking.
-- ryan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe