[project @ 2005-06-21 10:44:37 by simonmar]
authorsimonmar <unknown>
Tue, 21 Jun 2005 10:44:42 +0000 (10:44 +0000)
committersimonmar <unknown>
Tue, 21 Jun 2005 10:44:42 +0000 (10:44 +0000)
commit0c53bd0e1b02dea0bde32cd7eb8ccb5ee2d3719e
tree93e45bf89f1877bdafb17cad72058d6738ac0a78
parent93e2d5bd8cc76fde85420c39aff50557ac62de97
[project @ 2005-06-21 10:44:37 by simonmar]
Relax the restrictions on conflicting packages.  This should address
many of the traps that people have been falling into with the current
package story.

Now, a local module can shadow a module in an exposed package, as long
as the package is not otherwise required by the program.  GHC checks
for conflicts when it knows the dependencies of the module being
compiled.

Also, we now check for module conflicts in exposed packages only when
importing a module: if an import can be satisfied from multiple
packages, that's an error.  It's not possible to prevent GHC from
starting by installing packages now (unless you install another base
package).

It seems to be possible to confuse GHCi by having a local module
shadowing a package module that goes away and comes back again.  I
think it's nearly right, but strange happenings have been observed.

I'll try to merge this into the STABLE branch.
27 files changed:
ghc/compiler/cmm/CLabel.hs
ghc/compiler/cmm/CmmParse.y
ghc/compiler/codeGen/CgBindery.lhs
ghc/compiler/codeGen/CgCase.lhs
ghc/compiler/codeGen/CgCon.lhs
ghc/compiler/codeGen/CgExpr.lhs
ghc/compiler/codeGen/CgHeapery.lhs
ghc/compiler/codeGen/CgMonad.lhs
ghc/compiler/codeGen/CgTailCall.lhs
ghc/compiler/codeGen/CgUtils.hs
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/codeGen/CodeGen.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/main/Finder.lhs
ghc/compiler/main/GHC.hs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/Packages.lhs
ghc/compiler/main/TidyPgm.lhs
ghc/compiler/profiling/SCCfinal.lhs
ghc/compiler/simplStg/SimplStg.lhs
ghc/compiler/stgSyn/StgSyn.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs