Data and Typeable instances

Ashley Yakeley ashley at semantic.org
Sat Apr 18 20:26:39 EDT 2009


Jeremy Shaw wrote:
> At Fri, 17 Apr 2009 11:55:51 -0700,
> Ashley Yakeley wrote:
> 
>> Instances of Typeable have been requested for various types. I'll add 
>> these for 1.1.3.
> 
> Sweet! Data as well? Happstack uses Data and Typeable for
> serialization. It would be nice to be able to use Data.Time instead of
> System.Time.

I'm not sure. I find the whole SYB approach unhaskellish, as it treats 
values based on their internal structure rather than their types. But 
perhaps serialisation is a harmless use of the Data class.

Typeable is also rather unhaskellish. A haskellish approach would be to 
use type witnesses, but it requires open witness declarations as a 
language extension. So, Typeable it is.

-- 
Ashley Yakeley
Seattle, WA


More information about the Libraries mailing list