#2176: H98 module Array exports non-H98 instance Functor ((->) a)
------------------------------------+---------------------------------------
    Reporter:  duncan               |        Owner:         
        Type:  bug                  |       Status:  new    
    Priority:  normal               |    Milestone:         
   Component:  libraries/haskell98  |      Version:  6.8.2  
    Severity:  normal               |   Resolution:         
    Keywords:                       |     Testcase:         
Architecture:  Unknown              |           Os:  Unknown
------------------------------------+---------------------------------------
Comment (by ross):

 Here's a test for this bug:
 {{{
 module ShouldCompile where

 -- import all Haskell 98 modules
 import Array
 import Char
 import Complex
 import CPUTime
 import Directory
 import IO
 import Ix
 import List
 import Locale
 import Maybe
 import Monad
 import Numeric
 import Random
 import Ratio
 import System
 import Time

 -- This will fail if any of the Haskell 98 modules indirectly import
 -- Control.Monad.Instances
 instance Functor ((->) r) where
         fmap = (.)
 }}}
 This can be used to show that Array is the only H98 module where this
 bites.  The problem is that it defines Foldable and Traversable instances
 for the Array type, and thus needs those modules and Control.Applicative,
 which they import. (Another vector is Control.Monad.Fix, imported by
 Control.Arrow, but that doesn't seem to lead to H98 modules.)

 I believe that these instances are a Good Thing, and we want them
 everywhere, except in H98 modules.

 I think the fix is to have an extra version of Data.Array, without the
 Foldable and Traversable instances (which are orphans anyway), and have
 Array import that.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2176#comment:1>
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