1. 24 Oct, 2001 7 commits
    • simonmar's avatar
      [project @ 2001-10-24 09:43:47 by simonmar] · 4d6959b1
      simonmar authored
      Detect whether the local 'ld' command supports -x, and only use the
      flag if it does.
      4d6959b1
    • simonpj's avatar
      [project @ 2001-10-24 08:38:03 by simonpj] · 0a0b7155
      simonpj authored
      ----------------------------------------------
      	Several improvements to demand analysis
      	----------------------------------------------
      
      * Make the demand analyser cleverer about strict CPR-able thunks.
        Detailed comments in DmdAnal.mk_sig_ty.ignore_cpr_info.
      
      * Make the demand analyser cleverer about CPR info for case
        binders.  E.g.
      	case x of { (True,b) -> x;
      		    (False,b) -> (b,False) }
        Here, the expression *does* have the CPR property, because
        the lone use of x is inside a case.
      
      * Move the unsafePerformIO HACK from WorkWrap into here
        (where is is very slightly less awful).
      0a0b7155
    • simonpj's avatar
      [project @ 2001-10-24 08:35:51 by simonpj] · 632e7726
      simonpj authored
      Cosmetica
      632e7726
    • simonpj's avatar
      [project @ 2001-10-24 08:34:53 by simonpj] · e67b70d8
      simonpj authored
      Part of previous WorkWrap commit
      e67b70d8
    • simonpj's avatar
      [project @ 2001-10-24 08:34:04 by simonpj] · 10edb6aa
      simonpj authored
      Add strictness info for constructor wrappers
      10edb6aa
    • simonpj's avatar
      [project @ 2001-10-24 08:33:25 by simonpj] · 566075c3
      simonpj authored
      -------------------------
      	Implement thunk splitting
      	-------------------------
      
      This is a rather nice transformation that I found when
      optimising some nofib programs.
      
      
      Suppose x is used strictly (never mind whether it has the CPR
      property).
      
            let
      	x* = x-rhs
            in body
      
      splitThunk transforms like this:
      
            let
      	x* = case x-rhs of { I# a -> I# a }
            in body
      
      Now simplifier will transform to
      
            case x-rhs of
      	I# a ->	let x* = I# b
      	        in body
      
      which is what we want. Now suppose x-rhs is itself a case:
      
      	x-rhs = case e of { T -> I# a; F -> I# b }
      
      The join point will abstract over a, rather than over (which is
      what would have happened before) which is fine.
      
      Notice that x certainly has the CPR property now!
      
      In fact, splitThunk uses the function argument w/w splitting
      function, so that if x's demand is deeper (say U(U(L,L),L))
      then the splitting will go deeper too.
      
      
      
      ** On the way, I tidied up some of the code in WwLib.
      566075c3
    • simonpj's avatar
      [project @ 2001-10-24 08:20:03 by simonpj] · b692d4c0
      simonpj authored
      (DON'T MERGE)
      
      Fix mkAtomicArgs so that it works.  It was greviously wrong,
      leaving things like
      
      	x = I# (negateInt# y)
      
      without ANF-ing them.
      b692d4c0
  2. 23 Oct, 2001 25 commits
    • sof's avatar
      [project @ 2001-10-23 22:25:46 by sof] · 1181f398
      sof authored
      Deleted HsVersions.h #defines that were now past their use-by-dates; in
      particular, make the assumption that a post-Haskell 1.4 compiler is now
      used to compile ghc/compiler/
      
      Hanging on to those FastString #defines is probably not worth it any longer,
      either, but I punted on making that (much bigger) change.
      1181f398
    • sof's avatar
      [project @ 2001-10-23 22:20:33 by sof] · 98f31190
      sof authored
      qualify use of >> when compiling action which turns off buffering for std handles
      98f31190
    • sof's avatar
      [project @ 2001-10-23 20:56:39 by sof] · 82069829
      sof authored
      - ifaceTyThing: avoid using (++) when constructing the IdInfo for AnId - Maybe
                      is preferable for this.
      - misc typesig tidy-ups to make easier to get into the workings of the
        functions herein.
      82069829
    • sof's avatar
      [project @ 2001-10-23 17:18:38 by sof] · 827f5f42
      sof authored
      - flushEverything: replaced bogus defn with something less crufty.
      - float OPTIONS pragmas to the top; as was, they were ineffective.
        (it might just be a good idea for whoever put in the code which calls
         upon the RTS-local getAllocations() and revertCAFs() to bring some
         protos into scope, if robust software is the goal of this enterprise...)
      827f5f42
    • rrt's avatar
      [project @ 2001-10-23 16:47:30 by rrt] · 564725dd
      rrt authored
      Don't bother making ghc.bat any more as we don't need it (ghc.exe works
      fine).
      
      Tidy up a typo.
      564725dd
    • rrt's avatar
      [project @ 2001-10-23 16:33:27 by rrt] · 4865bc8c
      rrt authored
      Correct a typo.
      4865bc8c
    • rrt's avatar
      [project @ 2001-10-23 16:32:30 by rrt] · 33aea700
      rrt authored
      Install the right stuff in the right place on Windows.
      33aea700
    • rrt's avatar
      [project @ 2001-10-23 16:31:37 by rrt] · 37cb7a37
      rrt authored
      Install in the right place on Windows.
      37cb7a37
    • rrt's avatar
      [project @ 2001-10-23 16:31:05 by rrt] · 38bc64b6
      rrt authored
      Install in the right place for Windows.
      38bc64b6
    • rrt's avatar
      [project @ 2001-10-23 15:37:09 by rrt] · 03c71500
      rrt authored
      Remove "Global option flags for utilities", as these are in config.mk, and
      should only be there (secundum SDM).
      03c71500
    • rrt's avatar
      [project @ 2001-10-23 14:53:14 by rrt] · 9e4c9122
      rrt authored
      Document make install-docs.
      9e4c9122
    • rrt's avatar
      [project @ 2001-10-23 14:50:59 by rrt] · b3896648
      rrt authored
      Document the use of SGMLDocWays to build the documentation.
      b3896648
    • rrt's avatar
      [project @ 2001-10-23 14:46:25 by rrt] · de412577
      rrt authored
      Use the new doc-building/installing infrastructure.
      de412577
    • rrt's avatar
      [project @ 2001-10-23 14:45:32 by rrt] · 51cb6efa
      rrt authored
      List the values that can go in SGMLDocWays.
      51cb6efa
    • rrt's avatar
      [project @ 2001-10-23 14:41:12 by rrt] · 1125663a
      rrt authored
      Since you can only have one SGML_DOC per directory, may as well only
      have one INSTALL_SGML_DOC too. Remove the machinery for handling more
      than one.
      1125663a
    • rrt's avatar
      [project @ 2001-10-23 14:35:12 by rrt] · e940363a
      rrt authored
      When an SGML doc "foo" is built as HTML, touch "foo.html", so that the
      build system can tell it has been built.
      e940363a
    • rrt's avatar
      [project @ 2001-10-23 14:34:24 by rrt] · 60d2f334
      rrt authored
      Add rules for building and installing documentation. The story is as
      follows:
      
      GhcDocWays is set to a list of ways to build SGML docs (typically in
      build.mk; it defaults to empty).
      SGML_DOC = foo causes foo to be built for each way.
      SGML_INSTALL_DOCS are then installed for each way;
      INSTALL_DOCS are just taken as literal filenames.
      make install-docs causes documents to be installed.
      
      Also some other clearups:
      
      Use $(if ...) where a comment lamented its non-existence.
      Remove a comment about a "weird" use of exit which has vanished.
      60d2f334
    • rrt's avatar
      [project @ 2001-10-23 13:29:54 by rrt] · 1d4e6ab6
      rrt authored
      Add SGMLDocWays (to say which ways SGML docs should be
      built). Defaults to empty (hence no effect).
      1d4e6ab6
    • 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
        Deadlocked.
        Prelude>
      17547204
    • simonmar's avatar
      [project @ 2001-10-23 11:30:07 by simonmar] · 3ea729f0
      simonmar authored
      Add new function:
      
        rts_evalStableIO (HsStablePtr s, /*out*/HsStablePtr *ret)
      
      which is a version of rts_evalStrictIO() that can be invoked from
      Haskell.
      3ea729f0
    • simonmar's avatar
      [project @ 2001-10-23 11:28:51 by simonmar] · aa328192
      simonmar authored
      Set the return value of a main thread to NULL when it wouldn't
      otherwise be set to anything useful.
      aa328192
    • simonmar's avatar
      [project @ 2001-10-23 11:28:02 by simonmar] · 983bbf83
      simonmar authored
      getStablePtr() is a useful function outside of the RTS, so move it to
      the non-private section.
      983bbf83
    • simonmar's avatar
      [project @ 2001-10-23 10:54:14 by simonmar] · bc80cec8
      simonmar authored
      We should really delete the main thread in a deadlock situation,
      otherwise if we somehow recover it might stay in the system
      indefinitely.
      bc80cec8
    • simonpj's avatar
      [project @ 2001-10-23 08:58:30 by simonpj] · 32eebc97
      simonpj authored
      -------------------------------
      	Correct a nasty lub bug
      	-------------------------------
      
      	MERGE WITH STABLE BRANCH
      
      Peter Sestoft discovered that lub wasn't commutative.
      We certainly want that
      
      	Err `lub` Abs = Lazy
      
      This is a Real Bug.
      32eebc97
    • simonpj's avatar
      [project @ 2001-10-23 08:56:50 by simonpj] · f8a58611
      simonpj authored
      Use elemRdrEnv
      f8a58611
  3. 22 Oct, 2001 8 commits