ghc-hetmet.git
21 years ago[project @ 2002-09-30 10:17:38 by simonmar]
simonmar [Mon, 30 Sep 2002 10:17:38 +0000 (10:17 +0000)]
[project @ 2002-09-30 10:17:38 by simonmar]
Replace
.PRECIOUS: %.hs
with
.SECONDARY: %.hs

.PRECIOUS is the wrong thing: it keeps the file when 'make' is
killed, as well as preventing automatic deletion.  .SECONDARY just
prevents the automatic deletion.

Spotted by: Ian Lynagh.

21 years ago[project @ 2002-09-30 10:14:02 by simonmar]
simonmar [Mon, 30 Sep 2002 10:14:02 +0000 (10:14 +0000)]
[project @ 2002-09-30 10:14:02 by simonmar]
Fix cut-n-pasto

21 years ago[project @ 2002-09-30 10:13:23 by simonmar]
simonmar [Mon, 30 Sep 2002 10:13:23 +0000 (10:13 +0000)]
[project @ 2002-09-30 10:13:23 by simonmar]
$(EXE_SUFFIX) duplicates $(exeext), and the latter seems to be more
widely used, so nuke the former.

21 years ago[project @ 2002-09-30 10:09:38 by simonmar]
simonmar [Mon, 30 Sep 2002 10:09:38 +0000 (10:09 +0000)]
[project @ 2002-09-30 10:09:38 by simonmar]
Remove unused $(PRINTER)

21 years ago[project @ 2002-09-28 07:12:55 by erkok]
erkok [Sat, 28 Sep 2002 07:12:55 +0000 (07:12 +0000)]
[project @ 2002-09-28 07:12:55 by erkok]
clarifications on the mdo documentation.

21 years ago[project @ 2002-09-28 00:29:32 by erkok]
erkok [Sat, 28 Sep 2002 00:29:32 +0000 (00:29 +0000)]
[project @ 2002-09-28 00:29:32 by erkok]
documentation for the mdo-notation.

(I've run this through jade, no syntax errors, but couldn't get
any html output as my docbook installation is a bit weird: couldn't
find style-files etc. it'll be great if someone can run it through
to make sure what I added looks acceptable..)

21 years ago[project @ 2002-09-27 23:10:59 by erkok]
erkok [Fri, 27 Sep 2002 23:10:59 +0000 (23:10 +0000)]
[project @ 2002-09-27 23:10:59 by erkok]
get mfix from MonadRec

21 years ago[project @ 2002-09-27 17:12:23 by erkok]
erkok [Fri, 27 Sep 2002 17:12:23 +0000 (17:12 +0000)]
[project @ 2002-09-27 17:12:23 by erkok]
make sure we get the name right when we call doStmtListErr

21 years ago[project @ 2002-09-27 12:42:42 by simonpj]
simonpj [Fri, 27 Sep 2002 12:42:45 +0000 (12:42 +0000)]
[project @ 2002-09-27 12:42:42 by simonpj]
Wibbles to improve error reporting

21 years ago[project @ 2002-09-27 08:20:43 by simonpj]
simonpj [Fri, 27 Sep 2002 08:20:50 +0000 (08:20 +0000)]
[project @ 2002-09-27 08:20:43 by simonpj]
--------------------------------
        Implement recursive do-notation
--------------------------------

This commit adds recursive do-notation, which Hugs has had for some time.

mdo { x <- foo y ;
      y <- baz x ;
      return (y,x) }

turns into

do { (x,y) <- mfix (\~(x,y) -> do { x <- foo y;
    y <- baz x }) ;
     return (y,x) }

This is all based on work by Levent Erkok and John Lanuchbury.

The really tricky bit is in the renamer (RnExpr.rnMDoStmts) where
we break things up into minimal segments.  The rest is easy, including
the type checker.

Levent laid the groundwork, and Simon finished it off. Needless to say,
I couldn't resist tidying up other stuff, so there's no guaranteed I
have not broken something.

21 years ago[project @ 2002-09-27 08:16:24 by simonpj]
simonpj [Fri, 27 Sep 2002 08:16:25 +0000 (08:16 +0000)]
[project @ 2002-09-27 08:16:24 by simonpj]
--------------------------------
     Do type-checking of external-core input
--------------------------------

When we read in an External Core file, we should really type-check it.
We weren't, because we treated it as if it were trusted, interface-file
material.

This commit fixes the problem, albeit in a bit of a hacky way.  The
typechecking is done by Lint, which does not give as friendly error
messages as does the normal typechecker.  But it's much better than nothing.

I also removed the entirely-unused 'warnings' from the Lint monad.

21 years ago[project @ 2002-09-27 07:51:57 by simonpj]
simonpj [Fri, 27 Sep 2002 07:51:57 +0000 (07:51 +0000)]
[project @ 2002-09-27 07:51:57 by simonpj]
typo

