diff options
author | simonmar <unknown> | 2005-06-21 10:44:42 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-06-21 10:44:42 +0000 |
commit | 0c53bd0e1b02dea0bde32cd7eb8ccb5ee2d3719e (patch) | |
tree | 93e45bf89f1877bdafb17cad72058d6738ac0a78 /ghc/compiler/codeGen/CgHeapery.lhs | |
parent | 93e2d5bd8cc76fde85420c39aff50557ac62de97 (diff) | |
download | haskell-0c53bd0e1b02dea0bde32cd7eb8ccb5ee2d3719e.tar.gz |
[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.
Diffstat (limited to 'ghc/compiler/codeGen/CgHeapery.lhs')
-rw-r--r-- | ghc/compiler/codeGen/CgHeapery.lhs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ghc/compiler/codeGen/CgHeapery.lhs b/ghc/compiler/codeGen/CgHeapery.lhs index 66bc6f5dcc..78a6f78053 100644 --- a/ghc/compiler/codeGen/CgHeapery.lhs +++ b/ghc/compiler/codeGen/CgHeapery.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgHeapery.lhs,v 1.46 2005/04/21 15:28:20 simonmar Exp $ +% $Id: CgHeapery.lhs,v 1.47 2005/06/21 10:44:41 simonmar Exp $ % \section[CgHeapery]{Heap management functions} @@ -54,11 +54,9 @@ import TyCon ( tyConPrimRep ) import CostCentre ( CostCentreStack ) import Util ( mapAccumL, filterOut ) import Constants ( wORD_SIZE ) -import DynFlags ( DynFlags ) +import Packages ( HomeModules ) import Outputable -import GLAEXTS - \end{code} @@ -126,7 +124,7 @@ getHpRelOffset virtual_offset \begin{code} layOutDynConstr, layOutStaticConstr - :: DynFlags + :: HomeModules -> DataCon -> [(CgRep,a)] -> (ClosureInfo, @@ -135,8 +133,8 @@ layOutDynConstr, layOutStaticConstr layOutDynConstr = layOutConstr False layOutStaticConstr = layOutConstr True -layOutConstr is_static dflags data_con args - = (mkConInfo dflags is_static data_con tot_wds ptr_wds, +layOutConstr is_static hmods data_con args + = (mkConInfo hmods is_static data_con tot_wds ptr_wds, things_w_offsets) where (tot_wds, -- #ptr_wds + #nonptr_wds |