ghc-hetmet.git
22 years ago[project @ 2001-10-27 22:05:48 by sof]
sof [Sat, 27 Oct 2001 22:05:48 +0000 (22:05 +0000)]
[project @ 2001-10-27 22:05:48 by sof]
Added Show instance for Concurrent.ThreadId; useful when
debugging/diagnosing.

22 years ago[project @ 2001-10-27 21:44:54 by sof]
sof [Sat, 27 Oct 2001 21:44:55 +0000 (21:44 +0000)]
[project @ 2001-10-27 21:44:54 by sof]
Move extern declaration for 'environ' from Stg.h into HsPosix.h

22 years ago[project @ 2001-10-26 11:59:36 by sewardj]
sewardj [Fri, 26 Oct 2001 11:59:36 +0000 (11:59 +0000)]
[project @ 2001-10-26 11:59:36 by sewardj]
merge from stable, revs:

  1.41.4.1  +4 -1      fptools/ghc/compiler/nativeGen/AbsCStixGen.lhs
  1.61.4.3  +10 -0     fptools/ghc/driver/mangler/ghc-asm.lprl

  Place a zero word after each reversed vector table, so that the vtbl
  label is really in the section we would like to claim it is in.  This
  is needed for the GC to work correctly.  Fixes a GHCi segfault
  reported by Ryszard Kubiak.

  1.41.4.2  +7 -0      fptools/ghc/compiler/nativeGen/AbsCStixGen.lhs
  1.61.4.4  +18 -0     fptools/ghc/driver/mangler/ghc-asm.lprl

  Add comments, much longer than the fix itself, giving explaination
  for yesterday's dummy-word-after-vtbl fix.

22 years ago[project @ 2001-10-26 11:53:34 by sewardj]
sewardj [Fri, 26 Oct 2001 11:53:34 +0000 (11:53 +0000)]
[project @ 2001-10-26 11:53:34 by sewardj]
merge from stable, revs:

  1.74.4.1  +12 -11    fptools/ghc/compiler/nativeGen/MachCode.lhs
  1.30.4.1  +23 -0     fptools/ghc/compiler/nativeGen/Stix.lhs
  1.70.4.1  +2 -5      fptools/ghc/compiler/nativeGen/StixPrim.lhs

  Route all NCG panics to do with missing primop implementations and any
  other panic which could be caused by compiling legitimate sources
  through the function Stix.ncgPrimopMoan.  This emits a helpful message
  explaining what has happened, advises the use of -fvia-C as a
  workaround, and says please mail us.

22 years ago[project @ 2001-10-26 11:49:19 by sewardj]
sewardj [Fri, 26 Oct 2001 11:49:19 +0000 (11:49 +0000)]
[project @ 2001-10-26 11:49:19 by sewardj]
merge from stable, rev 1.23.4.1:

  Win32 only: implement sane failure semantics + message when out of
  memory, rather than continuing and allowing the rest of the system
  to seg out.  Also, increase the 128M limit to 256M.

  This allegedly fixes the Antony Courtney Win32 segfault.

22 years ago[project @ 2001-10-26 11:33:13 by sewardj]
sewardj [Fri, 26 Oct 2001 11:33:13 +0000 (11:33 +0000)]
[project @ 2001-10-26 11:33:13 by sewardj]
merge from stable, rev 1.60.2.10:

  Implement a debugging aid: look in GHCi's object symbol tables for
  symbols within DELTA bytes of the specified address, and show their
  names.  Only compiled with -DDEBUG.  The new fn is called ghci_enquire
  and you can call it from within a gdb session.

22 years ago[project @ 2001-10-26 05:31:05 by sof]
sof [Fri, 26 Oct 2001 05:31:05 +0000 (05:31 +0000)]
[project @ 2001-10-26 05:31:05 by sof]
pipeLoop: Handle pipelines that end with ineffective
final stages (e.g., CPP and/or PP) correctly. i.e.,
need to copy the outcome of the pipeline into the
expected output file, since the final stage didn't.

22 years ago[project @ 2001-10-26 00:53:56 by sof]
sof [Fri, 26 Oct 2001 00:53:56 +0000 (00:53 +0000)]
[project @ 2001-10-26 00:53:56 by sof]
Custom pre-processor documentation

22 years ago[project @ 2001-10-26 00:53:27 by sof]
sof [Fri, 26 Oct 2001 00:53:27 +0000 (00:53 +0000)]
[project @ 2001-10-26 00:53:27 by sof]
Added support for a custom pre-processor pass:

  ghc -F -pgmF/path/to/a/pre/processor ...

will now run /path/to/a/pre/processor over Haskell
input sources. It is positioned in the compilation
pipeline just before the compiler proper, but after
unlit'ing and CPP'ing. The pre-processor is passed
the following command-line when invoked:

   /path/to/a/pre/processor orig_input_source_file_path
        input_source_file
    output_source_file
    <other options>

