Warnings

Simon Peyton Jones simonpj at microsoft.com
Tue May 4 13:46:57 UTC 2021


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

    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210504/07da6583/attachment.html>


More information about the ghc-devs mailing list