modules loaded list behaviour

D. Tweed tweed@compsci.bristol.ac.uk
Sun, 3 Feb 2002 11:46:09 +0000 (GMT)


Hi, I can't find a note of this in the hugs bugs list:

With hugs98 December 2001 (more specifically the hugs rpm for Linux
Mandrake that Sigbjorn Finne pointed out on the mailing list, running on
Linux 2.4.17 on x86), if I have a script that tries to load a module that
gives a problem using (say) `hugs -98 makeMakefile.hs' I get

Reading file "/usr/share/hugs/lib/Prelude.hs":
Reading file "makeMakefile.hs":
[my ok modules snipped]
Reading file
"/home/PRG_DEV/SRC/SCRIPTS/HASKELL/MAKEFILE_GENERATOR/Trie.hs":
Reading file "/usr/share/hugs/lib/exts/UnbalancedSet.hs":
Reading file "/usr/share/hugs/lib/exts/EdisonPrelude.hs":
[lots of modules snipped]
Reading file "/usr/share/hugs/lib/exts/QuickCheck.hs":
Reading file "/usr/share/hugs/lib/exts/UnbalancedSet.hs":
Reading file "makeMakefile.hs":
ERROR "makeMakefile.hs" - Entity "foldl1" imported from module
"UnbalancedSet" already defined in module "Prelude"

which is what I'd expect when there's a problem. If I then comment out the
import of UnbalancedSet.hs in makeMakefile.hs and do :r I get

Reading file "makeMakefile.hs":

Hugs session for:
/usr/share/hugs/lib/Prelude.hs
[lots of modules skipped]
/usr/share/hugs/lib/exts/EdisonPrelude.hs
/usr/share/hugs/lib/exts/Sequence.hs
[lots of modules that shouldn't be there now skipped]
/usr/share/hugs/lib/exts/QuickCheck.hs
/usr/share/hugs/lib/exts/UnbalancedSet.hs
makeMakefile.hs

ie it has now loaded the remaining files (which are ok) but it still says
that the modules it loaded due to the attempted import of UnbalancedSet.hs
and UnbalancedSet.hs are also present. (Trying :t on things exported by
UnbalancedSet.hs suggests they aren't.)

It's not a major bug, but it did confuse me for a while.

___cheers,_dave_________________________________________________________
www.cs.bris.ac.uk/~tweed/|`...heat generated by its microprocessors will
email:tweed@cs.bris.ac.uk|slope upward exponentially, reaching the power
work tel:(0117) 954-5250 |density of a nuclear reactor before 2010'-Intel