[Haskell-cafe] Deriving Eq and Show instances for testing

Anakreontas anakreonmejdi at gmail.com
Thu Mar 31 15:43:31 UTC 2016


I have datatypes for which I need an Eq and Show instance only for testing. 
I could derive those instances in the datatype declaration but I prefer not 
to add unnecessary functionality. With StandaloneDeriving extension I can 
derive the instances in the test module but this produces many warning 
about orphan instances. Is there a better approach or a way to stop reports 
about orphan instance warnings?

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160331/fc7e64c3/attachment.html>


More information about the Haskell-Cafe mailing list