1. 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).
  2. 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.
  3. 27 Jun, 2001 1 commit
  4. 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
  5. 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
  6. 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.
  7. 05 Jun, 2001 1 commit
  8. 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.
  9. 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
  10. 01 May, 2001 1 commit
  11. 27 Apr, 2001 1 commit
  12. 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
  13. 21 Mar, 2001 1 commit
  14. 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.
  15. 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 )
  16. 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.
  17. 02 Mar, 2001 1 commit
  18. 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.
  19. 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.
  20. 27 Feb, 2001 1 commit
  21. 26 Feb, 2001 3 commits
    • simonmar's avatar
      [project @ 2001-02-26 16:43:31 by simonmar] · 252fd0cd
      simonmar authored
      Update the interactive context in cmRunStmt rather than hscMain.
    • simonmar's avatar
      [project @ 2001-02-26 15:50:21 by simonmar] · 436d7d67
      simonmar authored
      - message wibbles
      - in one-shot mode, make sure the interface file follows the module rather
        than the filename of the source.
    • simonmar's avatar
      [project @ 2001-02-26 15:06:57 by simonmar] · 1c62b517
      simonmar authored
      Implement do-style bindings on the GHCi command line.
      The syntax for a command-line is exactly that of a do statement, with
      the following meanings:
        - `pat <- expr'
          performs expr, and binds each of the variables in pat.
        - `let pat = expr; ...'
          binds each of the variables in pat, doesn't do any evaluation
        - `expr'
          behaves as `it <- expr' if expr is IO-typed, or `let it = expr'
          followed by `print it' otherwise.
  22. 12 Feb, 2001 1 commit
  23. 07 Feb, 2001 6 commits
  24. 06 Feb, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-02-06 12:03:10 by simonmar] · 0ed9d260
      simonmar authored
      Try to get the stable modules story right.  Things now work much
      better: objects aren't unloaded and reloaded unnecessarily, and
      compiling modules from with GHCi works:
      	> :! ghc -c A.hs
      	> :r
      	Compiling A ... compilation IS NOT required (using ./A.o)
      	Compiling B ... compilation IS NOT required
      	Compiling C ... compilation IS NOT required
      	Compiling Main ... compilation IS NOT required
      Compiled module must not depend on interpreted modules, but we
      currently don't enforce this restriction properly.
  25. 05 Feb, 2001 1 commit
  26. 31 Jan, 2001 1 commit
  27. 26 Jan, 2001 3 commits
    • simonmar's avatar
      [project @ 2001-01-26 17:37:27 by simonmar] · f092f609
      simonmar authored
      merge PersistentCmState and CmState
    • simonmar's avatar
      [project @ 2001-01-26 17:29:34 by simonmar] · 1d879dec
      simonmar authored
      Ok, don't throw away interfaces and symbol tables as part of the
      pre-upsweep.  This seems to fix the recompilation problems (well, some
      of them anyway...).
    • simonmar's avatar
      [project @ 2001-01-26 17:21:51 by simonmar] · e5fd6ca8
      simonmar authored
      Greatly simplify the story about linkables, source_unchanged, and the
      Now we pre-generate the list of valid linkables; that is, for each
      module if a linkable exists and is newer than the source, we keep it.
      If a module has a valid linkable, then it is "source unchanged", and
      it is also possibly "stable" as far as the pre-upsweep is concerned
      (as long as its imports are also stable).
      The pre-upsweep is no longer dependent on the mode
      There's still a bug here, though: the pre-upsweep removes old
      interfaces from the HIT, so we don't get an opportunity to avoid
      compilation for non-stable modules.  That's the next job.