Additionally options can be fed directly to the
pre-processor via -optF<option> options.

The -F option causes the pre-processor to run _iff_ one
has been specified via -pgmF (there's some redundancy
here, but I went for this cmd-line interface as it's
consistent with the general -pgm<Foo> story).

Motivation:

 * hooking in a pre-processor is occasionally useful;
   e.g., cheap&cheerful way to integrate language
   extensions with GHC, compile-time syntax/style
   checking etc.

 * Artfully re-using the CPP phase (by specifying your
   own via -pgmP) doesn't really work as the driver
   really assumes that GNU cpp is what's being invoked
   (and path mangling is also performed on Win32 platforms).

   Additionally, there are cases when you want to be
   able to run CPP _and_ a pre-processor.

 * The alternative of running the pre-processor as a
   separate program in a Makefile (say) doesn't work
   in interpreted mode, and this approach also forces
   you to give up on recompilation checking when in
   batch mode.

22 years ago[project @ 2001-10-25 14:50:00 by rrt]
rrt [Thu, 25 Oct 2001 14:50:00 +0000 (14:50 +0000)]
[project @ 2001-10-25 14:50:00 by rrt]
Tidy up after my assumption-busting.

22 years ago[project @ 2001-10-25 14:48:26 by rrt]
rrt [Thu, 25 Oct 2001 14:48:26 +0000 (14:48 +0000)]
[project @ 2001-10-25 14:48:26 by rrt]
Why should pdfjadetex be in the same directory as Jade? Make the much
less silly assumption that it's on the PATH.

22 years ago[project @ 2001-10-25 14:30:43 by simonpj]
simonpj [Thu, 25 Oct 2001 14:30:43 +0000 (14:30 +0000)]
[project @ 2001-10-25 14:30:43 by simonpj]
-------------------------------------------------------
  Correct an error in the handling of implicit parameters
  -------------------------------------------------------

MERGE WITH STABLE BRANCH UNLESS HARD TO DO

Mark Shields discovered a bug in the way that implicit parameters
are dealt with by the type checker.  It's all a bit subtle, and
is extensively documented in TcSimplify.lhs.

This commit makes the code both simpler and more correct.  It subtly
changes the way in which type signatures are treated, but not in a way
anyone would notice: see notes with "Question 2: type signatures"
in TcSimplify.lhs.

22 years ago[project @ 2001-10-25 12:56:54 by rrt]
rrt [Thu, 25 Oct 2001 12:56:54 +0000 (12:56 +0000)]
[project @ 2001-10-25 12:56:54 by rrt]
Renumber tuples (decrement by one) to conform to new primop naming scheme.

22 years ago[project @ 2001-10-25 12:55:18 by rrt]
rrt [Thu, 25 Oct 2001 12:55:18 +0000 (12:55 +0000)]
[project @ 2001-10-25 12:55:18 by rrt]
ILX fixes to get the standard library to build and verify.

22 years ago[project @ 2001-10-25 11:47:03 by simonmar]
simonmar [Thu, 25 Oct 2001 11:47:03 +0000 (11:47 +0000)]
[project @ 2001-10-25 11:47:03 by simonmar]
-Wall cleanup:

  - move some imports inside #ifdef GHCI
  - remove some unused bindings

22 years ago[project @ 2001-10-25 11:37:49 by simonmar]
simonmar [Thu, 25 Oct 2001 11:37:49 +0000 (11:37 +0000)]
[project @ 2001-10-25 11:37:49 by simonmar]
- only generate split markers if we're splitting
- remove a couple of unused imports

22 years ago[project @ 2001-10-25 10:00:05 by simonpj]
simonpj [Thu, 25 Oct 2001 10:00:05 +0000 (10:00 +0000)]
[project @ 2001-10-25 10:00:05 by simonpj]
Fix egregious bug in cloning

22 years ago[project @ 2001-10-25 09:59:39 by simonpj]
simonpj [Thu, 25 Oct 2001 09:59:40 +0000 (09:59 +0000)]
[project @ 2001-10-25 09:59:39 by simonpj]
Move defer from NewDemand to DmdAnal

22 years ago[project @ 2001-10-25 09:58:39 by simonpj]
simonpj [Thu, 25 Oct 2001 09:58:39 +0000 (09:58 +0000)]
[project @ 2001-10-25 09:58:39 by simonpj]
Cosmetica

22 years ago[project @ 2001-10-25 09:57:52 by simonpj]
simonpj [Thu, 25 Oct 2001 09:57:52 +0000 (09:57 +0000)]
[project @ 2001-10-25 09:57:52 by simonpj]
Attach arity info to generic to/from ids