21 years ago[project @ 2002-09-26 16:29:10 by simonpj]
simonpj [Thu, 26 Sep 2002 16:29:10 +0000 (16:29 +0000)]
[project @ 2002-09-26 16:29:10 by simonpj]
Fix case of C {} for non-record constructor C, but with strict fields

21 years ago[project @ 2002-09-26 16:28:35 by simonpj]
simonpj [Thu, 26 Sep 2002 16:28:35 +0000 (16:28 +0000)]
[project @ 2002-09-26 16:28:35 by simonpj]
Fix egregious loop error

21 years ago[project @ 2002-09-26 09:07:50 by simonmar]
simonmar [Thu, 26 Sep 2002 09:07:50 +0000 (09:07 +0000)]
[project @ 2002-09-26 09:07:50 by simonmar]
In 'make html', bale out with a useful message if Haddock is not installed.

21 years ago[project @ 2002-09-26 09:01:34 by simonpj]
simonpj [Thu, 26 Sep 2002 09:01:34 +0000 (09:01 +0000)]
[project @ 2002-09-26 09:01:34 by simonpj]
Notes on .exe files

21 years ago[project @ 2002-09-26 08:44:48 by simonpj]
simonpj [Thu, 26 Sep 2002 08:44:48 +0000 (08:44 +0000)]
[project @ 2002-09-26 08:44:48 by simonpj]
Bale out a little earlier on renamer errors

21 years ago[project @ 2002-09-26 08:44:14 by simonpj]
simonpj [Thu, 26 Sep 2002 08:44:14 +0000 (08:44 +0000)]
[project @ 2002-09-26 08:44:14 by simonpj]
Comments

21 years ago[project @ 2002-09-25 21:30:26 by wolfgang]
wolfgang [Wed, 25 Sep 2002 21:30:26 +0000 (21:30 +0000)]
[project @ 2002-09-25 21:30:26 by wolfgang]
merge rev. 1.78.2.7

21 years ago[project @ 2002-09-25 20:44:23 by wolfgang]
wolfgang [Wed, 25 Sep 2002 20:44:23 +0000 (20:44 +0000)]
[project @ 2002-09-25 20:44:23 by wolfgang]
merge rev. 1.33.8.1

21 years ago[project @ 2002-09-25 20:43:34 by wolfgang]
wolfgang [Wed, 25 Sep 2002 20:43:34 +0000 (20:43 +0000)]
[project @ 2002-09-25 20:43:34 by wolfgang]
merge rev. 1.19.2.1

21 years ago[project @ 2002-09-25 16:10:36 by simonmar]
simonmar [Wed, 25 Sep 2002 16:10:36 +0000 (16:10 +0000)]
[project @ 2002-09-25 16:10:36 by simonmar]
Update the list of packages already loaded to match recent changes.

21 years ago[project @ 2002-09-25 16:00:50 by simonmar]
simonmar [Wed, 25 Sep 2002 16:00:50 +0000 (16:00 +0000)]
[project @ 2002-09-25 16:00:50 by simonmar]
When a command-line evaluation returns an exception, revert to the old
interactive context, because the new context will bind 'it' to a name
that doesn't exist in the linker's symbol table.

21 years ago[project @ 2002-09-25 15:36:50 by sof]
sof [Wed, 25 Sep 2002 15:36:50 +0000 (15:36 +0000)]
[project @ 2002-09-25 15:36:50 by sof]
fix logic in prev. commit

21 years ago[project @ 2002-09-25 15:24:06 by simonmar]
simonmar [Wed, 25 Sep 2002 15:24:07 +0000 (15:24 +0000)]
[project @ 2002-09-25 15:24:06 by simonmar]
Re-instate the checking for the values of errno constants at configure
time.  The problem with doing it using foreign calls is simply that
this tickles a bad case in the code gen machinery, which in this case
results in an extra 10-20k of goop ending up in pretty much every
binary, and it impacts GC performance too.

