
14 Aug
2009
14 Aug
'09
4:49 p.m.
On Fri, Aug 14, 2009 at 12:03 PM, Dan Weston
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