1. 23 Jul, 2003 5 commits
  2. 22 Jul, 2003 5 commits
  3. 21 Jul, 2003 9 commits
    • simonmar's avatar
      [project @ 2003-07-21 15:24:42 by simonmar] · 3092faa7
      simonmar authored
      Update the documentation for filenames and related options to reflect
      the new story.  Now we talk about hierarchical modules from the
      outset, and hopefully the whole description is somewhat clearer than
      before.
      3092faa7
    • ross's avatar
      [project @ 2003-07-21 15:14:18 by ross] · 3a223cd2
      ross authored
      Check for unknown flags before (rather than after) checking -o and -ohi
      flags, avoiding confusing behaviour like
      
      % ghc -bad-option -c x.hs
      ghc-6.0: unrecognised flags: -bad-option
      
      % ghc -bad-option -c x.hs -ohi x.hi
      ghc-6.0: -ohi can only be used when compiling a single source file
      Usage: For basic information, try the `--help' option.
      
      % ghc -bad-option -c x.hs -o x.o
      ghc-6.0: can't apply -o to multiple source files
      Usage: For basic information, try the `--help' option.
      
      (looks better with scores of flags)
      
      please merge to STABLE
      3a223cd2
    • simonmar's avatar
      [project @ 2003-07-21 15:05:54 by simonmar] · 665b340a
      simonmar authored
      We use NULL in the headers (at least when -prof is on), so we better
      #include <stdlib.h>.  We normally get it via HsBase.h anyway, but we
      shouldn't rely on that.
      665b340a
    • simonmar's avatar
      [project @ 2003-07-21 14:50:32 by simonmar] · 0d3f3deb
      simonmar authored
      Document that changing directories unloads all modules.
      0d3f3deb
    • simonmar's avatar
      [project @ 2003-07-21 14:33:19 by simonmar] · 95f1b72e
      simonmar authored
      :cd now causes all modules to be unloaded.
      
      This is the easy fix for a problem whereby changing directories will
      cause GHC to try to demand-load objects from the wrong place, because
      it is using relative pathnames.
      
      It's not obvious what the "right" thing to do is if the user changes
      directory with :cd and then does a :reload.  Perhaps the right thing
      to do is to make the search path "sticky", so that it stays relative
      to the original current directory.  This would probably require some
      re-engineering of GHC to only use absolute paths internally.
      95f1b72e
    • simonmar's avatar
      [project @ 2003-07-21 14:28:02 by simonmar] · a38fed41
      simonmar authored
      Comment out the warning about filenames not matching module names.
      a38fed41
    • simonmar's avatar
      [project @ 2003-07-21 11:45:47 by simonmar] · 3087014a
      simonmar authored
      Add support for the new AWAKEN_BQ_CLOSURE macro to the NCG.  Fixes
      broken HEAD builds.
      3087014a
    • simonpj's avatar
      [project @ 2003-07-21 11:06:22 by simonpj] · b8554efd
      simonpj authored
      More on rules and specialisations
      b8554efd
    • simonmar's avatar
      [project @ 2003-07-21 11:01:06 by simonmar] · 16f04e14
      simonmar authored
      When restoring the cost centre in a let-no-escape, don't free the
      stack slot containing it.  We might need the saved cost centre again
      for a recursive call to this let-no-escape.
      
      Should fix profiling a bit more.
      16f04e14
  4. 20 Jul, 2003 2 commits
  5. 18 Jul, 2003 6 commits
    • simonmar's avatar
      [project @ 2003-07-18 16:31:27 by simonmar] · a6e9efb2
      simonmar authored
      Restoring of cost centre in let-no-escape: we need to do this after
      binding the args to stack locations, otherwise we end up grabbing the
      wrong slot.
      
      Should hopefully fix profiling crashes.  We still don't pay any
      attention to the cost centre attached to the let-no-escape binding
      itself, which looks wrong, but I don't intend to do anything about
      that right now.
      a6e9efb2
    • simonmar's avatar
      [project @ 2003-07-18 14:39:05 by simonmar] · 7ede37c9
      simonmar authored
      When doing update-in-place, there is a (small) chance that the thunk
      may have been blackholed and another thread might be waiting on it.
      We can't therefore just splat it with the value; we have to check
      whether it is a blocking queue and awaken any threads that might be
      waiting on it if so.
      
      Should fix the scavenge_mutable_list crash reported recently.  If it
      does, it will be merged to STABLE.
      7ede37c9
    • simonmar's avatar
      [project @ 2003-07-18 13:25:55 by simonmar] · 17b0047a
      simonmar authored
      We don't need hacky filename comparisons in ppFilesFromSummaries now
      that the real bug in SysTools has been fixed.
      17b0047a
    • simonmar's avatar
      [project @ 2003-07-18 13:18:06 by simonmar] · 2d532e45
      simonmar authored
      Revision to the filename policy changes of yesterday.  This fixes the
      broken stage2 and library builds.
      
      The new story is this:
      
        A Haskell source filename should take the form
      
      	<path>/<basename>.<extension>
      
        where
      
      	<path>      is any directory
      	<basename>  is the name of the module, with dots replaced by slashes.
      	<extension> is ".hs" or ".lhs".
      
        given a source filename in this form, GHC will produce object and
        interface files named respectively:
      
              <hidir>/<basename>.<hisuf>
      	<odir>/<basename>.<osuf>
      
        where
      
      	<hidir>   is the value of the -hidir flag, if one was given, or
      		  the value of <path> from the source file otherwise.
      
      	<odir>    the same, for the -odir flag.
      
              <osuf>	  the object suffix (settable with the -osuf flag)
      	<hisuf>   the hi suffix (settable with the -hisuf flag)
      
      For example, if I have a module A.B.C, in source file foo/A/B/C.hs,
      then GHC will create foo/A/B/C.hi and foo/A/B/C.o.
      
      If GHC is given a source filename which is *not* of the form
      <path>/<basename>.<extension>, then it uses a different strategy.
      This happens if the filename does not follow the module name.  In this
      case, GHC will set <path> to be the directory in which the source file
      resides, and <basename> to the module name with dots replaced by
      slashes, and then use the rules above.
      
      For example, if we put module A.B.C in foo/bar/baz.hs, then GHC will
      produce foo/bar/A/B/C.o and foo/bar/A/B/C.hi.
      2d532e45
    • 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
  6. 17 Jul, 2003 2 commits
    • simonmar's avatar
      [project @ 2003-07-17 12:04:50 by simonmar] · 6677029a
      simonmar authored
      Filename-related cleanup & fixes
      --------------------------------
      
      This commit rationalises some of our filename policies.  The new story
      is this:
      
        When compiling a Haskell module A.B.C:
      
          The object file is placed in <obj-path>/A/B/C.o
          The interface file is placed in <hi-path>/A/B/C.hi
      
          Where <objpath> is
      	- the argument of the -odir flag, if one was given
      	- the element of the search path in which the source file was found,
      	  when in --make mode.
      	- "." otherwise.
      
          Where <hipath> is
      	- the argument of the -hidir flag, if one was given
      	- the element of the search path in which the source file was found,
      	  when in --make mode.
      	- "." otherwise.
      
      NOTE, in particular, that the name of the source file has no bearing
      on the name of the object or interface file any more.  This is a
      nchange from the previous semantics, where the name of the object file
      would, under certain circumstances, follow the name of the source file.
      
      eg. before, if you said
      
      	ghc -c dir/foo.hs
      
      you would get dir/foo.o.  Now, you get something like Main.o,
      depending on what module is in foo.hs.  This means that the driver
      pipeline machinery now needs to pass around a Maybe ModLocation, which
      is filled in by the Hsc phase and used later on to figure out the name
      of the object file (this was fairly painful, but seems to be the only
      way to get the right behaviour).
      6677029a
    • simonmar's avatar
      [project @ 2003-07-17 08:59:03 by simonmar] · 2a86ebc2
      simonmar authored
      Update comments to match reality.
      2a86ebc2
  7. 16 Jul, 2003 5 commits
    • sof's avatar
      [project @ 2003-07-16 17:40:38 by sof] · 788897b6
      sof authored
      - change prototype of async proc calls to
      
            typedef int (*DoProcProc)(void *param);
      
        i.e., have the proc return a result. Turned out that almost all
        uses of the primop ended up encoding a result via their 'param'.
      
      - when adding new I/O requests, shorten the time the IOManager
        lock is held. Helps to keep down the size of the thread pool.
      788897b6
    • sof's avatar
      [project @ 2003-07-16 15:27:36 by sof] · 3a3acbf4
      sof authored
      ppFilesFromSummaries.toPpFile: make it clear that file paths are being eq-tested here
      3a3acbf4
    • simonmar's avatar
      [project @ 2003-07-16 13:33:55 by simonmar] · daa4b9df
      simonmar authored
      Put a newline after showing an I/O error.
      daa4b9df
    • simonmar's avatar
      [project @ 2003-07-16 13:13:50 by simonmar] · c2e52617
      simonmar authored
      Respect -odir in one-shot compilations.
      c2e52617
    • ross's avatar
      [project @ 2003-07-16 08:49:01 by ross] · 98232a61
      ross authored
      Arrow notation: add a new (more primitive) form of command:
      
      	cmd ::= ... | cmd aexp
      
      analogous to ordinary application, and also represented using HsApp.
      To avoid an overlap, the syntax for combining forms is changed to
      
      	(|aexp cmd1 ... cmdn|)
      98232a61
  8. 15 Jul, 2003 1 commit
  9. 12 Jul, 2003 4 commits
  10. 11 Jul, 2003 1 commit