1. 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.
    • 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.
    • 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.
    • 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>      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>   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.
    • simonmar's avatar
      [project @ 2003-07-18 12:55:06 by simonmar] · 36265a1a
      simonmar authored
      oops, remove excess baggage in previous commit
    • 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).
  2. 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).
    • simonmar's avatar
      [project @ 2003-07-17 08:59:03 by simonmar] · 2a86ebc2
      simonmar authored
      Update comments to match reality.
  3. 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.
    • 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
    • simonmar's avatar
      [project @ 2003-07-16 13:33:55 by simonmar] · daa4b9df
      simonmar authored
      Put a newline after showing an I/O error.
    • simonmar's avatar
      [project @ 2003-07-16 13:13:50 by simonmar] · c2e52617
      simonmar authored
      Respect -odir in one-shot compilations.
    • 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|)
  4. 15 Jul, 2003 1 commit
  5. 12 Jul, 2003 4 commits
  6. 11 Jul, 2003 1 commit
  7. 10 Jul, 2003 4 commits
  8. 09 Jul, 2003 3 commits
    • simonpj's avatar
      [project @ 2003-07-09 12:51:37 by simonpj] · ed5abcc9
      simonpj authored
      Remove redundant Var.hi-boot
    • simonpj's avatar
      [project @ 2003-07-09 11:08:03 by simonpj] · 983d2d8e
      simonpj authored
      	Wibble to GHCi constraint simplification
      The new GHCi constraint-simplification story, with defaulting for
      Show, Eq, Ord, should only apply to command-line expressions, not
      to modules loaded by GHCi.
      Hence new variant, TcSimplify.tcSimplifyInteractive
    • simonpj's avatar
      [project @ 2003-07-09 11:06:31 by simonpj] · f8031f57
      simonpj authored
      	Fix two External-Core bugs
      1.  An inadvertent "let x = ...x..." bug in TcRnDriver
      2.  Adjust the new -main-is story, so that the root module is called
      	":Main" instead of "$Main".
          This means that the z-encoded module name is "ZCMain" rather than "zdMain",
          which in keeps the External-Core lexer happy.  And is more consistent generally.
      3.  Make the renamer happy to see definitions from modules other than the "home" one,
          when doing External Core.  In the main module, there'll be a definition for
  9. 03 Jul, 2003 6 commits
    • simonpj's avatar
      [project @ 2003-07-03 16:22:16 by simonpj] · 38c8801e
      simonpj authored
      	Type defaulting in GHCi
      	[Merge to stable branch, I think.]
      [Part 2 to this commit: add Eq and Ord, to allow
      	[] == []
      at the prompt.
            Extend type defaulting in GHCi so that
      	ghci>  []
            works.  Suggested by Ralf Hinze.
    • sof's avatar
      [project @ 2003-07-03 15:14:56 by sof] · 18340925
      sof authored
      New primop (mingw only),
        asyncDoProc# :: Addr# -> Addr# -> State# RealWorld-> (# State# RealWorld, Int#, Int# #)
      which lets a Haskell thread hand off a pointer to external code (1st arg) for
      asynchronous execution by the RTS worker thread pool. Second arg is data passed
      in to the asynchronous routine. The routine is _not_ permitted to re-enter
      the RTS as part of its execution.
    • simonpj's avatar
      [project @ 2003-07-03 14:33:18 by simonpj] · 5affd811
      simonpj authored
      	Type defaulting in GHCi
      	[Merge to stable branch, I think.]
      Extend type defaulting in GHCi so that
      	ghci>  []
      works.  Suggested by Ralf Hinze.
    • simonpj's avatar
      [project @ 2003-07-03 14:32:30 by simonpj] · 6a1c0fe4
      simonpj authored
      Add pointer to TH home page
    • simonpj's avatar
      [project @ 2003-07-03 10:55:41 by simonpj] · 5bb5efc2
      simonpj authored
      Trim more imports
    • simonpj's avatar
      [project @ 2003-07-03 10:35:37 by simonpj] · c7b2a8e7
      simonpj authored
      Dont report assert as unused; merge to stable
  10. 02 Jul, 2003 5 commits
    • ross's avatar
      [project @ 2003-07-02 19:41:20 by ross] · 3cf18a53
      ross authored
      import fix
    • simonpj's avatar
      [project @ 2003-07-02 14:59:00 by simonpj] · 05afb748
      simonpj authored
      Some random import trimming
    • stolz's avatar
      [project @ 2003-07-02 13:57:10 by stolz] · e34efb98
      stolz authored
      autoconf probably knows best about vfork()
    • simonpj's avatar
      [project @ 2003-07-02 13:18:24 by simonpj] · 96fd092f
      simonpj authored
      Fixes two minor bugs that I came across in the old
      CgCase code generation:
      1. We were generating
      	tmp = Sp[1]
      	... more uses of Sp[1]....
      instead of
      	tmp = Sp[1]
      	... more uses of tmp....
      in the (case v of ...prim alts...) situation
      2. The cost-centre restoration wasn't right for let-no-escapes
      I kept this fix separate, becuase it does change the code generated
    • simonpj's avatar
      [project @ 2003-07-02 13:12:33 by simonpj] · 3f5e4368
      simonpj authored
             Tidy up the code generator
      The code generation for 'case' expressions had grown
      huge and gnarly.  This commit removes about 120 lines of
      code, and makes it a lot easier to read too. I think the code
      generated is identical.
      Part of this was to simplify the StgCase data type, so
      that it is more like the Core case: there is a simple list
      of alternatives, and the DEFAULT (if present) must be the
      first.  This tidies and simplifies other Stg passes.
  11. 01 Jul, 2003 3 commits