This has some portability implications, but the situation is no worse
than before.  To reliably cross-compile for a new platform you need to
build a set of .hc files for the libraries using a config.h generated on
the *target* machine.  (at some point we'll formalise the
cross-compilation story, but that's another thing on the todo list...)

21 years ago[project @ 2002-09-25 14:46:31 by simonmar]
simonmar [Wed, 25 Sep 2002 14:46:34 +0000 (14:46 +0000)]
[project @ 2002-09-25 14:46:31 by simonmar]
Fix a scheduling/GC bug, spotted by Wolfgang Thaller.  If a main
thread completes, and a GC runs before the return (from rts_evalIO())
happens, then the thread might be GC'd before we get a chance to
extract its return value, leading to barf("main thread has been GC'd")
from the garbage collector.

The fix is to treat all main threads which have completed as roots:
this is logically the right thing to do, because these threads must be
retained by virtue of holding the return value, and this is a property of
main threads only.

21 years ago[project @ 2002-09-25 12:47:42 by simonmar]
simonmar [Wed, 25 Sep 2002 12:47:42 +0000 (12:47 +0000)]
[project @ 2002-09-25 12:47:42 by simonmar]
The variable in a foreign declaration should be 'var' not 'varid',
which means that the following should be legal:

foreign export "plusInt" (+) :: Int -> Int -> Int

(this example is even in the FFI spec!)

21 years ago[project @ 2002-09-25 11:56:33 by simonpj]
simonpj [Wed, 25 Sep 2002 11:56:34 +0000 (11:56 +0000)]
[project @ 2002-09-25 11:56:33 by simonpj]
Better location for type/class cycle errors

21 years ago[project @ 2002-09-25 11:55:07 by simonpj]
simonpj [Wed, 25 Sep 2002 11:55:07 +0000 (11:55 +0000)]
[project @ 2002-09-25 11:55:07 by simonpj]
Better reporting of unused imports

21 years ago[project @ 2002-09-25 11:46:02 by simonpj]
simonpj [Wed, 25 Sep 2002 11:46:02 +0000 (11:46 +0000)]
[project @ 2002-09-25 11:46:02 by simonpj]
Remember to import the things used by foreign export

21 years ago[project @ 2002-09-25 11:09:11 by simonpj]
simonpj [Wed, 25 Sep 2002 11:09:11 +0000 (11:09 +0000)]
[project @ 2002-09-25 11:09:11 by simonpj]
Dont warn of missing signatures in interface mode

21 years ago[project @ 2002-09-25 10:53:34 by simonpj]
simonpj [Wed, 25 Sep 2002 10:53:46 +0000 (10:53 +0000)]
[project @ 2002-09-25 10:53:34 by simonpj]
Better error locations for instance errors

21 years ago[project @ 2002-09-25 10:53:11 by simonpj]
simonpj [Wed, 25 Sep 2002 10:53:11 +0000 (10:53 +0000)]
[project @ 2002-09-25 10:53:11 by simonpj]
Fix assertion handling

21 years ago[project @ 2002-09-25 10:53:06 by simonmar]
simonmar [Wed, 25 Sep 2002 10:53:06 +0000 (10:53 +0000)]
[project @ 2002-09-25 10:53:06 by simonmar]
Hopefully fix recent breakage in mangling/splitting: toss the .size
directives over the fence into the next block along with .globl and
.type directives (but carefullly avoid tossing the .size directives
for a function, which appear at the *end* of a function block).

21 years ago[project @ 2002-09-25 10:32:34 by simonmar]
simonmar [Wed, 25 Sep 2002 10:32:34 +0000 (10:32 +0000)]
[project @ 2002-09-25 10:32:34 by simonmar]
Clean out stamp-pkg-conf*

21 years ago[project @ 2002-09-25 10:32:23 by simonmar]
simonmar [Wed, 25 Sep 2002 10:32:23 +0000 (10:32 +0000)]
[project @ 2002-09-25 10:32:23 by simonmar]
Put the stamp-pkg-conf file in $(GHC_DRIVER_DIR), so that if someone
does 'make clean' in ghc without also cleaning in libraries, we don't
get into an inconsistent state w.r.t. which packages have been
installed.

21 years ago[project @ 2002-09-25 10:12:44 by simonpj]
simonpj [Wed, 25 Sep 2002 10:12:44 +0000 (10:12 +0000)]
[project @ 2002-09-25 10:12:44 by simonpj]
More notes about building on windows

21 years ago[project @ 2002-09-24 14:31:20 by simonmar]
simonmar [Tue, 24 Sep 2002 14:31:20 +0000 (14:31 +0000)]
[project @ 2002-09-24 14:31:20 by simonmar]
Stale interface files left by modules which no longer exist can cause
build problems, so in make clean we now delete all the interface files
we can find, rather than just the ones we know were generated from
existing source files.

21 years ago[project @ 2002-09-23 14:33:50 by simonmar]
simonmar [Mon, 23 Sep 2002 14:33:50 +0000 (14:33 +0000)]
[project @ 2002-09-23 14:33:50 by simonmar]
remove HEAP_HWM_WORDS; it probably hasn't been used for about 5 years

21 years ago[project @ 2002-09-23 10:44:07 by simonmar]
simonmar [Mon, 23 Sep 2002 10:44:07 +0000 (10:44 +0000)]
[project @ 2002-09-23 10:44:07 by simonmar]
Don't throw away .size and .type directives.  This lets us profile
with cachegrind and get meaningful results from vg_annotate (*very*
useful).

21 years ago[project @ 2002-09-20 23:48:53 by lewie]
lewie [Fri, 20 Sep 2002 23:48:53 +0000 (23:48 +0000)]
[project @ 2002-09-20 23:48:53 by lewie]
Make sure that permissions on installed files are right by adding
`%defattr(-,root,root)' to the `%files' entries.
Not a critical patch - Manuel built the rpms as root anyway, but this
makes it so that you are not dependent on building the rpm as root.

21 years ago[project @ 2002-09-20 13:08:42 by simonmar]
simonmar [Fri, 20 Sep 2002 13:08:42 +0000 (13:08 +0000)]
[project @ 2002-09-20 13:08:42 by simonmar]
Fix the install-datas target when $(INSTALL) is ./install-sh

21 years ago[project @ 2002-09-19 13:22:07 by simonmar]
simonmar [Thu, 19 Sep 2002 13:22:07 +0000 (13:22 +0000)]
[project @ 2002-09-19 13:22:07 by simonmar]
Remove vestiges of GHC.Prim.assert

21 years ago[project @ 2002-09-19 12:31:08 by simonmar]
simonmar [Thu, 19 Sep 2002 12:31:09 +0000 (12:31 +0000)]
[project @ 2002-09-19 12:31:08 by simonmar]
Fix records with infix constructors (parser/should_compile/read010).
Also tidy up the parser a bit:

 - clean up the tycon productions

 - check the current s/r conflicts (29) against reality,
   and update the comment.

21 years ago[project @ 2002-09-18 16:05:45 by simonpj]
simonpj [Wed, 18 Sep 2002 16:05:45 +0000 (16:05 +0000)]
[project @ 2002-09-18 16:05:45 by simonpj]
Fix LIE-plumbing bogon that killed spectral/fibheaps

21 years ago[project @ 2002-09-18 12:36:39 by simonmar]
simonmar [Wed, 18 Sep 2002 12:36:40 +0000 (12:36 +0000)]
[project @ 2002-09-18 12:36:39 by simonmar]
Add support for slurping in nofib dumps created with
EXTRA_RUNTEST_OPTS=-cachegrind, and output tables for number of
instructions, memory reads/writes, and cache misses.

21 years ago[project @ 2002-09-18 12:35:36 by simonmar]
simonmar [Wed, 18 Sep 2002 12:35:36 +0000 (12:35 +0000)]
[project @ 2002-09-18 12:35:36 by simonmar]
remove old heimdall and cacheprof support, and add cachegrind support
(-cachegrind option).

21 years ago[project @ 2002-09-18 10:51:01 by simonmar]
simonmar [Wed, 18 Sep 2002 10:51:02 +0000 (10:51 +0000)]
[project @ 2002-09-18 10:51:01 by simonmar]
Fix up exception handling when reading an interface file, and make it
compile with 4.08.x again.

GhcExceptions weren't being caught by readIface, so an error when
reading an interface could be unintentionally fatal (errors should be
soft when reading the old interface file for the current module).
Also, the Interrupted exception should not be caught by readIface,
because we want ^C to behave as normal when reading interface files
(currently it causes an interface-file read error rather than
interrupting the whole compiler).

Some exception-related compatibility functions have been moved from
Util to Panic.

21 years ago[project @ 2002-09-18 06:34:07 by mthomas]
mthomas [Wed, 18 Sep 2002 06:34:07 +0000 (06:34 +0000)]
[project @ 2002-09-18 06:34:07 by mthomas]
ifdefs for mingw32 to get rid of signal functions.

21 years ago[project @ 2002-09-17 14:26:50 by simonmar]
simonmar [Tue, 17 Sep 2002 14:26:50 +0000 (14:26 +0000)]
[project @ 2002-09-17 14:26:50 by simonmar]
Fix search-and-replace-o:  s/%lt/&lt

MERGE TO STABLE

21 years ago[project @ 2002-09-17 13:00:14 by simonpj]
simonpj [Tue, 17 Sep 2002 13:00:15 +0000 (13:00 +0000)]
[project @ 2002-09-17 13:00:14 by simonpj]
--------------------------------------
Another attempt to make unbound type
variables in RULES work right
--------------------------------------

Sigh.  I'm trying to find the unbound type variables on the LHS of a
RULE.  I thought I could just gather free vars, but that does not work
well on an un-zonked LHS, because a big lambda might bind a type variable
that looks different (pre-zonking) but isn't really.

Oh well, back to plan B which is more work but more robust.

Now the zonking phase (in TcHsSyn) arranges to zonk types in a different
way (zonkTypeCollecting) on a rule LHS than in ordinary expressions
(zonkTypeZapping).  This is less dependent on the exact form of the LHS
(good) but involves another mutable variable (not unclean, but it's sad
to have to admit that mutable variables do sometimes allow you to make
non-invasive changes).

21 years ago[project @ 2002-09-17 12:34:31 by simonmar]
simonmar [Tue, 17 Sep 2002 12:34:31 +0000 (12:34 +0000)]
[project @ 2002-09-17 12:34:31 by simonmar]
and for good measure, use STGCALL1 rather than a bare C call.

21 years ago[project @ 2002-09-17 12:33:08 by simonmar]
simonmar [Tue, 17 Sep 2002 12:33:08 +0000 (12:33 +0000)]
[project @ 2002-09-17 12:33:08 by simonmar]
remove bogus return too.

21 years ago[project @ 2002-09-17 12:32:40 by simonmar]
simonmar [Tue, 17 Sep 2002 12:32:40 +0000 (12:32 +0000)]
[project @ 2002-09-17 12:32:40 by simonmar]
NON_ENTERABLE_ENTRY_CODE() should really barf() rather than attempting
a clean shutdown.

MERGE TO STABLE

21 years ago[project @ 2002-09-17 12:20:15 by simonmar]
simonmar [Tue, 17 Sep 2002 12:20:15 +0000 (12:20 +0000)]
[project @ 2002-09-17 12:20:15 by simonmar]
The GC wasn't properly marking pending signal handlers, which could
lead to "EVACUATED object entered!" errors.  Also, a race occurs if a
signal arrives during GC.  Two fixes:

  (a) mark all pending signal handlers during GC, and
  (b) block signals during GC

MERGE TO STABLE

21 years ago[project @ 2002-09-17 12:11:44 by simonmar]
simonmar [Tue, 17 Sep 2002 12:11:45 +0000 (12:11 +0000)]
[project @ 2002-09-17 12:11:44 by simonmar]
The GC wasn't properly marking pending signal handlers, which could
lead to "EVACUATED object entered!" errors.  Also, a race occurs if a
signal arrives during GC.  Two fixes:

  (a) mark all pending signal handlers during GC, and
  (b) block signals during GC

MERGE TO STABLE

21 years ago[project @ 2002-09-17 10:08:48 by simonpj]
simonpj [Tue, 17 Sep 2002 10:08:51 +0000 (10:08 +0000)]
[project @ 2002-09-17 10:08:48 by simonpj]
Unbork head...ruleLhsTvs does not crash now

21 years ago[project @ 2002-09-17 09:25:07 by simonpj]
simonpj [Tue, 17 Sep 2002 09:25:07 +0000 (09:25 +0000)]
[project @ 2002-09-17 09:25:07 by simonpj]
CString import only for mingw32

21 years ago[project @ 2002-09-16 14:09:35 by simonmar]
simonmar [Mon, 16 Sep 2002 14:09:35 +0000 (14:09 +0000)]
[project @ 2002-09-16 14:09:35 by simonmar]
Type signatures may only be given for unqualified variables

21 years ago[project @ 2002-09-16 12:45:59 by simonpj]
simonpj [Mon, 16 Sep 2002 12:45:59 +0000 (12:45 +0000)]
[project @ 2002-09-16 12:45:59 by simonpj]
Silly bug in plusImportAvails [HEAD only]

21 years ago[project @ 2002-09-16 10:39:11 by chak]
chak [Mon, 16 Sep 2002 10:39:11 +0000 (10:39 +0000)]
[project @ 2002-09-16 10:39:11 by chak]
Well, I was apparently not up-to-date on the latest Haddock config magic.
Removed the last change, which forced the use of an external installation
of Haddock.

21 years ago[project @ 2002-09-16 10:16:14 by simonmar]
simonmar [Mon, 16 Sep 2002 10:16:14 +0000 (10:16 +0000)]
[project @ 2002-09-16 10:16:14 by simonmar]
Instead of trying to convert $(ALL_DIRS) into a colon-separated list
of directories to pass to the compiler with -i, put each directory in
its own -i option.  This is more robust, the previous method was
sensitive to extra spaces in the ALL_DIRS list.

(should fix the current nightly breakage on the HEAD)

21 years ago[project @ 2002-09-16 07:31:11 by simonpj]
simonpj [Mon, 16 Sep 2002 07:31:12 +0000 (07:31 +0000)]
[project @ 2002-09-16 07:31:11 by simonpj]
--------------------------------
   Quantify over unbound type vars in RULE lhs's
--------------------------------

-- We need to gather the type variables mentioned on the LHS so we can
-- quantify over them.  Example:
--   data T a = C
--
--   foo :: T a -> Int
--   foo C = 1
--
--   {-# RULES "myrule"  foo C = 1 #-}
--
-- After type checking the LHS becomes (foo a (C a))
-- and we do not want to zap the unbound tyvar 'a' to (), because
-- that limits the applicability of the rule.  Instead, we
-- want to quantify over it!

This commit fixes the problem, discovered by Manuel.  It uses a
free-variable finder for RULE lhs's (TcRule.ruleLhsTvs) which relies
on the fact that the LHS of a rule can only take ver forms
(c.f RnSource.validRuleLhs).

21 years ago[project @ 2002-09-16 07:09:24 by sof]
sof [Mon, 16 Sep 2002 07:09:24 +0000 (07:09 +0000)]
[project @ 2002-09-16 07:09:24 by sof]
copy in tools from a mingw dist tree

21 years ago[project @ 2002-09-16 07:08:26 by chak]
chak [Mon, 16 Sep 2002 07:08:26 +0000 (07:08 +0000)]
[project @ 2002-09-16 07:08:26 by chak]
Use external Haddock installation

21 years ago[project @ 2002-09-15 19:38:28 by lewie]
lewie [Sun, 15 Sep 2002 19:38:28 +0000 (19:38 +0000)]
[project @ 2002-09-15 19:38:28 by lewie]
Ergh!  Don't mix `%doc <relativepathname>' with `%doc <absolutepathname>'
where <absolutepathname> is the standard doc directory (i.e. the same place
where the <relativepathname> files will be copied).
The <relativepathname> version has the hidden side effect of removing
the contents of the doc directory first (and thus your carefully installed
files).  The whole distinction which makes a special case for relative
paths is a crock in the first place ;-)

21 years ago[project @ 2002-09-15 03:47:21 by lewie]
lewie [Sun, 15 Sep 2002 03:47:21 +0000 (03:47 +0000)]
[project @ 2002-09-15 03:47:21 by lewie]
Wibble!!

21 years ago[project @ 2002-09-15 00:00:09 by lewie]
lewie [Sun, 15 Sep 2002 00:00:09 +0000 (00:00 +0000)]
[project @ 2002-09-15 00:00:09 by lewie]
Update spec.  Fixes doc problems.  Worth merging to 5.04-branch.

21 years ago[project @ 2002-09-14 01:08:07 by dons]
dons [Sat, 14 Sep 2002 01:08:07 +0000 (01:08 +0000)]
[project @ 2002-09-14 01:08:07 by dons]
RTLD_{GLOBAL,NOW} should be HAVE_RTLD{GLOBAL,NOW}

21 years ago[project @ 2002-09-14 01:06:27 by dons]
dons [Sat, 14 Sep 2002 01:06:27 +0000 (01:06 +0000)]
[project @ 2002-09-14 01:06:27 by dons]
RTLD_{GLOBAL,NOW} should have been HAVE_RTLD{GLOBAL,NOW}

21 years ago[project @ 2002-09-13 16:09:26 by simonpj]
simonpj [Fri, 13 Sep 2002 16:09:26 +0000 (16:09 +0000)]
[project @ 2002-09-13 16:09:26 by simonpj]
Native code gen primpops (courtesy Julian)

21 years ago[project @ 2002-09-13 16:06:28 by simonpj]
simonpj [Fri, 13 Sep 2002 16:06:29 +0000 (16:06 +0000)]
[project @ 2002-09-13 16:06:28 by simonpj]
wibbles

21 years ago[project @ 2002-09-13 15:17:15 by simonpj]
simonpj [Fri, 13 Sep 2002 15:17:16 +0000 (15:17 +0000)]
[project @ 2002-09-13 15:17:15 by simonpj]
Ooops... forgot these droppings, sorry

21 years ago[project @ 2002-09-13 15:02:25 by simonpj]
simonpj [Fri, 13 Sep 2002 15:02:50 +0000 (15:02 +0000)]
[project @ 2002-09-13 15:02:25 by simonpj]
--------------------------------------
Make Template Haskell into the HEAD
--------------------------------------

This massive commit transfers to the HEAD all the stuff that
Simon and Tim have been doing on Template Haskell.  The
meta-haskell-branch is no more!

WARNING: make sure that you

  * Update your links if you are using link trees.
    Some modules have been added, some have gone away.

  * Do 'make clean' in all library trees.
    The interface file format has changed, and you can
    get strange panics (sadly) if GHC tries to read old interface files:
    e.g.  ghc-5.05: panic! (the `impossible' happened, GHC version 5.05):
  Binary.get(TyClDecl): ForeignType

  * You need to recompile the rts too; Linker.c has changed

However the libraries are almost unaltered; just a tiny change in
Base, and to the exports in Prelude.

NOTE: so far as TH itself is concerned, expression splices work
fine, but declaration splices are not complete.

---------------
The main change
---------------

The main structural change: renaming and typechecking have to be
interleaved, because we can't rename stuff after a declaration splice
until after we've typechecked the stuff before (and the splice
itself).

* Combine the renamer and typecheker monads into one
(TcRnMonad, TcRnTypes)
  These two replace TcMonad and RnMonad

* Give them a single 'driver' (TcRnDriver).  This driver
  replaces TcModule.lhs and Rename.lhs

* The haskell-src library package has a module
Language/Haskell/THSyntax
  which defines the Haskell data type seen by the TH programmer.

* New modules:
hsSyn/Convert.hs  converts THSyntax -> HsSyn
deSugar/DsMeta.hs  converts HsSyn -> THSyntax

* New module typecheck/TcSplice type-checks Template Haskell splices.

-------------
Linking stuff
-------------

* ByteCodeLink has been split into
ByteCodeLink (which links)
ByteCodeAsm (which assembles)

* New module ghci/ObjLink is the object-code linker.

* compMan/CmLink is removed entirely (was out of place)
  Ditto CmTypes (which was tiny)

* Linker.c initialises the linker when it is first used (no need to call
  initLinker any more).  Template Haskell makes it harder to know when
  and whether to initialise the linker.

-------------------------------------
Gathering the LIE in the type checker
-------------------------------------

* Instead of explicitly gathering constraints in the LIE
tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE)
  we now dump the constraints into a mutable varabiable carried
  by the monad, so we get
