1. 04 Jan, 2002 2 commits
  2. 03 Jan, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-01-03 17:09:13 by simonmar] · 224131a7
      simonmar 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).
  3. 25 Oct, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-10-25 11:47:03 by simonmar] · f01a5399
      simonmar authored
      -Wall cleanup:
        - move some imports inside #ifdef GHCI
        - remove some unused bindings
    • sof's avatar
      [project @ 2001-10-25 02:13:10 by sof] · 9e933350
      sof authored
      - Pet peeve removal / code tidyup, replaced various sub-optimal
        uses of 'length' with something a bit better, i.e., replaced
        the following patterns
         *  length as `cmpOp` length bs
         *  length as `cmpOp` val   -- incl. uses where val == 1 and val == 0
         *  {take,drop,splitAt} (length as) bs
         *  length [ () | pat <- as ]
        with uses of misc Util functions.
        I'd be surprised if there's a noticeable reduction in running
        times as a result of these changes, but every little bit helps.
        [ The changes have been tested wrt testsuite/ - I'm seeing a couple
          of unexpected breakages coming from CorePrep, but I'm currently
          assuming that these are due to other recent changes. ]
      - compMan/CompManager.lhs: restored 4.08 compilability + some code
      None of these changes are HEADworthy.
  4. 23 Oct, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-10-23 11:42:21 by simonmar] · 17547204
      simonmar authored
      Run statements typed at the prompt by calling into the RTS to create a
      new main thread.  This acts as a (not-quite-sealed) sandbox, which
      lets us detect deadlock without causing GHCi itself to quit.
        Prelude> Concurrent.newEmptyMVar >>= Concurrent.takeMVar
  5. 16 Oct, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-10-16 14:08:26 by simonmar] · ba7bf363
      simonmar authored
      Clean tmp files between compilations, rather than all at the end.
      This reduces the /tmp clutter if GHC dies messily (current values of
      "messily" include segmentation fault and, sadly, heap overflow).
  6. 21 Aug, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-08-21 09:25:48 by simonmar] · 0d41f5f3
      simonmar authored
      Accept The Truth and disallow loading any home modules which don't
      have a source file.
      The reason is that the compilation manager can't figure out
      dependencies unless it has the source file to browse through -
      previously there was a half-hearted attempt to let you get away with
      just an object + interface file, but it didn't work in general.
      Better just to disallow it altogether.
      Note that this applies to --make too.
  7. 17 Aug, 2001 1 commit
    • sof's avatar
      [project @ 2001-08-17 16:06:30 by sof] · d30f8fc1
      sof authored
      - have SysTools.FileOption take a prefix that is not to be transformed
        (this is to accommodate MS-style cmd-line options of the kind: "/out=foo.obj")
      - have users of Finder.mkHomeModuleLocn catch up with recent change to its type.
  8. 16 Aug, 2001 2 commits
  9. 15 Aug, 2001 1 commit
  10. 13 Aug, 2001 1 commit
  11. 03 Aug, 2001 1 commit
    • sof's avatar
      [project @ 2001-08-03 07:44:47 by sof] · 65142ed3
      sof authored
      Make dependency generation work a little bit better
      (stage1 goes through OK; yet to do a stage2, but
      thought I'd commit before I hit the sack).
  12. 01 Aug, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-08-01 12:07:50 by simonmar] · f7828a36
      simonmar authored
      Signification cleanup & rewrite of CmLink.
      Fixes at least one bug: the PersistentLinkerState could sometimes get
      out of step with the RTS's idea of which modules were loaded, leading
      to an unloadObj failure when we try to unload the same module twice.
      This could happen if a ^C exception is received in the middle of a
      Fixed by keeping the part of the linker's state that must match up
      with the RTS's internal state entirely private to CmLink, stored in a
      global variable.  The operations in CmLink which manipulate this state
      are now wrapped by Exception.block, and so are safe from ^C
  13. 19 Jul, 2001 1 commit
  14. 18 Jul, 2001 1 commit
    • rrt's avatar
      [project @ 2001-07-18 16:06:10 by rrt] · 0143969c
      rrt authored
      Add support for Hugs's :info command. Doesn't work yet, but shouldn't
      interfere with anything else. Some of the files touched are just to correct
      out-of-date comments.
      Highlights are:
      hscThing: like hscStmt, but just gets info about a single identifier
      cmInfoThing: exposes hscThing's functionality to the outside world
  15. 12 Jul, 2001 1 commit
    • sof's avatar
      [project @ 2001-07-12 16:25:32 by sof] · 434ef2b1
      sof authored
      ppFilesFromSummaries: to cope with recent driver changes,
      only report a file as being preprocessed if it differs from
      the source file(name).
      Fixes awfully bad breakage when using --make (source files
      were being deleted).
  16. 29 Jun, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-06-29 15:10:14 by simonmar] · 537e186f
      simonmar authored
      Change a '>' to '>=' when comparing the modification times of object &
      source files, to match make's behaviour and eliminate some unnecessary
      This introduces some potential unsafety, but it was felt that the
      benefits in terms of unsurprising behaviour were worth it.
  17. 27 Jun, 2001 1 commit
  18. 15 Jun, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-06-15 08:29:57 by simonpj] · 972d6442
      simonpj authored
      Some tidying up
      * Remove CmStaticInfo
         - GhciMode moves to HscTypes
         - The package stuff moves to new module main/Packages.lhs
      [put any package-related stuff in the new module]
      * Add Outputable.docToSDoc
  19. 14 Jun, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-06-14 12:50:05 by simonpj] · 16d5d1c7
      simonpj authored
      	Installation packaging
      GHC runs various system programs like
      	cp, touch
      	gcc, as, ld etc
      On Windows we plan to deliver these programs along with GHC,
      so we have to be careful about where to find them.
      This commit isolates all these dependencies in a single module
      Most of the #ifdefery for mingw has moved into this module.
      There's some documentation in SysTools.lhs
      Along the way I did lots of other cleanups.  In particular
        * There is no more 'globbing' needed when calling runSomething
        * All file removal goes via the standard Directory.removeFile
        * TmpFiles.hs has gone; absorbed into SysTools
        * Some DynFlag stuff has moved from DriverFlags to CmdLineOpts
      Still to do:
        **	I'm a bit concerned that calling removeFile one at a time
      	when deleting masses of split-object files is going to be
      	rather slow
        **	GHC now expects to find split,mangle,unlit in
      	instead of just
      	So something needs to change in the Unix installation scripts
        **    The "ineffective C preprocessor" is a perversion and should die
  20. 07 Jun, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-06-07 14:15:22 by simonmar] · dea3256b
      simonmar authored
      Don't force a module's {-# SOURCE #-} imports to have object linkables
      in order for the current module's object linkable to be considered
      valid (fixes some unnecessary recompilation with recursive modules).
    • simonmar's avatar
      [project @ 2001-06-07 11:03:07 by simonmar] · c95b8662
      simonmar authored
      First part of support for hierarchical module names:
         - the Finder now searches all possible paths when looking for
           a source file or .hi file.  I've removed the caching because
           now we have to search in subdirectories of each path option,
           and it was dubious whether the cache was actually helping.
         - the compilation manager now outputs a warning if it can't find
           the source for a given module, only the .hi file.  Previously
           this caused a cryptic error message when we attempted to call
           getModificationTime on the non-existent source file.
  21. 05 Jun, 2001 1 commit
  22. 08 May, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-05-08 10:58:48 by simonmar] · b8b47abe
      simonmar authored
      	DriverPhases.haskellish_src_suffix :: String -> Bool
      	DriverPhases.haskellish_src_file   :: String -> Bool
      which return True for suffixes of Haskell source files only.  The
      existing haskellish_suffix and haskellish_file return True also for
      .raw_s and .hc files.
      We use these instead of haskellish_file in Main.main when deciding
      whether to preprocess a file.
      Fixes: compilation of .raw_s files, and potential bugs with
      compilation of .hc files.
  23. 04 May, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-05-04 14:56:53 by simonmar] · dfbbfedc
      simonmar authored
      - only read ~/.ghci if it is owned by the current user and isn't
        writable by anyone else.
      - Only read ./.ghci if both . and ./.ghci are owned by the current
        user and aren't writable by anyone else.  I think this is
        sufficient: we don't need to check .. and ../.. etc. because "."
        always refers to the same directory while a process is running.
      - Don't load .so libraries in a package if that package is already
        linked with GHCi.  This stops us re-linking libm, libreadline etc.
      - Allow packages to be loaded from within GHCi using
      	:set -package <name>
        NOTE: this will unload all modules currently loaded into the
        interpreter.  I did this to be on the safe side - I think perhaps
        it isn't necessary, but I haven't thought it through fully yet.
      - fix CompManager.cmUnload in the process.  It was wrong in several
      MERGE WITH 5.00
  24. 01 May, 2001 1 commit
  25. 27 Apr, 2001 1 commit
  26. 28 Mar, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-03-28 16:51:02 by simonmar] · da25d580
      simonmar authored
      Cleaning up error reporting, 2nd attempt.
        - The UserError name is already bagged by Exception (for
          userErrors).  So we use ProgramError instead, which is
          more appropriate.
        - some previously UserErrors are now CmdLineErrors.  GHCi
          catches CmdLineErrors and prints them without the "ghc: "
    • simonmar's avatar
      [project @ 2001-03-28 11:01:19 by simonmar] · f4eba96b
      simonmar authored
      Clean up GHC's error reporting.
        - the GhcException type has some more constructors: CmdLineError,
          UserError, and InstallationError.  OtherError has gone.
        - most error messages should begin with "<location>:".  When the
          error is on the command-line or in GHC itself, <location> is
          "ghc", for consistency with std Unix semantics.
        - GHCi no longer prints a superfluous "ghc: " before certain error
  27. 21 Mar, 2001 1 commit
  28. 19 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-19 16:22:00 by simonmar] · dd4bc7ed
      simonmar authored
      Fix a problem with the 'it' variable in GHCi.  New bindings for 'it'
      were getting confused with old bindings, because we always used the
      same 'it' name.
      Now, we generate a new unique for 'it' each time around.
      Also, make sure that any existing variables shadowed by new
      command-line bindings are correctly removed from the environments to
      avoid space leaks.
  29. 15 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-15 11:26:27 by simonmar] · cf2aab8a
      simonmar authored
      Do a better job of telling the user whether we're interpreting a
      module or using an existing object file.
         Main> :load A
         Skipping  D                ( D.hs, D.o )
         Compiling C                ( C.hs, interpreted )
         Skipping  B                ( B.hs, B.o )
         Compiling Main             ( A.hs, interpreted )
  30. 08 Mar, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-03-08 12:07:38 by simonpj] · 51a571c0
      simonpj authored
      	A major hygiene pass
      1. The main change here is to
      	Move what was the "IdFlavour" out of IdInfo,
      	and into the varDetails field of a Var
         It was a mess before, because the flavour was a permanent attribute
         of an Id, whereas the rest of the IdInfo was ephemeral.  It's
         all much tidier now.
         Main places to look:
      	   Var.lhs	Defn of VarDetails
      	   IdInfo.lhs	Defn of GlobalIdDetails
         The main remaining infelicity is that SpecPragmaIds are right down
         in Var.lhs, which seems unduly built-in for such an ephemeral thing.
         But that is no worse than before.
      2. Tidy up the HscMain story a little.  Move mkModDetails from MkIface
         into CoreTidy (where it belongs more nicely)
         This was partly forced by (1) above, because I didn't want to make
         DictFun Ids into a separate kind of Id (which is how it was before).
         Not having them separate means we have to keep a list of them right
         through, rather than pull them out of the bindings at the end.
      3. Add NameEnv as a separate module (to join NameSet).
      4. Remove unnecessary {-# SOURCE #-} imports from FieldLabel.
  31. 02 Mar, 2001 1 commit
  32. 01 Mar, 2001 2 commits
    • qrczak's avatar
      [project @ 2001-03-01 21:39:36 by qrczak] · 0c5e53f0
      qrczak authored
      Let ':t \x->x' work by putting a space before the expression.
    • simonmar's avatar
      [project @ 2001-03-01 14:26:00 by simonmar] · 18b24e64
      simonmar authored
      GHCi fixes:
        - expressions are now compiled in a pseudo-module "$Interactive",
          which avoids some problems with storage of demand-loaded declarations.
        - compilation manager now detects when it needs to read the interace
          for a module, even if it is already compiled.  GHCi never demand-loads
          interfaces now.
        - (from Simon PJ) fix a problem with the recompilation checker, which
          meant that modules were sometimes not recompiled when they should
          have been.
        - ByteCodeGen/Link: move linker related stuff into ByteCodeLink.
  33. 28 Feb, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-02-28 17:57:52 by simonmar] · 85c61e76
      simonmar authored
      Compiling a module outside of a running GHCi and expecting GHCi to
      pick it up when you do ':r' ain't gonna work.
      We thought it would, but there's a problem with module versions and
      the recompilation machinery, namely that the outside compiler doesn't
      know about the versions being used internally in the running GHCi.
      The "right" solution is to implement a ':compile' command in GHCi, but
      we aren't going to do that before the release.
      This commit disables the picking up of newly compiled modules, until
      you do a full load (i.e. :load).
    • simonmar's avatar
      [project @ 2001-02-28 12:12:43 by simonmar] · 85222f5c
      simonmar authored
      oops, don't export cmTypeOfName when !GHCI.