22 years ago[project @ 2001-10-25 05:07:32 by sof]
sof [Thu, 25 Oct 2001 05:07:32 +0000 (05:07 +0000)]
[project @ 2001-10-25 05:07:32 by sof]
follow-on from prev. commit; more tidyups

22 years ago[project @ 2001-10-25 02:13:10 by sof]
sof [Thu, 25 Oct 2001 02:13:16 +0000 (02:13 +0000)]
[project @ 2001-10-25 02:13:10 by sof]
- Pet peeve removal / code tidyup, replaced various sub-optimal
  uses of 'length' with something a bit better, i.e., replaced
  the following patterns

   *  length as `cmpOp` length bs
   *  length as `cmpOp` val   -- incl. uses where val == 1 and val == 0
   *  {take,drop,splitAt} (length as) bs
   *  length [ () | pat <- as ]

  with uses of misc Util functions.

  I'd be surprised if there's a noticeable reduction in running
  times as a result of these changes, but every little bit helps.

  [ The changes have been tested wrt testsuite/ - I'm seeing a couple
    of unexpected breakages coming from CorePrep, but I'm currently
    assuming that these are due to other recent changes. ]

- compMan/CompManager.lhs: restored 4.08 compilability + some code
  cleanup.

None of these changes are HEADworthy.

22 years ago[project @ 2001-10-24 18:12:17 by rrt]
rrt [Wed, 24 Oct 2001 18:12:17 +0000 (18:12 +0000)]
[project @ 2001-10-24 18:12:17 by rrt]
$$j -> $$i (in tandem with other renaming). i.e., remove a spurion or two.

22 years ago[project @ 2001-10-24 17:15:25 by rrt]
rrt [Wed, 24 Oct 2001 17:15:25 +0000 (17:15 +0000)]
[project @ 2001-10-24 17:15:25 by rrt]
Separate installation of SGML docs and non-SGML docs. That should fix
it when there are either no docs of one sort or the other, or no
SGMLDocWays.

22 years ago[project @ 2001-10-24 17:11:59 by rrt]
rrt [Wed, 24 Oct 2001 17:11:59 +0000 (17:11 +0000)]
[project @ 2001-10-24 17:11:59 by rrt]
Only try installing SGML docs if SGMLDocWays is non-empty.

22 years ago[project @ 2001-10-24 16:27:59 by rrt]
rrt [Wed, 24 Oct 2001 16:27:59 +0000 (16:27 +0000)]
[project @ 2001-10-24 16:27:59 by rrt]
Fix typo.

22 years ago[project @ 2001-10-24 15:27:53 by simonpj]
simonpj [Wed, 24 Oct 2001 15:27:53 +0000 (15:27 +0000)]
[project @ 2001-10-24 15:27:53 by simonpj]
Wibble

22 years ago[project @ 2001-10-24 15:11:28 by simonpj]
simonpj [Wed, 24 Oct 2001 15:11:28 +0000 (15:11 +0000)]
[project @ 2001-10-24 15:11:28 by simonpj]
----------------
Division by zero
----------------

Teach GHC that the division primops can't fail if the divisor
is non-zero.  This can eliminate some thunks in an inner loop.

22 years ago[project @ 2001-10-24 14:17:29 by simonpj]
simonpj [Wed, 24 Oct 2001 14:17:29 +0000 (14:17 +0000)]
[project @ 2001-10-24 14:17:29 by simonpj]
Wibble again (sigh)

22 years ago[project @ 2001-10-24 14:05:09 by simonpj]
simonpj [Wed, 24 Oct 2001 14:05:09 +0000 (14:05 +0000)]
[project @ 2001-10-24 14:05:09 by simonpj]
Wibble

22 years ago[project @ 2001-10-24 13:48:09 by simonpj]
simonpj [Wed, 24 Oct 2001 13:48:09 +0000 (13:48 +0000)]
[project @ 2001-10-24 13:48:09 by simonpj]
Comments only

22 years ago[project @ 2001-10-24 13:47:22 by simonpj]
simonpj [Wed, 24 Oct 2001 13:47:22 +0000 (13:47 +0000)]
[project @ 2001-10-24 13:47:22 by simonpj]
Robustify arity calculation

