1. 01 Mar, 2006 1 commit
  2. 28 Feb, 2006 1 commit
  3. 10 Feb, 2006 1 commit
  4. 25 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-25 12:48:35 by simonmar] · 78b72ed1
      simonmar authored
      Two changes from Krasimir Angelov, which were required for Visual
      Haskell:
      
        - messaging cleanup throughout the compiler.  DynFlags has a new
          field:
      
          log_action :: Severity -> SrcSpan -> PprStyle -> Message -> IO ()
      
          this action is invoked for every message generated by the
          compiler.  This means a client of the GHC API can direct messages to
          any destination, or collect them up in an IORef for later
          perusal.
      
          This replaces previous hacks to redirect messages in the GHC API
          (hence some changes to function types in GHC.hs).
      
        - The JustTypecheck mode of GHC now does what it says.  It doesn't
          run any of the compiler passes beyond the typechecker for each module,
          but does generate the ModIface in order that further modules can be
          typechecked.
      
      And one change from me:
      
        - implement the LANGUAGE pragma, finally
      78b72ed1
  5. 17 May, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-05-17 10:51:04 by simonmar] · 71fce424
      simonmar authored
      Rationalise the filename handling in a few places, taking some bits
      from the defunct System.FilePath library.  Also fixes a bug I recently
      introduced in replaceFilenameDirectory.
      71fce424
  6. 27 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-27 08:25:46 by simonmar] · a355262a
      simonmar authored
      newTempName: instead of bumping the processId until we find a name
      that isn't used, add an integer suffix to the processId.  This should
      prevent temp-file conflicts that appear to have been affecting our
      nightly builds and occasionally make -j.
      
      The right way to allocate a temporary file is to create it straight
      away, but I'm not sure of the implications of passing existing
      temporary files to the various sub-processes that GHC executes, hence
      this fix instead.
      a355262a
  7. 26 Apr, 2005 1 commit
    • sof's avatar
      [project @ 2005-04-26 00:08:17 by sof] · 136861d1
      sof authored
      runSomething: 'rawSystem' might raise an exception to indicate that
      'pgm' couldn't be executed, so catch this here & report.
      
      Merge to STABLE.
      136861d1
  8. 05 Apr, 2005 1 commit
    • krasimir's avatar
      [project @ 2005-04-05 09:06:36 by krasimir] · bdfa0107
      krasimir authored
      In many places there was a common pattern
      
      when (verbose >= n) $ putMsg "..."
      
      It is now replaced with
      
      debutTraceMsg dflags n "..."
      
      In few places hPutStrLn stderr or putStrLn was used instead of putMsg in
      the above pattern. They are replaced too. Now putMsg is used only in places
      where the verbosity flag was not checked.
      bdfa0107
  9. 31 Mar, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-03-31 16:11:49 by simonmar] · 426e0396
      simonmar authored
      DriverPipeline.compile: we should be grabbing the OPTIONS from the
      StringBuffer, not reading the file again (duh!)
      
      SysTools: some message cleanups
      426e0396
    • simonmar's avatar
      [project @ 2005-03-31 10:16:33 by simonmar] · 853e20a3
      simonmar authored
      Tweaks to get the GHC sources through Haddock.  Doesn't quite work
      yet, because Haddock complains about the recursive modules.  Haddock
      needs to understand SOURCE imports (it can probably just ignore them
      as a first attempt).
      853e20a3
  10. 21 Mar, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-03-21 10:50:22 by simonmar] · 50159f6c
      simonmar authored
      Complete the transition of -split-objs into a dynamic flag (looks like I
      half-finished it in the last commit).
      
      Also: complete the transition of -tmpdir into a dynamic flag, which
      involves some rearrangement of code from SysTools into DynFlags.
      
      Someday, initSysTools should move wholesale into initDynFlags, because
      most of the state that it initialises is now part of the DynFlags
      structure, and the rest could be moved in easily.
      50159f6c
  11. 18 Mar, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-03-18 13:37:27 by simonmar] · d1c1b7d0
      simonmar authored
      Flags cleanup.
      
      Basically the purpose of this commit is to move more of the compiler's
      global state into DynFlags, which is moving in the direction we need
      to go for the GHC API which can have multiple active sessions
      supported by a single GHC instance.
      
      Before:
      
      $ grep 'global_var' */*hs | wc -l
           78
      
      After:
      
      $ grep 'global_var' */*hs | wc -l
           27
      
      Well, it's an improvement.  Most of what's left won't really affect
      our ability to host multiple sessions.
      
      Lots of static flags have become dynamic flags (yay!).  Notably lots
      of flags that we used to think of as "driver" flags, like -I and -L,
      are now dynamic.  The most notable static flags left behind are the
      "way" flags, eg. -prof.  It would be nice to fix this, but it isn't
      urgent.
      
      On the way, lots of cleanup has happened.  Everything related to
      static and dynamic flags lives in StaticFlags and DynFlags
      respectively, and they share a common command-line parser library in
      CmdLineParser.  The flags related to modes (--makde, --interactive
      etc.) are now private to the front end: in fact private to Main
      itself, for now.
      d1c1b7d0
  12. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  13. 20 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-20 14:22:19 by simonmar] · c830ae13
      simonmar authored
      Fill in the haddock-interfaces and haddock-html fields in the
      package.conf files.
      
      To do this I had to make some changes:
      
        - haddock-interfaces requires the value of $(datadir).  We can't
          just plug this in, because $(datadir) might change at install-time
          (eg. a Windows installer can be placed anywhere, as can a Unix
          binary .tar.gz distribution).  The current trick is for the
          compiler to splice in the value of $libdir in package.conf at
          runtime.  So we could extend this mechanism and tell the compiler
          the value of $datadir via a command-line option, but that seems
          ugly.
      
          On Windows, $datadir==$libdir, so we don't need any changes:
          package.conf still uses $libdir, and a Windows installation is
          independent of its absolute location.  Even 'make install' on
          Windows should have this property.
      
          On Unix:
      	- for 'make install' and in-place execution, we just use
                absolute paths in package.conf
      
      	- for a binary dist, we generate a package.conf that refers
      	  to $libdir and $datadir, and splice in the values at
      	  install-time (distrib/Makefile-bin.in).
      
        - Also, I renamed $libdir to $topdir to more closely reflect its
          actual meaning.  This is somewhat malicious in that it will flush
          out all those clients using $libdir when they really shouldn't
          be :-)
      c830ae13
  14. 26 Nov, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-11-26 16:19:45 by simonmar] · ef5b4b14
      simonmar authored
      Further integration with the new package story.  GHC now supports
      pretty much everything in the package proposal.
      
        - GHC now works in terms of PackageIds (<pkg>-<version>) rather than
          just package names.  You can still specify package names without
          versions on the command line, as long as the name is unambiguous.
      
        - GHC understands hidden/exposed modules in a package, and will refuse
          to import a hidden module.  Also, the hidden/eposed status of packages
          is taken into account.
      
        - I had to remove the old package syntax from ghc-pkg, backwards
          compatibility isn't really practical.
      
        - All the package.conf.in files have been rewritten in the new syntax,
          and contain a complete list of modules in the package.  I've set all
          the versions to 1.0 for now - please check your package(s) and fix the
          version number & other info appropriately.
      
        - New options:
      
      	-hide-package P    sets the expose flag on package P to False
      	-ignore-package P  unregisters P for this compilation
      
      	For comparison, -package P sets the expose flag on package P
              to True, and also causes P to be linked in eagerly.
      
              -package-name is no longer officially supported.  Unofficially, it's
      	a synonym for -ignore-package, which has more or less the same effect
      	as -package-name used to.
      
      	Note that a package may be hidden and yet still be linked into
      	the program, by virtue of being a dependency of some other package.
      	To completely remove a package from the compiler's internal database,
              use -ignore-package.
      
      	The compiler will complain if any two packages in the
              transitive closure of exposed packages contain the same
              module.
      
      	You *must* use -ignore-package P when compiling modules for
              package P, if package P (or an older version of P) is already
              registered.  The compiler will helpfully complain if you don't.
      	The fptools build system does this.
      
         - Note: the Cabal library won't work yet.  It still thinks GHC uses
           the old package config syntax.
      
      Internal changes/cleanups:
      
         - The ModuleName type has gone away.  Modules are now just (a
           newtype of) FastStrings, and don't contain any package information.
           All the package-related knowledge is in DynFlags, which is passed
           down to where it is needed.
      
         - DynFlags manipulation has been cleaned up somewhat: there are no
           global variables holding DynFlags any more, instead the DynFlags
           are passed around properly.
      
         - There are a few less global variables in GHC.  Lots more are
           scheduled for removal.
      
         - -i is now a dynamic flag, as are all the package-related flags (but
           using them in {-# OPTIONS #-} is Officially Not Recommended).
      
         - make -j now appears to work under fptools/libraries/.  Probably
           wouldn't take much to get it working for a whole build.
      ef5b4b14
  15. 11 Nov, 2004 1 commit
  16. 01 Sep, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-09-01 09:43:25 by simonmar] · a8f00cda
      simonmar authored
      Catch exit(127) result from raw system, and report that we couldn't
      execute the program.  This is a semi-hack; all exec() errors get
      reported as exit(127) by rawSystem, but if we treat it just like a
      program that does exit(127) then the user sees no output.
      a8f00cda
  17. 25 Aug, 2004 1 commit
  18. 13 Aug, 2004 1 commit
  19. 06 May, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-05-06 08:44:52 by simonmar] · 41b1011d
      simonmar authored
      Move the definition of rawSystem into a separate file which we
      #include in the places it is needed.  This is slightly better than
      copying the code, since we now need it in three places
      (ghc/utils/runghc is the 3rd).
      41b1011d
  20. 16 Mar, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-03-16 11:39:50 by simonmar] · 72f7be33
      simonmar authored
      Remove all known hacks in rawSystem:
      
        - no splitting of the program name using toArgs
      
        - no avoiding translate when the string already appears to be quoted
      
        - no avoiding translate for the command name
      
      We now keep separate program name & args for various SysTools
      programs: gcc, as, ld, mkdll.
      
      MERGE TO STABLE
      72f7be33
  21. 24 Feb, 2004 1 commit
  22. 12 Feb, 2004 1 commit
  23. 02 Feb, 2004 1 commit
  24. 28 Jan, 2004 1 commit
    • simonpj's avatar
      [project @ 2004-01-28 10:04:25 by simonpj] · 4a9c5b7e
      simonpj authored
      ---------------------------------------
        	 Fix the WinME/98/95 double-backslash bug
      	  ---------------------------------------
      
      		Merge to stable branch, at least
      		once we are sure it's right
      
      Backslashes should not be escaped in command-line arguments for rawSystem,
      on Win32.  This only actually causes failures on WinME/98/95, and we can't
      test that since we don't have it.  But this fix seems right regardless.
      
      There are extensive new comments in libraries/base/System/Cmd.hs which
      describe the issues.
      4a9c5b7e
  25. 27 Jan, 2004 1 commit
  26. 09 Jan, 2004 1 commit
  27. 17 Dec, 2003 1 commit
  28. 17 Nov, 2003 1 commit
  29. 06 Nov, 2003 1 commit
  30. 22 Oct, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-10-22 14:31:09 by simonmar] · 948e7f38
      simonmar authored
      - In GHCi & Template Haskell, give a warning for things mentioned
        on the command line that we don't recognise, and then ignore them.
        In batch mode, these are still passed to the linker as before.
      
      - Clean up & rename the filename-suffix recognising functions in
        DriverPhases. There's probably a better place for these, but I've left
        them where they are for now.
      948e7f38
  31. 20 Aug, 2003 1 commit
  32. 18 Jul, 2003 2 commits
    • simonmar's avatar
      [project @ 2003-07-18 12:55:06 by simonmar] · 36265a1a
      simonmar authored
      oops, remove excess baggage in previous commit
      36265a1a
    • simonmar's avatar
      [project @ 2003-07-18 12:47:11 by simonmar] · 37ad132b
      simonmar authored
      Fix a blatant bug in cleanTempFilesExcept, which was causing
      legitimate source files to be deleted.  The previous fixes for this
      bug missed the real cause of the problem.
      
      I take full blame for this bug, which has been here since the dawn of
      GHCi (at least I traced it back to 5.00).
      37ad132b
  33. 17 Jul, 2003 1 commit
  34. 26 Jun, 2003 1 commit
    • sof's avatar
      [project @ 2003-06-26 21:55:46 by sof] · 536e2a02
      sof authored
      SysTools.removeTmpFiles:
        - never delete source files with a DriverPhases.haskellish_user_src_file
          file extension & loudly complain should the compiler attempt to do so.
      
          This is a protective measure against bugs elsewhere in the driver pipeline
          (cf., 'ghc-6.0 --make' deleting input files if specified using backward
           instead of forward slashes under win32.)
      536e2a02
  35. 24 Jun, 2003 1 commit
  36. 23 Jun, 2003 1 commit
    • sof's avatar
      [project @ 2003-06-23 19:40:21 by sof] · 67d41f03
      sof authored
      setTmpDir: canonicalise temp file paths under mingw:
        - convert backslashes into forward ones
        - drop trailing slash
        - translate /cygdrive/drive/path to drive:/path, coping with
          cygwin-centric settings for TMP or TEMP.
      67d41f03
  37. 14 Jun, 2003 1 commit
  38. 13 Jun, 2003 1 commit