[Hugs] #98: hugs accepts instance decls with methods that aren't in scope

Hugs trac at galois.com
Mon Feb 1 12:27:55 EST 2010


#98: hugs accepts instance decls with methods that aren't in scope
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  minor   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 hugs (September 2006) accepts these modules:
 {{{
 module Q (Class) where

 class Class a where
     method :: a
 }}}

 {{{
 module W where

 import Q

 instance Class Int where
     method = 6
 }}}

 but the report says:
 {{{
 4.3.2  Instance Declarations
 [...]
 It is illegal to give a binding for a class method that is not in scope
 }}}

 Ian Lynagh

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/98>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell


More information about the Hugs-Bugs mailing list