22 years ago[project @ 2001-10-24 13:46:58 by simonpj]
simonpj [Wed, 24 Oct 2001 13:46:58 +0000 (13:46 +0000)]
[project @ 2001-10-24 13:46:58 by simonpj]
----------------------------------------------
Minor fix to occurrence analyer (don't merge)
----------------------------------------------

Wasn't dealing right with the case

x = e
y = foldr x

Here we don't want to inline x, because y is a PAP.

22 years ago[project @ 2001-10-24 13:45:37 by simonpj]
simonpj [Wed, 24 Oct 2001 13:45:37 +0000 (13:45 +0000)]
[project @ 2001-10-24 13:45:37 by simonpj]
NB: (Just a) `mplus` (Just b) = a

We want catMaybes, not mplus!

22 years ago[project @ 2001-10-24 10:07:57 by rrt]
rrt [Wed, 24 Oct 2001 10:07:57 +0000 (10:07 +0000)]
[project @ 2001-10-24 10:07:57 by rrt]
Better commenting.

22 years ago[project @ 2001-10-24 10:05:51 by rrt]
rrt [Wed, 24 Oct 2001 10:05:51 +0000 (10:05 +0000)]
[project @ 2001-10-24 10:05:51 by rrt]
Add install-docs target to top level.

22 years ago[project @ 2001-10-24 09:55:50 by rrt]
rrt [Wed, 24 Oct 2001 09:55:50 +0000 (09:55 +0000)]
[project @ 2001-10-24 09:55:50 by rrt]
Wemove WELEASE: thewe is no such fiwe.

22 years ago[project @ 2001-10-24 09:43:47 by simonmar]
simonmar [Wed, 24 Oct 2001 09:43:48 +0000 (09:43 +0000)]
[project @ 2001-10-24 09:43:47 by simonmar]
Detect whether the local 'ld' command supports -x, and only use the
flag if it does.

22 years ago[project @ 2001-10-24 08:38:03 by simonpj]
simonpj [Wed, 24 Oct 2001 08:38:03 +0000 (08:38 +0000)]
[project @ 2001-10-24 08:38:03 by simonpj]
----------------------------------------------
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).

22 years ago[project @ 2001-10-24 08:35:51 by simonpj]
simonpj [Wed, 24 Oct 2001 08:35:51 +0000 (08:35 +0000)]
[project @ 2001-10-24 08:35:51 by simonpj]
Cosmetica

22 years ago[project @ 2001-10-24 08:34:53 by simonpj]
simonpj [Wed, 24 Oct 2001 08:34:53 +0000 (08:34 +0000)]
[project @ 2001-10-24 08:34:53 by simonpj]
Part of previous WorkWrap commit

22 years ago[project @ 2001-10-24 08:34:04 by simonpj]
simonpj [Wed, 24 Oct 2001 08:34:04 +0000 (08:34 +0000)]
[project @ 2001-10-24 08:34:04 by simonpj]
Add strictness info for constructor wrappers

22 years ago[project @ 2001-10-24 08:33:25 by simonpj]
simonpj [Wed, 24 Oct 2001 08:33:25 +0000 (08:33 +0000)]
[project @ 2001-10-24 08:33:25 by simonpj]
-------------------------
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.

22 years ago[project @ 2001-10-24 08:20:03 by simonpj]
simonpj [Wed, 24 Oct 2001 08:20:03 +0000 (08:20 +0000)]
[project @ 2001-10-24 08:20:03 by simonpj]
(DON'T MERGE)

Fix mkAtomicArgs so that it works.  It was greviously wrong,
leaving things like

x = I# (negateInt# y)

without ANF-ing them.

22 years ago[project @ 2001-10-23 22:25:46 by sof]
sof [Tue, 23 Oct 2001 22:25:48 +0000 (22:25 +0000)]
[project @ 2001-10-23 22:25:46 by sof]
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.

22 years ago[project @ 2001-10-23 22:20:33 by sof]
sof [Tue, 23 Oct 2001 22:20:33 +0000 (22:20 +0000)]
[project @ 2001-10-23 22:20:33 by sof]
qualify use of >> when compiling action which turns off buffering for std handles

22 years ago[project @ 2001-10-23 20:56:39 by sof]
sof [Tue, 23 Oct 2001 20:56:39 +0000 (20:56 +0000)]
[project @ 2001-10-23 20:56:39 by sof]
- 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.

22 years ago[project @ 2001-10-23 17:18:38 by sof]
sof [Tue, 23 Oct 2001 17:18:38 +0000 (17:18 +0000)]
[project @ 2001-10-23 17:18:38 by sof]
- 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...)

22 years ago[project @ 2001-10-23 16:47:30 by rrt]
rrt [Tue, 23 Oct 2001 16:47:30 +0000 (16:47 +0000)]
[project @ 2001-10-23 16:47:30 by rrt]
Don't bother making ghc.bat any more as we don't need it (ghc.exe works
fine).

Tidy up a typo.

22 years ago[project @ 2001-10-23 16:33:27 by rrt]
rrt [Tue, 23 Oct 2001 16:33:27 +0000 (16:33 +0000)]
[project @ 2001-10-23 16:33:27 by rrt]
Correct a typo.

22 years ago[project @ 2001-10-23 16:32:30 by rrt]
rrt [Tue, 23 Oct 2001 16:32:30 +0000 (16:32 +0000)]
[project @ 2001-10-23 16:32:30 by rrt]
Install the right stuff in the right place on Windows.