tcExpr :: RenamedExpr -> TcM TypecheckedExpr

  Much less clutter in the code, and more efficient too.
  (Originally suggested by Mark Shields.)

-----------------
Remove "SysNames"
-----------------

Because the renamer and the type checker were entirely separate,
we had to carry some rather tiresome implicit binders (or "SysNames")
along inside some of the HsDecl data structures.  They were both
tiresome and fragile.

Now that the typechecker and renamer are more intimately coupled,
we can eliminate SysNames (well, mostly... default methods still
carry something similar).

-------------
Clean up HsPat
-------------

One big clean up is this: instead of having two HsPat types (InPat and
OutPat), they are now combined into one.  This is more consistent with
the way that HsExpr etc is handled; there are some 'Out' constructors
for the type checker output.

So:
HsPat.InPat --> HsPat.Pat
HsPat.OutPat --> HsPat.Pat
No 'pat' type parameter in HsExpr, HsBinds, etc

Constructor patterns are nicer now: they use
HsPat.HsConDetails
for the three cases of constructor patterns:
prefix, infix, and record-bindings

The *same* data type HsConDetails is used in the type
declaration of the data type (HsDecls.TyData)

Lots of associated clean-up operations here and there.  Less code.
Everything is wonderful.

21 years ago[project @ 2002-09-13 15:01:40 by simonpj]
simonpj [Fri, 13 Sep 2002 15:01:40 +0000 (15:01 +0000)]
[project @ 2002-09-13 15:01:40 by simonpj]
Make ghc-pkg independent of hslibs

