
22 Oct
2003
22 Oct
'03
1:08 p.m.
OK, with the following modules: ----- module Bar (Bar(..)) where data Bar = CBar | CBaz deriving Show ----- ----- module Baz (Bar(..)) where data Bar = CBar | CBaz deriving Show ----- ----- module Foo (Bar(CBar,CBaz)) where import qualified Bar import Bar hiding (Bar(..)) import Baz ----- nhc98 gives bogus errors: $ nhc98 -c -o Baz.o Baz.hs $ nhc98 -c -o Bar.o Bar.hs $ nhc98 -c -o Foo.o Foo.hs ====== Errors when renaming: Constructor CBaz defined 2 times. Constructor CBar defined 2 times. $ hugs and ghc6 are happy. As a workaround I've found changing Foo's import of Bar to import Bar hiding (Bar(CBar,CBaz)) fixes it. Thanks Ian
7929
Age (days ago)
7929
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ian Lynagh