Externally derive instance of Data?

Hi, Given a datatype defined somewhere in a third-party package, without deriving (Data) specified. Is it possible, in my module which is importing that datatype from that package, to auto-derive instance of Data for the said datatype? The goal is not to recompile the package just because an auto-derived instance is needed. Or no way other than to recompile the package? Thanks. -- Dimitry Golubovsky Anywhere on the Web

Hi Dimitry,
I think what you want is stand-alone deriving:
http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-...
Cheers,
Pedro
On Fri, Sep 11, 2009 at 16:29, Dimitry Golubovsky
Hi,
Given a datatype defined somewhere in a third-party package, without deriving (Data) specified.
Is it possible, in my module which is importing that datatype from that package, to auto-derive instance of Data for the said datatype? The goal is not to recompile the package just because an auto-derived instance is needed.
Or no way other than to recompile the package?
Thanks.
-- Dimitry Golubovsky
Anywhere on the Web _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Dimitry Golubovsky
-
José Pedro Magalhães