21 years ago[project @ 2002-09-13 08:54:44 by simonpj]
simonpj [Fri, 13 Sep 2002 08:54:44 +0000 (08:54 +0000)]
[project @ 2002-09-13 08:54:44 by simonpj]
Correct comments

21 years ago[project @ 2002-09-11 10:14:53 by simonpj]
simonpj [Wed, 11 Sep 2002 10:14:53 +0000 (10:14 +0000)]
[project @ 2002-09-11 10:14:53 by simonpj]
Yet another correction to earlier commit..
*now* those rank-2 pattern matches should work

MERGE TO STABLE

21 years ago[project @ 2002-09-11 10:14:32 by simonpj]
simonpj [Wed, 11 Sep 2002 10:14:32 +0000 (10:14 +0000)]
[project @ 2002-09-11 10:14:32 by simonpj]
Remove bogus warning

21 years ago[project @ 2002-09-10 16:07:48 by simonmar]
simonmar [Tue, 10 Sep 2002 16:07:48 +0000 (16:07 +0000)]
[project @ 2002-09-10 16:07:48 by simonmar]
Tidy up error message for "funny global things"

21 years ago[project @ 2002-09-10 12:31:54 by simonmar]
simonmar [Tue, 10 Sep 2002 12:31:54 +0000 (12:31 +0000)]
[project @ 2002-09-10 12:31:54 by simonmar]
Put debugging output in #ifdef DEBUG

