|Subject:||Re: [Haskell-cafe] Re: could we get a Data instance for Data.Text.Text?|
|From:||José Pedro Magalhães|
|Date:||Tue, 26 Jan 2010 08:39:20 +0100|
As Neil Mitchell said before, if you really don't want to expose the internals of Text (by just using a derived instance) then you have no other alternative than to use String conversion. If you've been using it already and performance is not a big problem, then I guess it's ok.
Regarding the Serialize issue, maybe I am not understanding the problem correctly: isn't that just another generic function? There are generic implementations of binary get and put for at least two generic programming libraries in Hackage [1, 2], and writing one for SYB shouldn't be hard either, I think. Then you could have a trivial way of generating instances of Serialize, namely something like
instance Serialize MyType where
and you could provide Template Haskell code for generating these. Or even just do
instance (Data a) => Serialize a where ...
if you are willing to use OverlappingInstances and UndecidableInstances...
On Tue, Jan 26, 2010 at 03:16, Jeremy Shaw <[email protected]> wrote:
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [Haskell-cafe] scheduling an alarm, Thomas DuBuisson|
|Next by Date:||[Haskell-cafe] list mail, 田 其雨|
|Previous by Thread:||Re: [Haskell-cafe] Re: could we get a Data instance for Data.Text.Text?, Jeremy Shaw|
|Next by Thread:||Re: [Haskell-cafe] Re: could we get a Data instance for Data.Text.Text?, Jeremy Shaw|
|Indexes:||[Date] [Thread] [Top] [All Lists]|