
3 Mar
2007
3 Mar
'07
4:18 a.m.
Why would there be an extra function? The type data Dynamic = forall a . Dynamic TypeRep a is simply a pair. And so is data Dynamic = forall a . (Typeable a) => Dynamic a I think the latter is the most natural representation for Dynamic. -- Lennart On Mar 2, 2007, at 23:55 , Stefan O'Rear wrote:
the current type:
data Dynamic = Dynamic TypeRep Obj
the new type, if lucky:
data Dynamic = Dynamic !(a -> TypeRep) a
if unlucky:
data TypeableD a = TypeableD (a -> TypeRep) data Dynamic = Dynamic (TypeableD a) a
either way, the typeclass approach gives a lot more boxing. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe