
If 'transformers' purposely has orphan instances, shouldn't we switch off the warnings about them? Simon "/opt/ghc/bin/ghc" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -Wall -package-db libraries/bootstrapping.conf -this-unit-id transformers-0.5.6.2 -hide-all-packages -package-env - -i -ilibraries/transformers/. -ilibraries/transformers/dist-boot/build -Ilibraries/transformers/dist-boot/build -ilibraries/transformers/dist-boot/build/./autogen -Ilibraries/transformers/dist-boot/build/./autogen -Ilibraries/transformers/. -optP-include -optPlibraries/transformers/dist-boot/build/./autogen/cabal_macros.h -package-id base-4.14.1.0 -XHaskell98 -no-user-package-db -rtsopts -fno-warn-unused-matches -fno-warn-unused-imports -fno-warn-deprecated-flags -outputdir libraries/transformers/dist-boot/build -c libraries/transformers/./Control/Applicative/Lift.hs -o libraries/transformers/dist-boot/build/Control/Applicative/Lift.o libraries/transformers/Control/Monad/Trans/Error.hs:98:1: warning: [-Worphans] Orphan instance: instance [safe] Error e => Alternative (Either e) To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. | 98 | instance (Error e) => Alternative (Either e) where | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... libraries/transformers/Control/Monad/Trans/Error.hs:103:1: warning: [-Worphans] Orphan instance: instance [safe] Error e => MonadPlus (Either e) To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. | 103 | instance (Error e) => MonadPlus (Either e) where | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Simon Peyton Jones via ghc-devs
If 'transformers' purposely has orphan instances, shouldn't we switch off the warnings about them? Simon
We actually do so in Make, but strangely only in the stage2 build (see mk/warnings.mk). It's unclear to me why this is the case. I think the ideal solution is to add an OPTIONS_GHC -Wno-orphans pragma upstream in the affected module, although this would require getting code upstream which is a bit tiresome due it being in darcs. Cheers, - Ben
participants (2)
-
Ben Gamari
-
Simon Peyton Jones