#72: mishandling of ambiguous record field names

View: New views
1 Messages — Rating Filter:   Alert me  

#72: mishandling of ambiguous record field names

by GHC-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

#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
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs@...
http://www.haskell.org/mailman/listinfo/hugs-bugs
LightInTheBox - Buy quality products at wholesale price!