[GHC] #2237: qualified names not permitted everywhere in instances

GHC trac at galois.com
Fri Apr 25 07:29:57 EDT 2008


#2237: qualified names not permitted everywhere in instances
-------------------------------+--------------------------------------------
 Reporter:  claus              |          Owner:         
     Type:  bug                |         Status:  new    
 Priority:  normal             |      Milestone:         
Component:  Compiler (Parser)  |        Version:  6.9    
 Severity:  normal             |     Resolution:         
 Keywords:                     |     Difficulty:  Unknown
 Testcase:                     |   Architecture:  Unknown
       Os:  Unknown            |  
-------------------------------+--------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown

Comment:

 Looks fine to me. In your example program
  * You don't need the qualification on `fmap`; it's unambiguous without.
  * The instance for `Dope` really isn't H98 and is rejected for that
 reason.

 This works:
 {{{
 module Foo where

 import qualified Prelude

 data T a = MkT

 instance (Prelude.Show a) => Prelude.Show (T a) where
   show = Prelude.error "urk"

 class Prelude.Show a => Dope a
 instance Prelude.Show a => Dope (T a)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2237#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list