ghc-hetmet.git
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.

22 years ago[project @ 2001-10-18 14:41:01 by simonmar]
simonmar [Thu, 18 Oct 2001 14:41:01 +0000 (14:41 +0000)]
[project @ 2001-10-18 14:41:01 by simonmar]
Add a lightweight arena allocation scheme, and use it to speed up
allocation of cost centres and cost-centre stacks in the profiler.

22 years ago[project @ 2001-10-18 13:56:09 by rrt]
rrt [Thu, 18 Oct 2001 13:56:09 +0000 (13:56 +0000)]
[project @ 2001-10-18 13:56:09 by rrt]
Make catch work with older compilers, and avoid clash between
Exception.catch and PrelException's catch.

22 years ago[project @ 2001-10-18 13:46:47 by simonmar]
simonmar [Thu, 18 Oct 2001 13:46:47 +0000 (13:46 +0000)]
[project @ 2001-10-18 13:46:47 by simonmar]
Use 'long long' types for the various memory allocation counters in
cost centres and cost centre stacks, as these are prone to overflowing.

22 years ago[project @ 2001-10-18 13:19:49 by simonmar]
simonmar [Thu, 18 Oct 2001 13:19:49 +0000 (13:19 +0000)]
[project @ 2001-10-18 13:19:49 by simonmar]
Back out part of the previous commit that shouldn't have gone in, and
tidy up a little.

22 years ago[project @ 2001-10-18 13:09:50 by simonpj]
simonpj [Thu, 18 Oct 2001 13:09:50 +0000 (13:09 +0000)]
[project @ 2001-10-18 13:09:50 by simonpj]
Fix two minor bugs in DmdAnal, and add comments.
The bugs were both in dmdTransform, the dataConId case

  * The test for saturation should be against call_depth
    not agaainst (length ds).

  * The arg_ds computation for k=Keep should be
    with 'both' not 'lub'.

22 years ago[project @ 2001-10-18 11:40:46 by rrt]
rrt [Thu, 18 Oct 2001 11:40:46 +0000 (11:40 +0000)]
[project @ 2001-10-18 11:40:46 by rrt]
Remove old rubbish and put some new in instead.

22 years ago[project @ 2001-10-18 11:20:19 by rrt]
rrt [Thu, 18 Oct 2001 11:20:19 +0000 (11:20 +0000)]
[project @ 2001-10-18 11:20:19 by rrt]
GHC 4.08 hasn't got catch, so use catchAllIO.

22 years ago[project @ 2001-10-18 10:31:48 by rrt]
rrt [Thu, 18 Oct 2001 10:31:48 +0000 (10:31 +0000)]
[project @ 2001-10-18 10:31:48 by rrt]
I think catch was introduced long ago enough now that we can use it
instead of catchAllIO. If it's still a problem, then this file can be
treated like e.g. ghc-pkg/Main.hs.

22 years ago[project @ 2001-10-18 10:04:21 by simonpj]
simonpj [Thu, 18 Oct 2001 10:04:21 +0000 (10:04 +0000)]
[project @ 2001-10-18 10:04:21 by simonpj]
Yet more wibbles in CorePrep (eta expansion this time)

22 years ago[project @ 2001-10-18 10:03:58 by simonpj]
simonpj [Thu, 18 Oct 2001 10:03:58 +0000 (10:03 +0000)]
[project @ 2001-10-18 10:03:58 by simonpj]
Comments only

22 years ago[project @ 2001-10-18 09:37:54 by simonmar]
simonmar [Thu, 18 Oct 2001 09:37:54 +0000 (09:37 +0000)]
[project @ 2001-10-18 09:37:54 by simonmar]
Simplify the grammar in a few places - we don't allow VARSYMs or
CONSYMs in interface files any more (everything is z-encoded), so
remove these productions, and inline some non-terminals that were only
used in one place.

22 years ago[project @ 2001-10-18 09:22:37 by simonpj]
simonpj [Thu, 18 Oct 2001 09:22:37 +0000 (09:22 +0000)]
[project @ 2001-10-18 09:22:37 by simonpj]
Wibbles on the better-floating story

