#2467: orphan instance warnings are badly behaved
---------------------------------+------------------------------------------
    Reporter:  duncan            |        Owner:                  
        Type:  bug               |       Status:  new             
    Priority:  normal            |    Milestone:  6.12 branch     
   Component:  Compiler          |      Version:  6.8.2           
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by Syzygies):

 It came up in my code that I needed

 > instance Foldable ((,) a) where foldr f z (_,y) = f y z

 which is completely parallel to the Functor instance, but unlike the
 Functor instance is not provided by the standard libraries.

 There is no way that this instance can be anything but an orphan in my
 code (I shouldn't change Data.Foldable on a whim, it would make my code
 non-portable), so in this case I would argue that it is wrong for -Wall
 -Werror to abort compilation over this. I added -fno-warn-orphans, but
 that is a clunky fix which now deprives me of that warning when it might
 be relevant.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2467#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to