[Hugs] #72: mishandling of ambiguous record field names

Hugs trac at galois.com
Tue May 29 19:43:23 EDT 2007


#72: mishandling of ambiguous record field names
-----------------------------+----------------------------------------------
 Reporter:  ross             |       Owner:  nobody 
     Type:  defect           |      Status:  new    
 Priority:  major            |   Milestone:         
Component:  static analysis  |     Version:  current
 Keywords:                   |  
-----------------------------+----------------------------------------------
Simon PJ writes:
 {{{
 module A where
   data A = A { foo :: Int }

 module B where
   import A
   data B = B { foo :: Bool }
   a = A {foo=3}
 }}}
 yields:
 {{{
 ERROR "B.hs":8 - Constructor "A" does not have selected fields in A{foo +=
 3}
 }}}
 Commenting out the declaration of `data B` makes the definition of `a`
 work.

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


More information about the Hugs-Bugs mailing list