MERGE TO STABLE

21 years ago[project @ 2002-09-10 11:38:11 by simonpj]
simonpj [Tue, 10 Sep 2002 11:38:11 +0000 (11:38 +0000)]
[project @ 2002-09-10 11:38:11 by simonpj]
Remove redundant debug printing

21 years ago[project @ 2002-09-10 10:43:52 by simonmar]
simonmar [Tue, 10 Sep 2002 10:43:52 +0000 (10:43 +0000)]
[project @ 2002-09-10 10:43:52 by simonmar]
Fix a(nother) bug in the new THUNK_SELECTOR code.  Hopefully should
fix the crashes seen in the last few nightly builds.

21 years ago[project @ 2002-09-10 09:26:24 by simonmar]
simonmar [Tue, 10 Sep 2002 09:26:24 +0000 (09:26 +0000)]
[project @ 2002-09-10 09:26:24 by simonmar]
Add notes on how to build a .a file to the docs, as requested by Koen
Claessen.

21 years ago[project @ 2002-09-09 14:04:37 by simonpj]
simonpj [Mon, 9 Sep 2002 14:04:37 +0000 (14:04 +0000)]
[project @ 2002-09-09 14:04:37 by simonpj]
Sigh! forgot one case!  MERGE TO STABLE

21 years ago[project @ 2002-09-09 13:49:08 by simonpj]
simonpj [Mon, 9 Sep 2002 13:49:08 +0000 (13:49 +0000)]
[project @ 2002-09-09 13:49:08 by simonpj]
Cosmetics only