22 years ago[project @ 2001-10-18 09:17:04 by simonmar]
simonmar [Thu, 18 Oct 2001 09:17:04 +0000 (09:17 +0000)]
[project @ 2001-10-18 09:17:04 by simonmar]
- use var_fs instead of just VARID for type variables, so that
  specialids (as, qualified, hiding, forall etc.) don't confuse the
  interface file parser.

- remove superfluous '!' in var_fs rule.  This was necessary to avoid
  conflicts caused by the previous change.

22 years ago[project @ 2001-10-18 08:53:03 by simonmar]
simonmar [Thu, 18 Oct 2001 08:53:03 +0000 (08:53 +0000)]
[project @ 2001-10-18 08:53:03 by simonmar]
Eeeek!  When looking for an interface for a way other than the normal
way (eg. profiling) we were correctly finding the .p_hi file, but then
reading the .hi file!

Sigbjorn: go stand in the corner for the rest of the day.

MERGE TO STABLE

22 years ago[project @ 2001-10-18 08:22:06 by simonpj]
simonpj [Thu, 18 Oct 2001 08:22:06 +0000 (08:22 +0000)]
[project @ 2001-10-18 08:22:06 by simonpj]
Wibble to case fiddling; dont merge

22 years ago[project @ 2001-10-18 08:03:29 by simonpj]
simonpj [Thu, 18 Oct 2001 08:03:29 +0000 (08:03 +0000)]
[project @ 2001-10-18 08:03:29 by simonpj]
Add comments

22 years ago[project @ 2001-10-17 16:08:35 by simonpj]
simonpj [Wed, 17 Oct 2001 16:08:35 +0000 (16:08 +0000)]
[project @ 2001-10-17 16:08:35 by simonpj]
Tidy up case-simplification a little bit

22 years ago[project @ 2001-10-17 15:44:40 by simonpj]
simonpj [Wed, 17 Oct 2001 15:44:40 +0000 (15:44 +0000)]
[project @ 2001-10-17 15:44:40 by simonpj]
---------------------------
   Better floating in CorePrep
   ---------------------------

** DO NOT MERGE  **

[NB: this commit also changes the wrongly-named
-ddump-sat
flag to be called
-ddump-prep ]

Earlier fiddling with CorePrep meant that it was ANF-ing
the top-level defn:

x = length [True,False]
to
x = let s1 = False : []
s2 = True  : s1
    in length s2

This is Very Bad for big constant data structures, as show
up in Happy-generated parsers, and that's why we get the
big-block-alloc crash in hssource.  Instead we want

s1 = False : []
s2 = True  : s1
x = length s2

This happens now, (I hope), but it's part of an ongoing jiggling
process in the CoreTidy-CorePrep-CoreToStg part of the compiler, so
it's possible I have broken something else.

22 years ago[project @ 2001-10-17 15:40:02 by simonpj]
simonpj [Wed, 17 Oct 2001 15:40:02 +0000 (15:40 +0000)]
[project @ 2001-10-17 15:40:02 by simonpj]
Remove foldr/cons RULE; see comments with the RULE

22 years ago[project @ 2001-10-17 15:39:08 by simonpj]
simonpj [Wed, 17 Oct 2001 15:39:08 +0000 (15:39 +0000)]
[project @ 2001-10-17 15:39:08 by simonpj]
Remove unused variable

22 years ago[project @ 2001-10-17 15:38:43 by simonpj]
simonpj [Wed, 17 Oct 2001 15:38:43 +0000 (15:38 +0000)]
[project @ 2001-10-17 15:38:43 by simonpj]
Add comments

22 years ago[project @ 2001-10-17 15:19:24 by simonmar]
simonmar [Wed, 17 Oct 2001 15:19:24 +0000 (15:19 +0000)]
[project @ 2001-10-17 15:19:24 by simonmar]
Add missing CONSTR_NOCAF_STATIC case to the THUNK_SELECTOR evacuation
code.  Strange that we've never seen this before...