22 years ago[project @ 2001-10-23 16:31:37 by rrt]
rrt [Tue, 23 Oct 2001 16:31:37 +0000 (16:31 +0000)]
[project @ 2001-10-23 16:31:37 by rrt]
Install in the right place on Windows.

22 years ago[project @ 2001-10-23 16:31:05 by rrt]
rrt [Tue, 23 Oct 2001 16:31:05 +0000 (16:31 +0000)]
[project @ 2001-10-23 16:31:05 by rrt]
Install in the right place for Windows.

22 years ago[project @ 2001-10-23 15:37:09 by rrt]
rrt [Tue, 23 Oct 2001 15:37:09 +0000 (15:37 +0000)]
[project @ 2001-10-23 15:37:09 by rrt]
Remove "Global option flags for utilities", as these are in config.mk, and
should only be there (secundum SDM).

22 years ago[project @ 2001-10-23 14:53:14 by rrt]
rrt [Tue, 23 Oct 2001 14:53:14 +0000 (14:53 +0000)]
[project @ 2001-10-23 14:53:14 by rrt]
Document make install-docs.

22 years ago[project @ 2001-10-23 14:50:59 by rrt]
rrt [Tue, 23 Oct 2001 14:50:59 +0000 (14:50 +0000)]
[project @ 2001-10-23 14:50:59 by rrt]
Document the use of SGMLDocWays to build the documentation.

22 years ago[project @ 2001-10-23 14:46:25 by rrt]
rrt [Tue, 23 Oct 2001 14:46:25 +0000 (14:46 +0000)]
[project @ 2001-10-23 14:46:25 by rrt]
Use the new doc-building/installing infrastructure.

22 years ago[project @ 2001-10-23 14:45:32 by rrt]
rrt [Tue, 23 Oct 2001 14:45:32 +0000 (14:45 +0000)]
[project @ 2001-10-23 14:45:32 by rrt]
List the values that can go in SGMLDocWays.

22 years ago[project @ 2001-10-23 14:41:12 by rrt]
rrt [Tue, 23 Oct 2001 14:41:12 +0000 (14:41 +0000)]
[project @ 2001-10-23 14:41:12 by rrt]
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.

22 years ago[project @ 2001-10-23 14:35:12 by rrt]
rrt [Tue, 23 Oct 2001 14:35:12 +0000 (14:35 +0000)]
[project @ 2001-10-23 14:35:12 by rrt]
When an SGML doc "foo" is built as HTML, touch "foo.html", so that the
build system can tell it has been built.

22 years ago[project @ 2001-10-23 14:34:24 by rrt]
rrt [Tue, 23 Oct 2001 14:34:24 +0000 (14:34 +0000)]
[project @ 2001-10-23 14:34:24 by rrt]
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.

22 years ago[project @ 2001-10-23 13:29:54 by rrt]
rrt [Tue, 23 Oct 2001 13:29:54 +0000 (13:29 +0000)]
[project @ 2001-10-23 13:29:54 by rrt]
Add SGMLDocWays (to say which ways SGML docs should be
built). Defaults to empty (hence no effect).

22 years ago[project @ 2001-10-23 11:42:21 by simonmar]
simonmar [Tue, 23 Oct 2001 11:42:22 +0000 (11:42 +0000)]
[project @ 2001-10-23 11:42:21 by simonmar]
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>

22 years ago[project @ 2001-10-23 11:30:07 by simonmar]
simonmar [Tue, 23 Oct 2001 11:30:07 +0000 (11:30 +0000)]
[project @ 2001-10-23 11:30:07 by simonmar]
Add new function:

  rts_evalStableIO (HsStablePtr s, /*out*/HsStablePtr *ret)

which is a version of rts_evalStrictIO() that can be invoked from
Haskell.

22 years ago[project @ 2001-10-23 11:28:51 by simonmar]
simonmar [Tue, 23 Oct 2001 11:28:51 +0000 (11:28 +0000)]
[project @ 2001-10-23 11:28:51 by simonmar]
Set the return value of a main thread to NULL when it wouldn't
otherwise be set to anything useful.

22 years ago[project @ 2001-10-23 11:28:02 by simonmar]
simonmar [Tue, 23 Oct 2001 11:28:02 +0000 (11:28 +0000)]
[project @ 2001-10-23 11:28:02 by simonmar]
getStablePtr() is a useful function outside of the RTS, so move it to
the non-private section.

22 years ago[project @ 2001-10-23 10:54:14 by simonmar]
simonmar [Tue, 23 Oct 2001 10:54:14 +0000 (10:54 +0000)]
[project @ 2001-10-23 10:54:14 by simonmar]
We should really delete the main thread in a deadlock situation,
otherwise if we somehow recover it might stay in the system
indefinitely.

