Skip to content
  • Simon Marlow's avatar
    [project @ 2002-01-03 17:09:13 by simonmar] · 224131a7
    Simon Marlow authored
    - change the mi_globals field of ModIface to be (Maybe GlobalRdrEnv)
      from GlobalRdrEnv.  The idea is that modules which we have
      compiled from source will have a complete GlobalRdrEnv in this field
      containing their top-level environments, whereas modules which we
      have loaded from object files (package modules and pre-compiled home
      modules) will have Nothing and we'll create a fake GlobalRdrEnv on
      demand from the export list.
    
      Previously we used to create the fake env all the time, but this way
      highlights the fact that we don't really have a proper GlobalRdrEnv
      for these modules (something we'd like to address at some point).
    
    - rename CompManager.cmLoadModule to cmLoadModules and make it take
      a DynFlags argument to be consistent with the rest of the
      CompManager interface.
    
    - split cmLoadModule into two parts: cmDepAnal which takes a list of
      filenames and returns a ModuleGraph, and cmLoadModules which takes
      the ModuleGraph and does the rest.  This lets the consumer know
      whether the dependency analysis step fails before unloading any
      existing modules - i.e. if you :reload and a module is missing, you
      don't lose the modules that are already loaded (bug reported by
      MIchael Weber some time ago).
    224131a7