22 years ago[project @ 2001-10-17 14:24:52 by simonmar]
simonmar [Wed, 17 Oct 2001 14:24:52 +0000 (14:24 +0000)]
[project @ 2001-10-17 14:24:52 by simonmar]
Comment out a bogus assertion, and add a comment to describe why it
isn't necessarily true (see the comment for details).

22 years ago[project @ 2001-10-17 14:17:11 by simonmar]
simonmar [Wed, 17 Oct 2001 14:17:11 +0000 (14:17 +0000)]
[project @ 2001-10-17 14:17:11 by simonmar]
Fix a small performance bug.  In mkAlts, when calculating the
impossible constructors, we were looking at the unfolding for the case
binder instead of the scrutinee, with the result that we sometimes
didn't notice that a DEFAULT case could be resolved into a specific
pattern.

22 years ago[project @ 2001-10-17 13:16:03 by simonpj]
simonpj [Wed, 17 Oct 2001 13:16:03 +0000 (13:16 +0000)]
[project @ 2001-10-17 13:16:03 by simonpj]
-------------------------------------------
   Desugar bindings into Rec groups more often
[Part 2]
   -------------------------------------------

** MERGE PLEASE **

  [I forgot the unlifted case.]

  In rather obscure cases (involving functional dependencies)
  it is possible to get an AbsBinds [] [] (no tyvars, no dicts)
  which nevertheless has some "dictionary bindings".  These
  come out of the typechecker in non-dependency order, so we
  need to Rec them just in case.

  It turns out to be a bit awkward.  The smallest fix is
  to make dsLet always make a Rec; brutal but correct.

22 years ago[project @ 2001-10-17 13:13:36 by simonmar]
simonmar [Wed, 17 Oct 2001 13:13:36 +0000 (13:13 +0000)]
[project @ 2001-10-17 13:13:36 by simonmar]
Add a comment about assumptions that we make about the result of
etaExpand.

22 years ago[project @ 2001-10-17 13:12:56 by simonmar]
simonmar [Wed, 17 Oct 2001 13:12:56 +0000 (13:12 +0000)]
[project @ 2001-10-17 13:12:56 by simonmar]
Use the smart constructor mkNote instead of the dumb constructor
(Note) when rebuilding the expression after eta expansion.  This is
necessary to avoid invalidating some assumptions we make about the
output of etaExpand in CorePrep, in particular that there aren't any
lambda expressions inside an SCC note.

22 years ago[project @ 2001-10-17 11:50:38 by simonpj]
simonpj [Wed, 17 Oct 2001 11:50:38 +0000 (11:50 +0000)]
[project @ 2001-10-17 11:50:38 by simonpj]
--------------------------
nullAddr# fix for the HEAD
  [missed one file]
--------------------------

*** DO NOT MERGE ***

nullAddr# is simply a name for (Lit nullAddrLit).  Up
to now it has been a PrimOp with the rather stange type
nullAddr# :: Int# -> Addr#
which discards its argument.  (I think the problem with
nullary primops is to do with the top-level bindings in
PrelPrimOpWrappers.)   And there was a RULE in PrelRules
to rewrite
nullAddr _ ==> nullAddrLit

It's excessive to make it a PrimOp.  We can just treat it
like unsafeCoerce#, which is made in MkId.lhs.   So I've
done that, and given it the more sensible type
nullAddr# :: Addr#

I fixed all the occurrences I could find.

22 years ago[project @ 2001-10-17 11:26:04 by simonpj]
simonpj [Wed, 17 Oct 2001 11:26:04 +0000 (11:26 +0000)]
[project @ 2001-10-17 11:26:04 by simonpj]
-------------------------------------------
nullAddr# fix for the HEAD
-------------------------------------------

*** DO NOT MERGE ***

nullAddr# is simply a name for (Lit nullAddrLit).  Up
to now it has been a PrimOp with the rather stange type
nullAddr# :: Int# -> Addr#
which discards its argument.  (I think the problem with
nullary primops is to do with the top-level bindings in
PrelPrimOpWrappers.)   And there was a RULE in PrelRules
to rewrite
nullAddr _ ==> nullAddrLit

It's excessive to make it a PrimOp.  We can just treat it
like unsafeCoerce#, which is made in MkId.lhs.   So I've
done that, and given it the more sensible type
nullAddr# :: Addr#