22 years ago[project @ 2001-10-23 08:58:30 by simonpj]
simonpj [Tue, 23 Oct 2001 08:58:30 +0000 (08:58 +0000)]
[project @ 2001-10-23 08:58:30 by simonpj]
-------------------------------
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.

22 years ago[project @ 2001-10-23 08:56:50 by simonpj]
simonpj [Tue, 23 Oct 2001 08:56:50 +0000 (08:56 +0000)]
[project @ 2001-10-23 08:56:50 by simonpj]
Use elemRdrEnv

22 years ago[project @ 2001-10-22 22:55:31 by sof]
sof [Mon, 22 Oct 2001 22:55:31 +0000 (22:55 +0000)]
[project @ 2001-10-22 22:55:31 by sof]
Get rid off about half a dozen symbols from RTS_MINGW_ONLY_SYMBOLS;
some unnecessary, some redundant now that 'kernel32' is on the
default DLL search list for 'std'.

22 years ago[project @ 2001-10-22 22:41:02 by sof]
sof [Mon, 22 Oct 2001 22:41:02 +0000 (22:41 +0000)]
[project @ 2001-10-22 22:41:02 by sof]
std & mingw32: include 'kernel32' in extra_libraries

[btw, this config file needs a bit of work to have it work on a
i386-unknown-cygwin plat.]

22 years ago[project @ 2001-10-22 16:16:27 by simonmar]
simonmar [Mon, 22 Oct 2001 16:16:27 +0000 (16:16 +0000)]
[project @ 2001-10-22 16:16:27 by simonmar]
new commands:

:set args <arg> ...
:set prog <progname>

to set the results of System.getArgs and System.getProgName as seen by
the program.

22 years ago[project @ 2001-10-22 16:08:10 by simonmar]
simonmar [Mon, 22 Oct 2001 16:08:10 +0000 (16:08 +0000)]
[project @ 2001-10-22 16:08:10 by simonmar]
-fwarn-name-shadowing should check the global env as well as the local
env for names that could be shadowed (the docs don't say anything
about it applying to local names only).

22 years ago[project @ 2001-10-22 16:02:44 by sewardj]
sewardj [Mon, 22 Oct 2001 16:02:44 +0000 (16:02 +0000)]
[project @ 2001-10-22 16:02:44 by sewardj]
merge from stable, rev 1.60.2.9:

  Check for duplicate symbols when loading objects, and give up (with
  suitably helpful error msg) if duplicates are found.

22 years ago[project @ 2001-10-22 14:47:37 by simonmar]
simonmar [Mon, 22 Oct 2001 14:47:37 +0000 (14:47 +0000)]
[project @ 2001-10-22 14:47:37 by simonmar]
oops, need to look for source files in mkdependHS mode too.

22 years ago[project @ 2001-10-22 13:50:17 by simonpj]
simonpj [Mon, 22 Oct 2001 13:50:17 +0000 (13:50 +0000)]
[project @ 2001-10-22 13:50:17 by simonpj]
Make SimplGently a bit less gentle

22 years ago[project @ 2001-10-22 13:45:15 by simonmar]
simonmar [Mon, 22 Oct 2001 13:45:15 +0000 (13:45 +0000)]
[project @ 2001-10-22 13:45:15 by simonmar]
Default verbosity mode is always 1, and we don't print the
"Compiling ( foo.hs, foo.o )" message if we're in OneShot mode.

Fixes recently introduced problem where the "compilation IS NOT
required" message isn't printed at all in OneShot mode.

22 years ago[project @ 2001-10-22 11:37:45 by simonpj]
simonpj [Mon, 22 Oct 2001 11:37:45 +0000 (11:37 +0000)]
[project @ 2001-10-22 11:37:45 by simonpj]
-------------------------------
Correct a nasty existential bug
-------------------------------

MERGE WITH STABLE BRANCH

Thanks to Volker Stolz for finding this existential bug.
Again, it's amazing that it hasn't shown up before.
GHC 5.02 allows this utterly bogus program to get past
the type checker

  data DS = forall a. C (a -> Int)

  call (C f) arg = f arg

The existential-tyvar-escape check was wrong. Easily fixed, though.

tcfail099 now tests for this

22 years ago[project @ 2001-10-22 10:48:33 by simonmar]
simonmar [Mon, 22 Oct 2001 10:48:33 +0000 (10:48 +0000)]
[project @ 2001-10-22 10:48:33 by simonmar]
Describe how to use path searching in GHCi.

22 years ago[project @ 2001-10-22 10:33:50 by simonmar]
simonmar [Mon, 22 Oct 2001 10:33:50 +0000 (10:33 +0000)]
[project @ 2001-10-22 10:33:50 by simonmar]
Changes to the finder algorithm: in non-compilation-manager modes
(eg. ghc -c) we now search for .hi files only, because a source file
is no good to us.  In compilation manager modes, we now don't search
for .hi files in the home package at all.

