21 Dec
2002
21 Dec
'02
1:48 a.m.
Hi all I think this is a hugs bug, but the logic behind the rules in this sort of case is a bit lost on me.
module A (foo) where
foo :: Int foo = 5
module B (foo) where
import A
foo :: Int foo = 4
ghci says: B.lhs:2: Ambiguous occurrence `foo' It could refer to either `A.foo', imported from A at B.lhs:4 (defined at A.lhs:5) or `B.foo', defined at B.lhs:7 hugs (CVS) says: Hugs session for: /home/igloo/local/hugs/lib/hugs/libraries/Hugs/Prelude.hs /home/igloo/local/hugs/lib/hugs/libraries/Prelude.hs A.lhs B.lhs Type :? for help B> foo 4 B> ghci allows it if foo is not in the export list or there is no export list. Thanks Ian
8667
Age (days ago)
8667
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ian Lynagh