I fixed all the occurrences I could find.

22 years ago[project @ 2001-10-17 11:05:36 by simonpj]
simonpj [Wed, 17 Oct 2001 11:05:36 +0000 (11:05 +0000)]
[project @ 2001-10-17 11:05:36 by simonpj]
-------------------------------------------
Desugar bindings into Rec groups more often
-------------------------------------------

In rather obscure cases (involving functional dependencies)
it is possible to get an AbsBinds [] [] (no tyvars, no dicts)
which nevertheless has some "dictionary bindings".  These
come out of the typechecker in non-dependency order, so we
need to Rec them just in case.

It turns out to be a bit awkward.  The smallest fix is
to make dsLet always make a Rec; brutal but correct.

22 years ago[project @ 2001-10-17 10:35:34 by simonpj]
simonpj [Wed, 17 Oct 2001 10:35:34 +0000 (10:35 +0000)]
[project @ 2001-10-17 10:35:34 by simonpj]
-------------------------------
Fix type-synonym arity checking
-------------------------------

*** MERGE TO STABLE BRANCH ***

The newish stuff on checking types (checkValidType etc)
didn't detect an un-saturated, but *kind-correct* type
synonym occurrence.  Example:

type A i = i
type B = A

Result: crash.  Fix is rather easy.

Thanks to Thomas Hallgren.

22 years ago[project @ 2001-10-16 15:50:02 by rrt]
rrt [Tue, 16 Oct 2001 15:50:02 +0000 (15:50 +0000)]
[project @ 2001-10-16 15:50:02 by rrt]
Fix a couple of typos.

22 years ago[project @ 2001-10-16 15:48:30 by simonmar]
simonmar [Tue, 16 Oct 2001 15:48:30 +0000 (15:48 +0000)]
[project @ 2001-10-16 15:48:30 by simonmar]
top-level constructor workers should have CCS_SUBSUMED, not NO_CCS.

22 years ago[project @ 2001-10-16 15:14:41 by simonpj]
simonpj [Tue, 16 Oct 2001 15:14:41 +0000 (15:14 +0000)]
[project @ 2001-10-16 15:14:41 by simonpj]
Hacky fix to paths for cpp; dont merge

22 years ago[project @ 2001-10-16 15:06:38 by simonmar]
simonmar [Tue, 16 Oct 2001 15:06:38 +0000 (15:06 +0000)]
[project @ 2001-10-16 15:06:38 by simonmar]
Add a Show instance for HandlePosn

22 years ago[project @ 2001-10-16 14:44:51 by simonmar]
simonmar [Tue, 16 Oct 2001 14:44:51 +0000 (14:44 +0000)]
[project @ 2001-10-16 14:44:51 by simonmar]
Catch ^C exceptions at the top level of the interactive loop and
ignore them.

MERGE TO STABLE

22 years ago[project @ 2001-10-16 14:08:26 by simonmar]
simonmar [Tue, 16 Oct 2001 14:08:26 +0000 (14:08 +0000)]
[project @ 2001-10-16 14:08:26 by simonmar]
Clean tmp files between compilations, rather than all at the end.
This reduces the /tmp clutter if GHC dies messily (current values of
"messily" include segmentation fault and, sadly, heap overflow).

22 years ago[project @ 2001-10-16 14:02:01 by rrt]
rrt [Tue, 16 Oct 2001 14:03:12 +0000 (14:03 +0000)]
[project @ 2001-10-16 14:02:01 by rrt]
Comment dubious hack.

22 years ago[project @ 2001-10-16 13:31:56 by simonmar]
simonmar [Tue, 16 Oct 2001 13:31:56 +0000 (13:31 +0000)]
[project @ 2001-10-16 13:31:56 by simonmar]
Format some comments to 80 columns.

22 years ago[project @ 2001-10-16 13:29:35 by simonmar]
simonmar [Tue, 16 Oct 2001 13:29:35 +0000 (13:29 +0000)]
[project @ 2001-10-16 13:29:35 by simonmar]
Don't print the 'Loading package...' message for packages which don't
require any loading (gmp & rts in particular).

