
On 31/03/16 12:43, Anakreontas wrote:
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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
You can put {-# OPTIONS_GHC -fno-warn-orphans #-} At the top of such files to stop warnings, see also [1] [1]: https://stackoverflow.com/questions/3079537/orphaned-instances-in-haskell -- -- Ruben Astudillo