21 years ago[project @ 2002-09-09 13:48:35 by simonpj]
simonpj [Mon, 9 Sep 2002 13:48:35 +0000 (13:48 +0000)]
[project @ 2002-09-09 13:48:35 by simonpj]
Correction to earlier commit.. *now* those rank-2 pattern matches should work

MERGE TO STABLE

21 years ago[project @ 2002-09-09 13:48:01 by simonpj]
simonpj [Mon, 9 Sep 2002 13:48:01 +0000 (13:48 +0000)]
[project @ 2002-09-09 13:48:01 by simonpj]
The body of a for-all should be of kind *

MERGE TO STABLE

21 years ago[project @ 2002-09-09 12:57:47 by simonpj]
simonpj [Mon, 9 Sep 2002 12:57:48 +0000 (12:57 +0000)]
[project @ 2002-09-09 12:57:47 by simonpj]
--------------------------------
Fix rank-2 pattern-match failure
--------------------------------

This fixes the failure when you have a rank-2 type sig
matching a data type pattern.  Thus

data T a = T1 | T2 a

f :: (forall x. T x) -> Int
f T1 = ...

This crashes GHC 5.04

21 years ago[project @ 2002-09-09 12:55:52 by simonpj]
simonpj [Mon, 9 Sep 2002 12:55:53 +0000 (12:55 +0000)]
[project @ 2002-09-09 12:55:52 by simonpj]
--------------------------------------
Attach inline pragmas to class methods
--------------------------------------