22 years ago[project @ 2001-10-16 13:25:00 by simonmar]
simonmar [Tue, 16 Oct 2001 13:25:00 +0000 (13:25 +0000)]
[project @ 2001-10-16 13:25:00 by simonmar]
- set the buffering mode on stdout & stderr to unbuffered in
  interactive mode

- fix some bugs in package linking: loading a package using the :set
  command wasn't using the same mechanism as the command-line package
  loading to avoid linking in dynamic libraries that are already
  linked into the GHCi binary.

- fix a compile error.

MERGE TO STABLE

22 years ago[project @ 2001-10-16 11:29:08 by simonmar]
simonmar [Tue, 16 Oct 2001 11:29:08 +0000 (11:29 +0000)]
[project @ 2001-10-16 11:29:08 by simonmar]
mention that you might need to add -lHSrts before any other libraries
on the linker command line, if another library has its own main() function.

22 years ago[project @ 2001-10-16 11:20:58 by rrt]
rrt [Tue, 16 Oct 2001 11:20:58 +0000 (11:20 +0000)]
[project @ 2001-10-16 11:20:58 by rrt]
Strip out \r on Windows. This should not be necessary as Perl should
read in text mode on a text mounted volume (under Cygwin).

22 years ago[project @ 2001-10-16 10:50:11 by simonmar]
simonmar [Tue, 16 Oct 2001 10:50:11 +0000 (10:50 +0000)]
[project @ 2001-10-16 10:50:11 by simonmar]
mention that identifiers beginning with a double underscore are to be
avoided in -fglasgow-exts mode.

22 years ago[project @ 2001-10-16 10:37:32 by simonpj]
simonpj [Tue, 16 Oct 2001 10:37:32 +0000 (10:37 +0000)]
[project @ 2001-10-16 10:37:32 by simonpj]
Fix the default-expansion code for HEAD; fixes cg050

22 years ago[project @ 2001-10-16 10:01:13 by simonmar]
simonmar [Tue, 16 Oct 2001 10:01:13 +0000 (10:01 +0000)]
[project @ 2001-10-16 10:01:13 by simonmar]
Explicitly sign- or zero-extend the result of a ccall up to the word
size if necessary.  Recent discussion on
glasgow-haskell-users@haskell.org suggests that this is the
responsibility of the caller rather than the callee.

We do it by wrapping the result in narrow{8,16,32}{Int,Word}# as
appropriate, at desugaring time, because this way we only have to do
it once instead of once per backend.  Furthermore the narrowing is
exposed to the simplifier which is generally a good thing.

22 years ago[project @ 2001-10-15 16:03:04 by simonpj]
simonpj [Mon, 15 Oct 2001 16:03:04 +0000 (16:03 +0000)]
[project @ 2001-10-15 16:03:04 by simonpj]
--------------------------
Tidy up arity propagation (the saga continues)
--------------------------

Turns out that it's not as easy as I thought.

The code generator was assuming that (not . isLocalName) was enough to
identify an imported thing (whose CgInfo should be right), but that's
not true.  Needs more thought.

Meanwhile, I've made the code generator a bit more sensible about how
it looks things up.  But there's still a problem for GHCi: the
unfoldings in the TypeEnv won't have CgIdInfo stuff.  Sigh.  Thinks.

22 years ago[project @ 2001-10-15 15:06:01 by simonpj]
simonpj [Mon, 15 Oct 2001 15:06:01 +0000 (15:06 +0000)]
[project @ 2001-10-15 15:06:01 by simonpj]
--------------------------
Tidy up arity propagation
--------------------------

Due to excessive complexity, correct arity information was getting
lost on the way to interface files.  As a result, a function that had
CPR info __S SLm (say), was getting arity 0, and this confused the (old)
CPR analyser ("lub of function and HasCPR").

I hope this fixes the above error (which showed up somewhere in
compiling Edison), but I'm going to commit it right now anyway.
Meanwhile I'll recompile Edison too.

Details
~~~~~~~
Digging out the rather obscure cause made me tidy up the CgInfo stuff.
The story is now