22 years ago[project @ 2001-10-22 09:37:24 by simonpj]
simonpj [Mon, 22 Oct 2001 09:37:24 +0000 (09:37 +0000)]
[project @ 2001-10-22 09:37:24 by simonpj]
------------------------------------
Allow foralls in newtype-with-record
------------------------------------

MERGE WITH STABLE BRANCH

A simple fix to a longstanding omission.  The parser rejected

 newtype CPS a = CPS { unCPS :: forall ans . (a -> ans) -> ans }

because the production for "newconstr" said "type" instead of "ctype".

22 years ago[project @ 2001-10-22 09:05:26 by simonmar]
simonmar [Mon, 22 Oct 2001 09:05:26 +0000 (09:05 +0000)]
[project @ 2001-10-22 09:05:26 by simonmar]
import CLabe (isAsmTemp) for sparc/alpha (I guess someone removed the
import after a warning from -fwarn-unused-imports, so I've put the
import inside the relevant #ifdef this time).

22 years ago[project @ 2001-10-19 22:16:28 by qrczak]
qrczak [Fri, 19 Oct 2001 22:16:28 +0000 (22:16 +0000)]
[project @ 2001-10-19 22:16:28 by qrczak]
Typo.

22 years ago[project @ 2001-10-19 18:33:11 by qrczak]
qrczak [Fri, 19 Oct 2001 18:33:11 +0000 (18:33 +0000)]
[project @ 2001-10-19 18:33:11 by qrczak]
Clean mkDerivedConstantsHdr and mkNativeHdr.

22 years ago[project @ 2001-10-19 14:22:11 by simonpj]
simonpj [Fri, 19 Oct 2001 14:22:11 +0000 (14:22 +0000)]
[project @ 2001-10-19 14:22:11 by simonpj]
Try to get mkLocalOcc right

22 years ago[project @ 2001-10-19 11:47:18 by simonpj]
simonpj [Fri, 19 Oct 2001 11:47:18 +0000 (11:47 +0000)]
[project @ 2001-10-19 11:47:18 by simonpj]
Fix codegen globalisation for -split-objs

22 years ago[project @ 2001-10-19 11:44:08 by rrt]
rrt [Fri, 19 Oct 2001 11:44:08 +0000 (11:44 +0000)]
[project @ 2001-10-19 11:44:08 by rrt]
More notes about InstallShield. This is now a first draft of the
InstallShield notes; probably some bits have been left out, and I need
to fix make install to bring reality closer to document.

22 years ago[project @ 2001-10-19 11:16:16 by rrt]
rrt [Fri, 19 Oct 2001 11:16:16 +0000 (11:16 +0000)]
[project @ 2001-10-19 11:16:16 by rrt]
Say a bit about the way InstallShield should work. It doesn't yet, as
I have to finish fixing make install for Windows.

22 years ago[project @ 2001-10-19 10:09:27 by sewardj]
sewardj [Fri, 19 Oct 2001 10:09:27 +0000 (10:09 +0000)]
[project @ 2001-10-19 10:09:27 by sewardj]
merge from stable, rev 1.3.2.2:

Fix some mistakes and omissions, plus remove some caveats that seem no
longer to hold.

22 years ago[project @ 2001-10-19 10:04:37 by sewardj]
sewardj [Fri, 19 Oct 2001 10:04:37 +0000 (10:04 +0000)]
[project @ 2001-10-19 10:04:37 by sewardj]
merge from stable, rev 1.105.4.1:

  When not compiling via C, catch Casms in the typecheck and reject
  them in a civilised way rather than having the various back ends barf.

22 years ago[project @ 2001-10-19 10:02:50 by sewardj]
sewardj [Fri, 19 Oct 2001 10:02:50 +0000 (10:02 +0000)]
[project @ 2001-10-19 10:02:50 by sewardj]
merge from stable, revs:

  1.191.4.1 +2 -2      fptools/ghc/compiler/Makefile
  1.7.4.2   +38 -13    fptools/ghc/compiler/ghci/ByteCodeFFI.lhs
  1.58.4.2  +4 -3      fptools/ghc/compiler/ghci/ByteCodeGen.lhs
  1.25.4.1  +40 -10    fptools/ghc/compiler/ghci/ByteCodeLink.lhs

  Make the bytecode generation machinery print a helpful message if
  it has to give up due to lack of 64-bit support.

  Add various bits of supporting infrastructure for 64-bit values
  in the bytecode generator.  Making it all work is beyond the scope
  of a patchlevel release, so these are unused right now.

  1.25.4.2  +27 -7     fptools/ghc/compiler/ghci/ByteCodeLink.lhs

  Print a civilised and helpful error message if the bytecode linker
  should encounter a link failure.

  1.58.4.3  +6 -8      fptools/ghc/compiler/ghci/ByteCodeGen.lhs
  1.25.4.3  +1 -1      fptools/ghc/compiler/ghci/ByteCodeLink.lhs

  Also give civilised messages for interactive FFI link failures.

  1.25.4.4  +2 -1      fptools/ghc/compiler/ghci/ByteCodeLink.lhs

  Refine the runtime-link-failure msg a bit.

22 years ago[project @ 2001-10-19 09:45:26 by sewardj]
sewardj [Fri, 19 Oct 2001 09:45:26 +0000 (09:45 +0000)]
[project @ 2001-10-19 09:45:26 by sewardj]
merge from stable revs:

  1.60.2.7  +29 -8     fptools/ghc/rts/Linker.c
  Teach the runtime linker to ignore stabs-style debugging info on x86-ELF.

  1.60.2.8  +15 -3     fptools/ghc/rts/Linker.c
  PEi386 fixes for ignoring stabs-style (GNU, -g) debugging info.

22 years ago[project @ 2001-10-19 09:41:11 by sewardj]
sewardj [Fri, 19 Oct 2001 09:41:11 +0000 (09:41 +0000)]
[project @ 2001-10-19 09:41:11 by sewardj]
merge from stable revs:
  1.121.4.1 +7 -6      fptools/ghc/rts/GC.c
  1.9.4.1   +4 -1      fptools/ghc/rts/GCCompact.c
  1.17.4.1  +4 -3      fptools/ghc/rts/StoragePriv.h

  SimonM's fixes to deal with GHCi and CAFs properly in the compacting
  collector.

22 years ago[project @ 2001-10-19 09:33:28 by sewardj]
sewardj [Fri, 19 Oct 2001 09:33:28 +0000 (09:33 +0000)]
[project @ 2001-10-19 09:33:28 by sewardj]
merge from stable rev 1.54.4.1:

  CLEAN_FILES += gmp/libgmp.a

22 years ago[project @ 2001-10-18 16:29:12 by simonpj]
simonpj [Thu, 18 Oct 2001 16:29:14 +0000 (16:29 +0000)]
[project @ 2001-10-18 16:29:12 by simonpj]
----------------------------------------------
The CoreTidy/CorePrep/CoreToStg saga continues
[actually, this commit mostly completes the job]
----------------------------------------------

DO NOT MERGE!

* CorePrep injects implicit bindings, not the type checker,
  nor CgConTbls.   (This way, all the code generators see
  them, so no need to fiddle with the byte code generator.)

  As a result, all bindings in the module are for LocalIds,
  at least until CoreTidy.   This is a Big Win.

  Hence remove nasty isImplicitId test in update_bndr in
  SimplCore and DmdAnal

* hasNoBinding is no longer true of a dataConId (worker).
  There's an implicit curried binding for it.

* Remove yukky test in exprIsTrivial that did not regard
  a hasNoBinding Id as trivial; similarly in SimplUtils.tryEtaReduce

* In CoreTidy, get the names to avoid from the type env.
  That way it includes implicit bindings too.

* CoreTidy set the Arity of a top-level Id permanently;
  it's up to the rest of the compiler to respect it.
  Notably, CorePrep uses etaExpand to make the manifest arity
  match the claimed arity.

* As a result, nuke CgArity, so that CgInfo now contains only
  CafInfo.  The CafInfo is knot-tied as before.

Other things

* In Simplify.simplLazyBind, be a bit keener to float bindings
  out if it's a top-level binding.

22 years ago[project @ 2001-10-18 16:27:42 by simonpj]
simonpj [Thu, 18 Oct 2001 16:27:42 +0000 (16:27 +0000)]
[project @ 2001-10-18 16:27:42 by simonpj]
Tidy up maybeGlobaliseId

22 years ago[project @ 2001-10-18 16:25:18 by simonpj]
simonpj [Thu, 18 Oct 2001 16:25:18 +0000 (16:25 +0000)]
[project @ 2001-10-18 16:25:18 by simonpj]
Complete the removal of nullAddr# primop (dont merge)

22 years ago[project @ 2001-10-18 16:11:57 by simonpj]
simonpj [Thu, 18 Oct 2001 16:11:57 +0000 (16:11 +0000)]
[project @ 2001-10-18 16:11:57 by simonpj]
Correct bug in todays bug-fix to DmdAnal

22 years ago[project @ 2001-10-18 15:57:06 by simonpj]
simonpj [Thu, 18 Oct 2001 15:57:07 +0000 (15:57 +0000)]
[project @ 2001-10-18 15:57:06 by simonpj]
Add stuff about variables

22 years ago[project @ 2001-10-18 15:26:57 by simonmar]
simonmar [Thu, 18 Oct 2001 15:26:57 +0000 (15:26 +0000)]
[project @ 2001-10-18 15:26:57 by simonmar]
Oops, don't try to load the rts or gmp packages at all.