Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2005-01-18 12:18:11 by simonpj] · ac80e0de
    Simon Peyton Jones authored
    ------------------------
        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)
    ac80e0de