[Haskell-cafe] Externally derive instance of Data?

José Pedro Magalhães jpm at cs.uu.nl
Fri Sep 11 10:53:03 EDT 2009


Hi Dimitry,

I think what you want is stand-alone deriving:
http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-alone-deriving


Cheers,
Pedro

On Fri, Sep 11, 2009 at 16:29, Dimitry Golubovsky <golubovsky at gmail.com>wrote:

> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090911/0fed1b4d/attachment.html


More information about the Haskell-Cafe mailing list