This fix makes INLINE pragmas on method bindings (in class
or instance decls) work properly.

It seems to have been hanging around in my tree for some time.
To be on the safe side, let's not merge this into 5.04.1, although
it should be fine (an an improvement).

21 years ago[project @ 2002-09-09 12:50:26 by simonpj]
simonpj [Mon, 9 Sep 2002 12:50:26 +0000 (12:50 +0000)]
[project @ 2002-09-09 12:50:26 by simonpj]
Formatting only

21 years ago[project @ 2002-09-09 12:18:09 by simonpj]
simonpj [Mon, 9 Sep 2002 12:18:09 +0000 (12:18 +0000)]
[project @ 2002-09-09 12:18:09 by simonpj]
Formatting only

21 years ago[project @ 2002-09-09 12:11:44 by simonmar]
simonmar [Mon, 9 Sep 2002 12:11:44 +0000 (12:11 +0000)]
[project @ 2002-09-09 12:11:44 by simonmar]
Make sure we get the compiler's own Pretty library when we #include
../utils/ghc-pkg/Package.hs.

21 years ago[project @ 2002-09-09 12:10:01 by simonmar]
simonmar [Mon, 9 Sep 2002 12:10:01 +0000 (12:10 +0000)]
[project @ 2002-09-09 12:10:01 by simonmar]
Urk, the 'import Pretty' in this module was a bit of a hack; when
compiled as part of the standalone ghc-pkg tool it referred to the
Pretty library from the util package, but when compiled as part of the
compiler it referred to the compiler's own Pretty module.  Hack around
this.

21 years ago[project @ 2002-09-09 11:44:13 by simonmar]
simonmar [Mon, 9 Sep 2002 11:44:13 +0000 (11:44 +0000)]
[project @ 2002-09-09 11:44:13 by simonmar]
Build without hslibs on GHC >= 5.04

21 years ago[project @ 2002-09-09 11:39:42 by simonmar]
simonmar [Mon, 9 Sep 2002 11:39:43 +0000 (11:39 +0000)]
[project @ 2002-09-09 11:39:42 by simonmar]
Build without hslibs on GHC >= 5.04

21 years ago[project @ 2002-09-09 11:32:37 by simonmar]
simonmar [Mon, 9 Sep 2002 11:32:38 +0000 (11:32 +0000)]
[project @ 2002-09-09 11:32:37 by simonmar]
Build without hslibs on GHC >= 5.04

21 years ago[project @ 2002-09-07 12:07:53 by panne]
panne [Sat, 7 Sep 2002 12:07:53 +0000 (12:07 +0000)]
[project @ 2002-09-07 12:07:53 by panne]
Tentative fix for the recent blkcnt_t trouble

21 years ago[project @ 2002-09-06 17:56:40 by panne]
panne [Fri, 6 Sep 2002 17:56:47 +0000 (17:56 +0000)]
[project @ 2002-09-06 17:56:40 by panne]
Nuke the unsupported hslibs version of HOpenGL on the HEAD, too. Now
we are only left with two versions, which I think is OK: A stable one
(not in the fptools repository, but on my web site) and a cool, but
*very* incomplete one (currently only GLUT) for bleeding edge people
in the hierarchical libraries parts of the repository.

21 years ago[project @ 2002-09-06 14:40:28 by simonmar]
simonmar [Fri, 6 Sep 2002 14:40:28 +0000 (14:40 +0000)]
[project @ 2002-09-06 14:40:28 by simonmar]
Disallow ForeignObj as well as ForeignPtr FFI arguments

21 years ago[project @ 2002-09-06 14:35:42 by simonmar]
simonmar [Fri, 6 Sep 2002 14:35:45 +0000 (14:35 +0000)]
[project @ 2002-09-06 14:35:42 by simonmar]
Finally separate the compiler from hslibs.

Mainly import wibbles, and use the new POSIX library when
bootstrapping.