Old code broken by new Typeable class

Volker Wysk verteiler at volker-wysk.de
Tue Aug 5 18:33:15 UTC 2014


Am Dienstag, 5. August 2014, 13:59:26 schrieb Brandon Allbery:
> On Tue, Aug 5, 2014 at 1:47 PM, Volker Wysk <verteiler at volker-wysk.de>
> > So you need to be able to change the definition of the data type, in order
> > to
> > add deriving (Typeable). It's not possible to add a Typeable instance
> > declaration later.
> 
> Are you sure? There is a standalone deriving syntax.
> 
>     deriving instance Typeable ProcessStatus

Yes, that's the solution. 

You need these options for GHC: -XStandaloneDeriving -XDeriveDataTypeable


Thanks, and Bye,
V.W.


More information about the Glasgow-haskell-users mailing list