Data and Typeable instances

Sterling Clover s.clover at gmail.com
Sun Apr 19 10:39:32 EDT 2009


Am I to take it that you will not be providing Data instances because  
you find them "unhaskellish"? The time package is a core part of  
Haskell functionality, and those Data instances are sorely missed by  
a wide range of libraries. As the maintainer of a key part of the  
Haskell ecosystem, I think you are obligated to take into account not  
only what you find to be the "good bits," but also to provide  
instances such as Data that, even if you find them "unhaskellish"  
allow the library to better integrate into the Haskell package  
ecosystem as it now stands. Furthermore, if such instances are not  
provided, they will be created with standalone deriving. The  
instances created by standalone deriving, unlike instances which can  
be partially hand-written, will provide even less in the way of  
preservation of the abstract nature of certain data types. In the  
end, you may only be cutting off your nose to spite your face.

Cheers,
Sterl.


On Apr 18, 2009, at 8:26 PM, Ashley Yakeley wrote:

> 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
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries



More information about the Libraries mailing list