* The CgInfo field of an Id gets attached to the Id *only* in
  the TypeEnv of the ModuleDetails, during CoreTidy.

  This ModuleDetails stuff is used
a) to generate the interface file
b) to import into other modules in GHCi

* No CgInfo field is in the CoreBindings which are passed
  downsteam to CorePrep and thence CodeGen.  Quite right too...
  it's the downstream stuff that *generates* the CgInfo.

* But the Arity field *is* now passed on through CoreTidy
  (like strictness info) since it is usefully used by CorePrep.

* On the way I simplified the ArityInfo field of an IdInfo
  to simply
Arity
  instead of
Maybe Arity

22 years ago[project @ 2001-10-15 15:05:17 by simonpj]
simonpj [Mon, 15 Oct 2001 15:05:17 +0000 (15:05 +0000)]
[project @ 2001-10-15 15:05:17 by simonpj]
Rename ifaceTyCls to ifaceTyThing (more consistent)

22 years ago[project @ 2001-10-15 15:03:48 by simonpj]
simonpj [Mon, 15 Oct 2001 15:03:48 +0000 (15:03 +0000)]
[project @ 2001-10-15 15:03:48 by simonpj]
Add comments re eta expansion

22 years ago[project @ 2001-10-15 15:03:24 by simonpj]
simonpj [Mon, 15 Oct 2001 15:03:24 +0000 (15:03 +0000)]
[project @ 2001-10-15 15:03:24 by simonpj]
Add comment for type of unsafeCoerce#

22 years ago[project @ 2001-10-13 20:47:43 by sof]
sof [Sat, 13 Oct 2001 20:47:43 +0000 (20:47 +0000)]
[project @ 2001-10-13 20:47:43 by sof]
When 'boot'ing, delay 'all' target a bit

22 years ago[project @ 2001-10-13 20:46:24 by sof]
sof [Sat, 13 Oct 2001 20:46:24 +0000 (20:46 +0000)]
[project @ 2001-10-13 20:46:24 by sof]
In defn of CPP, include @CPPFLAGS@ on RHS.

22 years ago[project @ 2001-10-13 20:44:52 by sof]
sof [Sat, 13 Oct 2001 20:44:52 +0000 (20:44 +0000)]
[project @ 2001-10-13 20:44:52 by sof]
Add explanatory comment as to why a pair of win32-specific options
are filtered out of CC_OPTS.

22 years ago[project @ 2001-10-13 20:26:13 by sof]
sof [Sat, 13 Oct 2001 20:26:13 +0000 (20:26 +0000)]
[project @ 2001-10-13 20:26:13 by sof]
Added FPTOOLS_FIND_FIND.

On Win32 boxes, rejects the MS 'find' utility and continues
searching for GNU find. On non-Win32 boxes, equal to
AC_PATH_PROG(FindCmd, find)

22 years ago[project @ 2001-10-13 16:02:47 by sof]
sof [Sat, 13 Oct 2001 16:02:47 +0000 (16:02 +0000)]
[project @ 2001-10-13 16:02:47 by sof]
- unpackProgName: recognise '/' and '\\' as path separators under Win32.
- donated in-house version of basename, it's cool (== doesn't use reverse).

22 years ago[project @ 2001-10-12 18:44:52 by sof]
sof [Fri, 12 Oct 2001 18:44:52 +0000 (18:44 +0000)]
[project @ 2001-10-12 18:44:52 by sof]
Robustified:

- 'make clean' followed by 'make all' should now work
  as expected.
- 'make boot' now forces 'depend' and 'all' to fire (not
  the other way around).

22 years ago[project @ 2001-10-12 14:28:08 by rrt]
rrt [Fri, 12 Oct 2001 14:29:11 +0000 (14:29 +0000)]
[project @ 2001-10-12 14:28:08 by rrt]
Update "make install" settings for Windows.

22 years ago[project @ 2001-10-12 14:27:28 by rrt]
rrt [Fri, 12 Oct 2001 14:27:28 +0000 (14:27 +0000)]
[project @ 2001-10-12 14:27:28 by rrt]
Changes to installation locations of various files on Windows.