[project @ 2005-01-18 12:18:11 by simonpj]
authorsimonpj <unknown>
Tue, 18 Jan 2005 12:19:12 +0000 (12:19 +0000)
committersimonpj <unknown>
Tue, 18 Jan 2005 12:19:12 +0000 (12:19 +0000)
commitac80e0dececb68ed6385e3b34765fd8f9c019767
treeeaa2449523a33595fb3602b8154ff7f361df5a10
parent43d5a248f604acf6ad4d743ed7c002580c44aa8f
[project @ 2005-01-18 12:18:11 by simonpj]
------------------------
    Reorganisation of hi-boot files
   ------------------------

The main point of this commit is to arrange that in the Compilation
Manager's dependendency graph, hi-boot files are proper nodes. This
is important to make sure that we compile everything in the right
order.  It's a step towards hs-boot files.

* The fundamental change is that CompManager.ModSummary has a new
  field, ms_boot :: IsBootInterface

  I also tided up CompManager a bit.  No change to the Basic Plan.

  ModSummary is now exported abstractly from CompManager (was concrete)

* Hi-boot files now have import declarations.  The idea is they are
  compulsory, so that the dependency analyser can find them

* I changed an invariant: the Compilation Manager used to ensure that
  hscMain was given a HomePackageTable only for the modules 'below' the
  one being compiled.  This was really only important for instances and
  rules, and it was a bit inconvenient.  So I moved the filter to the
  compiler itself: see HscTypes.hptInstances and hptRules.

* Module Packages.hs now defines
    data PackageIdH
    = HomePackage  -- The "home" package is the package
  -- curently being compiled
    | ExtPackage PackageId -- An "external" package is any other package

   It was just a Maybe type before, so this makes it a bit clearer.

* I tried to add a bit better location info to the IfM monad, so that
  errors in interfaces come with a slightly more helpful error message.
  See the if_loc field in TcRnTypes --- and follow-on consequences

* Changed Either to Maybes.MaybeErr in a couple of places (more perspicuous)
32 files changed:
ghc/compiler/basicTypes/Module.hi-boot-6
ghc/compiler/basicTypes/Unique.lhs
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/ghci/Linker.lhs
ghc/compiler/iface/BinIface.hs
ghc/compiler/iface/IfaceType.lhs
ghc/compiler/iface/LoadIface.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/iface/TcIface.lhs
ghc/compiler/main/CodeOutput.lhs
ghc/compiler/main/DriverMkDepend.hs
ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/Finder.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/Main.hs
ghc/compiler/main/PackageConfig.hs
ghc/compiler/main/Packages.lhs
ghc/compiler/parser/Parser.y.pp
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs
ghc/compiler/typecheck/TcSplice.lhs
ghc/compiler/utils/Binary.hs
ghc/compiler/utils/Outputable.lhs