ghc-hetmet.git
21 years ago[project @ 2003-10-27 14:08:46 by simonpj]
simonpj [Mon, 27 Oct 2003 14:08:46 +0000 (14:08 +0000)]
[project @ 2003-10-27 14:08:46 by simonpj]
Fix to super-class loop avoidance code; commented in the file; tcrun020 tests

21 years ago[project @ 2003-10-27 14:08:04 by simonpj]
simonpj [Mon, 27 Oct 2003 14:08:06 +0000 (14:08 +0000)]
[project @ 2003-10-27 14:08:04 by simonpj]
Improve duplicate-instance reporting; swap inst-env param order

21 years ago[project @ 2003-10-27 14:07:01 by simonpj]
simonpj [Mon, 27 Oct 2003 14:07:21 +0000 (14:07 +0000)]
[project @ 2003-10-27 14:07:01 by simonpj]
Comments only

21 years ago[project @ 2003-10-27 14:06:06 by simonpj]
simonpj [Mon, 27 Oct 2003 14:06:06 +0000 (14:06 +0000)]
[project @ 2003-10-27 14:06:06 by simonpj]
Always qualify in defaultErrStyle

21 years ago[project @ 2003-10-27 14:05:17 by simonpj]
simonpj [Mon, 27 Oct 2003 14:05:17 +0000 (14:05 +0000)]
[project @ 2003-10-27 14:05:17 by simonpj]
Improve error message when iface decl not found

21 years ago[project @ 2003-10-27 14:04:28 by simonpj]
simonpj [Mon, 27 Oct 2003 14:04:28 +0000 (14:04 +0000)]
[project @ 2003-10-27 14:04:28 by simonpj]
Eliminate bogus warning

21 years ago[project @ 2003-10-27 14:03:59 by simonpj]
simonpj [Mon, 27 Oct 2003 14:03:59 +0000 (14:03 +0000)]
[project @ 2003-10-27 14:03:59 by simonpj]
Remove unused function dontAddErrLoc

21 years ago[project @ 2003-10-24 14:45:38 by stolz]
stolz [Fri, 24 Oct 2003 14:45:38 +0000 (14:45 +0000)]
[project @ 2003-10-24 14:45:38 by stolz]
Initialize hp_file for heap profiling (code stolen from Profiling.c).
This bug might suggest some general reviewing of this code-path...

Closes: SF bug [ 827485 ] Heap profile w/ debugging RTS dumps core
http://sourceforge.net/tracker/index.php?func=detail&aid=827485&group_id=8032&atid=108032

21 years ago[project @ 2003-10-24 11:45:40 by simonmar]
simonmar [Fri, 24 Oct 2003 11:45:40 +0000 (11:45 +0000)]
[project @ 2003-10-24 11:45:40 by simonmar]
Fix bugs in previous commit.

21 years ago[project @ 2003-10-24 09:56:45 by simonmar]
simonmar [Fri, 24 Oct 2003 09:56:45 +0000 (09:56 +0000)]
[project @ 2003-10-24 09:56:45 by simonmar]
When allocating a large object in gen 0, update the n_large_blocks
count.  I think this is just an accounting issue, and doesn't actually
cause a space leak, but it does result in an assertion failure when
running with sanity checking on.

21 years ago[project @ 2003-10-24 09:52:51 by simonmar]
simonmar [Fri, 24 Oct 2003 09:52:51 +0000 (09:52 +0000)]
[project @ 2003-10-24 09:52:51 by simonmar]
Remove a comment that appears to contradict the code.

21 years ago[project @ 2003-10-24 09:00:59 by simonmar]
simonmar [Fri, 24 Oct 2003 09:00:59 +0000 (09:00 +0000)]
[project @ 2003-10-24 09:00:59 by simonmar]
Set the mut_link of a MUT_ARR_PTRS_FROZEN to NULL.  This might be the
cause of the stage2 crash; I'll check as soon as the build completes.

21 years ago[project @ 2003-10-23 12:23:00 by simonmar]
simonmar [Thu, 23 Oct 2003 12:23:00 +0000 (12:23 +0000)]
[project @ 2003-10-23 12:23:00 by simonmar]
Add missing -optF flag.

21 years ago[project @ 2003-10-23 12:22:37 by simonmar]
simonmar [Thu, 23 Oct 2003 12:22:37 +0000 (12:22 +0000)]
[project @ 2003-10-23 12:22:37 by simonmar]
Fix markup

21 years ago[project @ 2003-10-23 11:24:43 by simonpj]
simonpj [Thu, 23 Oct 2003 11:24:43 +0000 (11:24 +0000)]
[project @ 2003-10-23 11:24:43 by simonpj]
Another HsForAllTy wibble

21 years ago[project @ 2003-10-23 10:13:18 by simonmar]
simonmar [Thu, 23 Oct 2003 10:13:18 +0000 (10:13 +0000)]
[project @ 2003-10-23 10:13:18 by simonmar]
Add missing table of -opt<blah> options.

21 years ago[project @ 2003-10-23 08:06:48 by simonpj]
simonpj [Thu, 23 Oct 2003 08:06:48 +0000 (08:06 +0000)]
[project @ 2003-10-23 08:06:48 by simonpj]
Wibble for HsForAllTy

21 years ago[project @ 2003-10-22 16:25:42 by simonpj]
simonpj [Wed, 22 Oct 2003 16:25:43 +0000 (16:25 +0000)]
[project @ 2003-10-22 16:25:42 by simonpj]
Do foralls right in the renamer

21 years ago[project @ 2003-10-22 15:00:59 by simonmar]
simonmar [Wed, 22 Oct 2003 15:01:00 +0000 (15:01 +0000)]
[project @ 2003-10-22 15:00:59 by simonmar]
Fix a nasty bug in the GC mutable list handling, which shows up when
an array is frozen and then unsafeThaw#'d.  The array could end up on
the mutable list twice.

Fixes SourceForge bug #819116.

21 years ago[project @ 2003-10-22 14:31:09 by simonmar]
simonmar [Wed, 22 Oct 2003 14:31:11 +0000 (14:31 +0000)]
[project @ 2003-10-22 14:31:09 by simonmar]
- In GHCi & Template Haskell, give a warning for things mentioned
  on the command line that we don't recognise, and then ignore them.
  In batch mode, these are still passed to the linker as before.

- Clean up & rename the filename-suffix recognising functions in
  DriverPhases. There's probably a better place for these, but I've left
  them where they are for now.

21 years ago[project @ 2003-10-22 11:11:59 by simonmar]
simonmar [Wed, 22 Oct 2003 11:11:59 +0000 (11:11 +0000)]
[project @ 2003-10-22 11:11:59 by simonmar]
thread_stack(RET_BCO): Grab the pointer to the BCO *before* threading
it.  Fixes crashes when using compacting GC with GHCi.

I noticed while debugging this that compacting GC is horrendously slow
now, which might have something to do with the new eval/apply PAP
layouts.  That's something to investigate later.

21 years ago[project @ 2003-10-22 08:54:36 by dons]
dons [Wed, 22 Oct 2003 08:54:36 +0000 (08:54 +0000)]
[project @ 2003-10-22 08:54:36 by dons]
mips64-sgi-irix6.5 works unregisterised

21 years ago[project @ 2003-10-21 13:14:12 by simonpj]
simonpj [Tue, 21 Oct 2003 13:14:12 +0000 (13:14 +0000)]
[project @ 2003-10-21 13:14:12 by simonpj]
Wibbles

21 years ago[project @ 2003-10-21 12:54:17 by simonpj]
simonpj [Tue, 21 Oct 2003 12:54:22 +0000 (12:54 +0000)]
[project @ 2003-10-21 12:54:17 by simonpj]
1. A tiresome change to HsType, to keep a record of whether or not
   the HsForAll was originally explicitly-quantified.  This is
   solely so that the type checker can print out messages that
   show the source code the programmer wrote.  Tiresome but
   easy.

2. Improve reporting of kind errors.

21 years ago[project @ 2003-10-21 12:52:58 by simonpj]
simonpj [Tue, 21 Oct 2003 12:52:58 +0000 (12:52 +0000)]
[project @ 2003-10-21 12:52:58 by simonpj]
Show generic-ness when printing a data decl

21 years ago[project @ 2003-10-21 12:48:57 by simonpj]
simonpj [Tue, 21 Oct 2003 12:48:57 +0000 (12:48 +0000)]
[project @ 2003-10-21 12:48:57 by simonpj]
Wibble to reporting duplicate instance decls

21 years ago[project @ 2003-10-21 12:36:29 by simonpj]
simonpj [Tue, 21 Oct 2003 12:36:30 +0000 (12:36 +0000)]
[project @ 2003-10-21 12:36:29 by simonpj]
Report duplicate instance declarations

21 years ago[project @ 2003-10-21 11:51:15 by stolz]
stolz [Tue, 21 Oct 2003 11:51:15 +0000 (11:51 +0000)]
[project @ 2003-10-21 11:51:15 by stolz]
Save one fcntl-call in setNonBlockingFd when Fd is already non-blocking.

Please merge.

21 years ago[project @ 2003-10-21 11:42:30 by simonmar]
simonmar [Tue, 21 Oct 2003 11:42:30 +0000 (11:42 +0000)]
[project @ 2003-10-21 11:42:30 by simonmar]
Change the filename policies (again).  Now the interface file and
object file always follow the source file unless the -odir or -hidir
options are specified.

21 years ago[project @ 2003-10-21 11:25:40 by simonmar]
simonmar [Tue, 21 Oct 2003 11:25:40 +0000 (11:25 +0000)]
[project @ 2003-10-21 11:25:40 by simonmar]
Add a FAQ entry for Ctrl-D and EOF.

21 years ago[project @ 2003-10-21 10:06:33 by simonmar]
simonmar [Tue, 21 Oct 2003 10:06:33 +0000 (10:06 +0000)]
[project @ 2003-10-21 10:06:33 by simonmar]
Clarify one paragraph in the recompilation checker section (I hope).

21 years ago[project @ 2003-10-21 03:38:07 by sof]
sof [Tue, 21 Oct 2003 03:38:07 +0000 (03:38 +0000)]
[project @ 2003-10-21 03:38:07 by sof]
stg_InstallConsoleEvent(): registering generic_handler() once will do

21 years ago[project @ 2003-10-20 18:50:45 by panne]
panne [Mon, 20 Oct 2003 18:50:45 +0000 (18:50 +0000)]
[project @ 2003-10-20 18:50:45 by panne]
Fixed previous commit. Negation is the root of all evil... :-)

21 years ago[project @ 2003-10-20 17:15:27 by sof]
sof [Mon, 20 Oct 2003 17:15:29 +0000 (17:15 +0000)]
[project @ 2003-10-20 17:15:27 by sof]
Console event handling support (i.e., Haskell-side support for SIGINT under win32).

win32/ConsoleHandler.h implements the Signals.h API. No library support
for installing user event handlers included in this commit.

21 years ago[project @ 2003-10-20 15:56:23 by simonmar]
simonmar [Mon, 20 Oct 2003 15:56:23 +0000 (15:56 +0000)]
[project @ 2003-10-20 15:56:23 by simonmar]
Check type of wint_t

21 years ago[project @ 2003-10-20 14:04:07 by simonpj]
simonpj [Mon, 20 Oct 2003 14:04:07 +0000 (14:04 +0000)]
[project @ 2003-10-20 14:04:07 by simonpj]
Wibble to the last commit; report derived warnings with -dppr-debug

21 years ago[project @ 2003-10-20 14:02:19 by simonpj]
simonpj [Mon, 20 Oct 2003 14:02:21 +0000 (14:02 +0000)]
[project @ 2003-10-20 14:02:19 by simonpj]
Suppress renamer warnings (such as unused variables) when
renaming stuff generated by 'deriving' code.

21 years ago[project @ 2003-10-20 08:52:36 by simonmar]
simonmar [Mon, 20 Oct 2003 08:52:36 +0000 (08:52 +0000)]
[project @ 2003-10-20 08:52:36 by simonmar]
merge rev. 1.60.2.1 (appears to have been committed on the branch by mistake).

21 years ago[project @ 2003-10-17 17:52:33 by panne]
panne [Fri, 17 Oct 2003 17:52:33 +0000 (17:52 +0000)]
[project @ 2003-10-17 17:52:33 by panne]
Add config.cache to DIST_CLEAN_FILES and remove autom4te.cache subdir
for every clean* target

21 years ago[project @ 2003-10-16 20:54:12 by sof]
sof [Thu, 16 Oct 2003 20:54:12 +0000 (20:54 +0000)]
[project @ 2003-10-16 20:54:12 by sof]
printStackChunk(): attempt to handle RET_FUNs

21 years ago[project @ 2003-10-16 10:19:27 by simonpj]
simonpj [Thu, 16 Oct 2003 10:19:28 +0000 (10:19 +0000)]
[project @ 2003-10-16 10:19:27 by simonpj]
When type-checking an interface in --make, when the source file hasn't
changed, we must bring into scope all the things defined in the interface.
This was breaking --make badly.

The epicentre here is TcIface.typecheckIface

21 years ago[project @ 2003-10-14 15:03:04 by simonpj]
simonpj [Tue, 14 Oct 2003 15:03:04 +0000 (15:03 +0000)]
[project @ 2003-10-14 15:03:04 by simonpj]
..and make RnExpr match RnSource too

21 years ago[project @ 2003-10-14 14:58:44 by panne]
panne [Tue, 14 Oct 2003 14:58:44 +0000 (14:58 +0000)]
[project @ 2003-10-14 14:58:44 by panne]
Synched .hi-boot files with reality (untested)

21 years ago[project @ 2003-10-13 18:33:01 by sof]
sof [Mon, 13 Oct 2003 18:33:01 +0000 (18:33 +0000)]
[project @ 2003-10-13 18:33:01 by sof]
supply missing AC_DEFINE_UNQUOTED() descr arg

21 years ago[project @ 2003-10-13 14:54:37 by simonpj]
simonpj [Mon, 13 Oct 2003 14:54:40 +0000 (14:54 +0000)]
[project @ 2003-10-13 14:54:37 by simonpj]
Type error cosmetics

21 years ago[project @ 2003-10-13 10:43:02 by simonpj]
simonpj [Mon, 13 Oct 2003 10:43:04 +0000 (10:43 +0000)]
[project @ 2003-10-13 10:43:02 by simonpj]
Deal corectly with rules for Ids defined in this module,
even when they are imported (as orphans) from other modules.

The epicentre for this stuff is SimplCore.

21 years ago[project @ 2003-10-13 10:41:43 by simonpj]
simonpj [Mon, 13 Oct 2003 10:41:43 +0000 (10:41 +0000)]
[project @ 2003-10-13 10:41:43 by simonpj]
Add idIsFrom

21 years ago[project @ 2003-10-13 10:41:30 by simonpj]
simonpj [Mon, 13 Oct 2003 10:41:31 +0000 (10:41 +0000)]
[project @ 2003-10-13 10:41:30 by simonpj]
Cosmetics

21 years ago[project @ 2003-10-13 05:15:50 by sof]
sof [Mon, 13 Oct 2003 05:15:50 +0000 (05:15 +0000)]
[project @ 2003-10-13 05:15:50 by sof]
oops, fix 'test' usage

21 years ago[project @ 2003-10-13 05:08:22 by sof]
sof [Mon, 13 Oct 2003 05:08:22 +0000 (05:08 +0000)]
[project @ 2003-10-13 05:08:22 by sof]
FPTOOLS_CHECK_HTYPE: mapping unsupported types to NotReallyAType is less than useful; simply don't define the symbol

21 years ago[project @ 2003-10-13 03:25:38 by sof]
sof [Mon, 13 Oct 2003 03:25:38 +0000 (03:25 +0000)]
[project @ 2003-10-13 03:25:38 by sof]
use AC_CHECK_HEADERS() when looking for regex.h

21 years ago[project @ 2003-10-12 13:24:52 by igloo]
igloo [Sun, 12 Oct 2003 13:24:52 +0000 (13:24 +0000)]
[project @ 2003-10-12 13:24:52 by igloo]
#ifdef IN_STG_CODE -> #if IN_STG_CODE

21 years ago[project @ 2003-10-10 18:26:24 by simonpj]
simonpj [Fri, 10 Oct 2003 18:26:24 +0000 (18:26 +0000)]
[project @ 2003-10-10 18:26:24 by simonpj]
Use tcIsTyVarTy

21 years ago[project @ 2003-10-10 15:45:04 by simonpj]
simonpj [Fri, 10 Oct 2003 15:45:07 +0000 (15:45 +0000)]
[project @ 2003-10-10 15:45:04 by simonpj]
Use tcIsTyVarTy not isTyVarTy; and move isPredTy

21 years ago[project @ 2003-10-10 12:42:30 by simonpj]
simonpj [Fri, 10 Oct 2003 12:42:31 +0000 (12:42 +0000)]
[project @ 2003-10-10 12:42:30 by simonpj]
Arrange that loadImportedRules can see the module dependencies
of this module, and hence know whether or not to load an hi-boot
interface.

21 years ago[project @ 2003-10-10 12:42:19 by simonpj]
simonpj [Fri, 10 Oct 2003 12:42:19 +0000 (12:42 +0000)]
[project @ 2003-10-10 12:42:19 by simonpj]
GHC 5 hi-boot file

21 years ago[project @ 2003-10-10 09:39:33 by simonpj]
simonpj [Fri, 10 Oct 2003 09:39:34 +0000 (09:39 +0000)]
[project @ 2003-10-10 09:39:33 by simonpj]
Make rule importing work properly

21 years ago[project @ 2003-10-10 09:39:06 by simonpj]
simonpj [Fri, 10 Oct 2003 09:39:06 +0000 (09:39 +0000)]
[project @ 2003-10-10 09:39:06 by simonpj]
Fix hi-boot file for GHC 5xx

21 years ago[project @ 2003-10-10 07:34:34 by simonpj]
simonpj [Fri, 10 Oct 2003 07:34:35 +0000 (07:34 +0000)]
[project @ 2003-10-10 07:34:34 by simonpj]
Wibbles

21 years ago[project @ 2003-10-09 16:57:17 by stolz]
stolz [Thu, 9 Oct 2003 16:57:17 +0000 (16:57 +0000)]
[project @ 2003-10-09 16:57:17 by stolz]
Hrmbl. []-wibble.

21 years ago[project @ 2003-10-09 15:38:22 by simonpj]
simonpj [Thu, 9 Oct 2003 15:38:24 +0000 (15:38 +0000)]
[project @ 2003-10-09 15:38:22 by simonpj]
Wibles

21 years ago[project @ 2003-10-09 14:31:05 by simonpj]
simonpj [Thu, 9 Oct 2003 14:31:05 +0000 (14:31 +0000)]
[project @ 2003-10-09 14:31:05 by simonpj]
Forgot to remove HsCore (now IfaceSyn)

21 years ago[project @ 2003-10-09 13:59:33 by stolz]
stolz [Thu, 9 Oct 2003 13:59:33 +0000 (13:59 +0000)]
[project @ 2003-10-09 13:59:33 by stolz]
FreeBSD 4.X has an emtpy wctype.h, so test one of the affected
functions in Unicode.hsc if it's really there.

21 years ago[project @ 2003-10-09 13:17:09 by simonpj]
simonpj [Thu, 9 Oct 2003 13:17:09 +0000 (13:17 +0000)]
[project @ 2003-10-09 13:17:09 by simonpj]
Enable crudePprType without DEBUG

21 years ago[project @ 2003-10-09 13:11:30 by simonpj]
simonpj [Thu, 9 Oct 2003 13:11:31 +0000 (13:11 +0000)]
[project @ 2003-10-09 13:11:30 by simonpj]
Oops; forgot to add this entire directory!

21 years ago[project @ 2003-10-09 12:00:18 by simonpj]
simonpj [Thu, 9 Oct 2003 12:00:18 +0000 (12:00 +0000)]
[project @ 2003-10-09 12:00:18 by simonpj]
Add these two files to the preceding mega-commit

21 years ago[project @ 2003-10-09 11:58:39 by simonpj]
simonpj [Thu, 9 Oct 2003 11:59:43 +0000 (11:59 +0000)]
[project @ 2003-10-09 11:58:39 by simonpj]
-------------------------
GHC heart/lung transplant
-------------------------

This major commit changes the way that GHC deals with importing
types and functions defined in other modules, during renaming and
typechecking.  On the way I've changed or cleaned up numerous other
things, including many that I probably fail to mention here.

Major benefit: GHC should suck in many fewer interface files when
compiling (esp with -O).  (You can see this with -ddump-rn-stats.)

It's also some 1500 lines of code shorter than before.

** So expect bugs!  I can do a 3-stage bootstrap, and run
** the test suite, but you may be doing stuff I havn't tested.
**  Don't update if you are relying on a working HEAD.

In particular, (a) External Core and (b) GHCi are very little tested.

But please, please DO test this version!

------------------------
Big things
------------------------

Interface files, version control, and importing declarations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* There is a totally new data type for stuff that lives in interface files:
Original names IfaceType.IfaceExtName
Types IfaceType.IfaceType
Declarations (type,class,id) IfaceSyn.IfaceDecl
Unfoldings IfaceSyn.IfaceExpr
  (Previously we used HsSyn for type/class decls, and UfExpr for unfoldings.)
  The new data types are in iface/IfaceType and iface/IfaceSyn.  They are
  all instances of Binary, so they can be written into interface files.
  Previous engronkulation concering the binary instance of RdrName has
  gone away -- RdrName is not an instance of Binary any more.  Nor does
  Binary.lhs need to know about the ``current module'' which it used to,
  which made it specialised to GHC.

  A good feature of this is that the type checker for source code doesn't
  need to worry about the possibility that we might be typechecking interface
  file stuff.  Nor does it need to do renaming; we can typecheck direct from
  IfaceSyn, saving a whole pass (module TcIface)

* Stuff from interface files is sucked in *lazily*, rather than being eagerly
  sucked in by the renamer. Instead, we use unsafeInterleaveIO to capture
  a thunk for the unfolding of an imported function (say).  If that unfolding
  is every pulled on, TcIface will scramble over the unfolding, which may
  in turn pull in the interface files of things mentioned in the unfolding.

  The External Package State is held in a mutable variable so that it
  can be side-effected by this lazy-sucking-in process (which may happen
  way later, e.g. when the simplifier runs).   In effect, the EPS is a kind
  of lazy memo table, filled in as we suck things in.  Or you could think
  of it as a global symbol table, populated on demand.

* This lazy sucking is very cool, but it can lead to truly awful bugs. The
  intent is that updates to the symbol table happen atomically, but very bad
  things happen if you read the variable for the table, and then force a
  thunk which updates the table.  Updates can get lost that way. I regret
  this subtlety.

  One example of the way it showed up is that the top level of TidyPgm
  (which updates the global name cache) to be much more disciplined about
  those updates, since TidyPgm may itself force thunks which allocate new
  names.

* Version numbering in interface files has changed completely, fixing
  one major bug with ghc --make.  Previously, the version of A.f changed
  only if A.f's type and unfolding was textually different.  That missed
  changes to things that A.f's unfolding mentions; which was fixed by
  eagerly sucking in all of those things, and listing them in the module's
  usage list.  But that didn't work with --make, because they might have
  been already sucked in.

  Now, A.f's version changes if anything reachable from A.f (via interface
  files) changes.  A module with unchanged source code needs recompiling
  only if the versions of any of its free variables changes. [This isn't
  quite right for dictionary functions and rules, which aren't mentioned
  explicitly in the source.  There are extensive comments in module MkIface,
  where all version-handling stuff is done.]

* We don't need equality on HsDecls any more (because they aren't used in
  interface files).  Instead we have a specialised equality for IfaceSyn
  (eqIfDecl etc), which uses IfaceEq instead of Bool as its result type.
  See notes in IfaceSyn.

* The horrid bit of the renamer that tried to predict what instance decls
  would be needed has gone entirely.  Instead, the type checker simply
  sucks in whatever instance decls it needs, when it needs them.  Easy!

  Similarly, no need for 'implicitModuleFVs' and 'implicitTemplateHaskellFVs'
  etc.  Hooray!

Types and type checking
~~~~~~~~~~~~~~~~~~~~~~~
* Kind-checking of types is far far tidier (new module TcHsTypes replaces
  the badly-named TcMonoType).  Strangely, this was one of my
  original goals, because the kind check for types is the Right Place to
  do type splicing, but it just didn't fit there before.

* There's a new representation for newtypes in TypeRep.lhs.  Previously
  they were represented using "SourceTypes" which was a funny compromise.
  Now they have their own constructor in the Type datatype.  SourceType
  has turned back into PredType, which is what it used to be.

* Instance decl overlap checking done lazily.  Consider
instance C Int b
instance C a Int
  These were rejected before as overlapping, because when seeking
  (C Int Int) one couldn't tell which to use.  But there's no problem when
  seeking (C Bool Int); it can only be the second.

  So instead of checking for overlap when adding a new instance declaration,
  we check for overlap when looking up an Inst.  If we find more than one
  matching instance, we see if any of the candidates dominates the others
  (in the sense of being a substitution instance of all the others);
  and only if not do we report an error.

------------------------
     Medium things
------------------------

* The TcRn monad is generalised a bit further.  It's now based on utils/IOEnv.lhs,
  the IO monad with an environment.  The desugarer uses the monad too,
  so that anything it needs can get faulted in nicely.

* Reduce the number of wired-in things; in particular Word and Integer
  are no longer wired in.  The latter required HsLit.HsInteger to get a
  Type argument.  The 'derivable type classes' data types (:+:, :*: etc)
  are not wired in any more either (see stuff about derivable type classes
  below).

* The PersistentComilerState is now held in a mutable variable
  in the HscEnv.  Previously (a) it was passed to and then returned by
  many top-level functions, which was painful; (b) it was invariably
  accompanied by the HscEnv.  This change tidies up top-level plumbing
  without changing anything important.

* Derivable type classes are treated much more like 'deriving' clauses.
  Previously, the Ids for the to/from functions lived inside the TyCon,
  but now the TyCon simply records their existence (with a simple boolean).
  Anyone who wants to use them must look them up in the environment.

  This in turn makes it easy to generate the to/from functions (done
  in types/Generics) using HsSyn (like TcGenDeriv for ordinary derivings)
  instead of CoreSyn, which in turn means that (a) we don't have to figure
  out all the type arguments etc; and (b) it'll be type-checked for us.
  Generally, the task of generating the code has become easier, which is
  good for Manuel, who wants to make it more sophisticated.

* A Name now says what its "parent" is. For example, the parent of a data
  constructor is its type constructor; the parent of a class op is its
  class.  This relationship corresponds exactly to the Avail data type;
  there may be other places we can exploit it.  (I made the change so that
  version comparison in interface files would be a bit easier; but in
  fact it tided up other things here and there (see calls to
  Name.nameParent).  For example, the declaration pool, of declararations
  read from interface files, but not yet used, is now keyed only by the 'main'
  name of the declaration, not the subordinate names.

* New types OccEnv and OccSet, with the usual operations.
  OccNames can be efficiently compared, because they have uniques, thanks
  to the hashing implementation of FastStrings.

* The GlobalRdrEnv is now keyed by OccName rather than RdrName.  Not only
  does this halve the size of the env (because we don't need both qualified
  and unqualified versions in the env), but it's also more efficient because
  we can use a UniqFM instead of a FiniteMap.

  Consequential changes to Provenance, which has moved to RdrName.

* External Core remains a bit of a hack, as it was before, done with a mixture
  of HsDecls (so that recursiveness and argument variance is still inferred),
  and IfaceExprs (for value declarations).  It's not thoroughly tested.

------------------------
     Minor things
------------------------

* DataCon fields dcWorkId, dcWrapId combined into a single field
  dcIds, that is explicit about whether the data con is a newtype or not.
  MkId.mkDataConWorkId and mkDataConWrapId are similarly combined into
  MkId.mkDataConIds

* Choosing the boxing strategy is done for *source* type decls only, and
  hence is now in TcTyDecls, not DataCon.

* WiredIn names are distinguished by their n_sort field, not by their location,
  which was rather strange

* Define Maybes.mapCatMaybes :: (a -> Maybe b) -> [a] -> [b]
  and use it here and there

* Much better pretty-printing of interface files (--show-iface)

Many, many other small things.

------------------------
     File changes
------------------------
* New iface/ subdirectory
* Much of RnEnv has moved to iface/IfaceEnv
* MkIface and BinIface have moved from main/ to iface/
* types/Variance has been absorbed into typecheck/TcTyDecls
* RnHiFiles and RnIfaces have vanished entirely.  Their
  work is done by iface/LoadIface
* hsSyn/HsCore has gone, replaced by iface/IfaceSyn
* typecheck/TcIfaceSig has gone, replaced by iface/TcIface
* typecheck/TcMonoType has been renamed to typecheck/TcHsType
* basicTypes/Var.hi-boot and basicTypes/Generics.hi-boot have gone altogether

21 years ago[project @ 2003-10-08 10:37:25 by wolfgang]
wolfgang [Wed, 8 Oct 2003 10:37:25 +0000 (10:37 +0000)]
[project @ 2003-10-08 10:37:25 by wolfgang]
Remove apostrophe from #error directive text, as gcc doesn't like that,
even if the #error is ifdef'd out.

All other C compilers I know claim that this is correct C :-(.

merge to stable

21 years ago[project @ 2003-10-08 09:42:34 by wolfgang]
wolfgang [Wed, 8 Oct 2003 09:42:35 +0000 (09:42 +0000)]
[project @ 2003-10-08 09:42:34 by wolfgang]
Mac OS X/PowerPC:
Learn to cope with out-of-range relative jumps.

PowerPC relative branch instructions have a 24 bit displacement field.
As PPC code is always 4-byte-aligned, this yields a +-32MB range.
If a particular imported symbol is outside this range, we have to redirect
the jump to a short piece of new code that just loads the 32bit absolute
address and jumps there.

21 years ago[project @ 2003-10-05 20:18:36 by panne]
panne [Sun, 5 Oct 2003 20:18:36 +0000 (20:18 +0000)]
[project @ 2003-10-05 20:18:36 by panne]
Unbreak the 2nd stage of non-threaded-RTS builds by #ifdefing out a
call to wakeBlockedWorkerThread. This should probably fixed more
cleanly by taking an OO view, i.e. always defining this function, but
doing nothing in the non-threaded case. The final decision on this
issue is left to the Masters of the Threads (tm)...

21 years ago[project @ 2003-10-05 20:14:49 by panne]
panne [Sun, 5 Oct 2003 20:14:49 +0000 (20:14 +0000)]
[project @ 2003-10-05 20:14:49 by panne]
Merged Ross' patch for Hugs:

Tweak to the FPTOOLS_HAVE_OPENGL: when testing for the GLUT lib,
include the GL/GLU/GLX libs just discovered.  While most platforms
don't require this, mysteriously some (e.g. OpenBSD) do.

21 years ago[project @ 2003-10-03 13:14:53 by simonmar]
simonmar [Fri, 3 Oct 2003 13:14:53 +0000 (13:14 +0000)]
[project @ 2003-10-03 13:14:53 by simonmar]
Fix typo.

21 years ago[project @ 2003-10-02 22:31:46 by sof]
sof [Thu, 2 Oct 2003 22:31:49 +0000 (22:31 +0000)]
[project @ 2003-10-02 22:31:46 by sof]
Fix handling of unused-matches for parallel list comprs. e.g, for,

     [ e | v1 <- e11 | v2 <- e21 ]

'e' wasn't considered part of v1 & v2's scope. Is now.

21 years ago[project @ 2003-10-02 19:44:09 by sof]
sof [Thu, 2 Oct 2003 19:44:09 +0000 (19:44 +0000)]
[project @ 2003-10-02 19:44:09 by sof]
parStmtErr: typo

21 years ago[project @ 2003-10-02 19:20:59 by sof]
sof [Thu, 2 Oct 2003 19:21:00 +0000 (19:21 +0000)]
[project @ 2003-10-02 19:20:59 by sof]
Extend -Werror's scope to also include the desugarer.

Note: -Werror doesn't give you the union of warnings from the renamer,
      TC and desugarer before bailing out, but one pass at a time.

21 years ago[project @ 2003-10-01 21:16:12 by wolfgang]
wolfgang [Wed, 1 Oct 2003 21:16:12 +0000 (21:16 +0000)]
[project @ 2003-10-01 21:16:12 by wolfgang]
Un-break non-threaded RTS
(hopefully; I have no time to test it right now)

21 years ago[project @ 2003-10-01 17:01:28 by sof]
sof [Wed, 1 Oct 2003 17:01:28 +0000 (17:01 +0000)]
[project @ 2003-10-01 17:01:28 by sof]
enableTimingStats():
  bring back -Rghc-timing output when compiled with >= 4.11
  (was >= 5.05, which looks unnecessarily restrictive.)

21 years ago[project @ 2003-10-01 16:45:10 by sof]
sof [Wed, 1 Oct 2003 16:45:10 +0000 (16:45 +0000)]
[project @ 2003-10-01 16:45:10 by sof]
outCLine: Use "#line n <filename>", not "# n <filename>". The latter
          isn't ISO (and causes breakage when compiling output with
  MSVC.)

21 years ago[project @ 2003-10-01 10:57:39 by wolfgang]
wolfgang [Wed, 1 Oct 2003 10:57:44 +0000 (10:57 +0000)]
[project @ 2003-10-01 10:57:39 by wolfgang]
New implementation & changed type signature of forkProcess

forkProcess now has the following type:
forkProcess :: IO () -> IO ProcessID

forkProcessAll has been removed as it is unimplementable in the threaded RTS.

forkProcess using the old type (IO (Maybe ProcessID)) was impossible to
implement correctly in the non-threaded RTS and very hard to implement
in the threaded RTS.
The new type signature allows a clean and simple implementation.

21 years ago[project @ 2003-10-01 10:49:07 by wolfgang]
wolfgang [Wed, 1 Oct 2003 10:49:09 +0000 (10:49 +0000)]
[project @ 2003-10-01 10:49:07 by wolfgang]
Threaded RTS:
Don't start new worker threads earlier than necessary.
After this commit, a Haskell program that uses neither forkOS nor forkIO is
really single-threaded (rather than using two OS threads internally).

Some details:
Worker threads are now only created when a capability is released, and
only when
(there are no worker threads)
&& (there are runnable Haskell threads ||
    there are Haskell threads blocked on IO or threadDelay)
awaitEvent can now be called from bound thread scheduling loops
(so that we don't have to create a worker thread just to run awaitEvent)

21 years ago[project @ 2003-10-01 10:36:49 by wolfgang]
wolfgang [Wed, 1 Oct 2003 10:36:49 +0000 (10:36 +0000)]
[project @ 2003-10-01 10:36:49 by wolfgang]
Make sure that the sequence
rts_lock();
rts_unlock(); /* (with nothing in between) */
doesn't crash the threaded RTS.

21 years ago[project @ 2003-10-01 09:08:10 by simonmar]
simonmar [Wed, 1 Oct 2003 09:08:10 +0000 (09:08 +0000)]
[project @ 2003-10-01 09:08:10 by simonmar]
rts_getBool: we should check the constructor tag instead of comparing
directly against False_closure and True_closure, since we might be
using the dynamically-linked versions of these.

This may or may not be the cause of bug [ 792761 ] rts_getBool: not a
Bool.

21 years ago[project @ 2003-09-29 11:03:29 by simonmar]
simonmar [Mon, 29 Sep 2003 11:03:29 +0000 (11:03 +0000)]
[project @ 2003-09-29 11:03:29 by simonmar]
oops, we need to include -fignore-interface-pragmas and
-fomit-interface-pragmas in the default set of options.

21 years ago[project @ 2003-09-29 10:49:59 by simonmar]
simonmar [Mon, 29 Sep 2003 10:49:59 +0000 (10:49 +0000)]
[project @ 2003-09-29 10:49:59 by simonmar]
Uncomment Alex version test: Alex 2.0 is now required to build GHC.

21 years ago[project @ 2003-09-28 19:44:14 by wolfgang]
wolfgang [Sun, 28 Sep 2003 19:44:15 +0000 (19:44 +0000)]
[project @ 2003-09-28 19:44:14 by wolfgang]
More Mac OS X-specific gcc 3.3 fixes

merge to stable

21 years ago[project @ 2003-09-26 13:32:14 by panne]
panne [Fri, 26 Sep 2003 13:32:14 +0000 (13:32 +0000)]
[project @ 2003-09-26 13:32:14 by panne]
Warning police

21 years ago[project @ 2003-09-26 12:12:35 by panne]
panne [Fri, 26 Sep 2003 12:12:35 +0000 (12:12 +0000)]
[project @ 2003-09-26 12:12:35 by panne]
Warning police

21 years ago[project @ 2003-09-26 12:11:18 by panne]
panne [Fri, 26 Sep 2003 12:11:18 +0000 (12:11 +0000)]
[project @ 2003-09-26 12:11:18 by panne]
Added prototypes for __hscore_[gs]et_saved_termios to make Linker.c
happy and avoid warnings in RtsStartup.c

21 years ago[project @ 2003-09-26 09:26:12 by panne]
panne [Fri, 26 Sep 2003 09:26:13 +0000 (09:26 +0000)]
[project @ 2003-09-26 09:26:12 by panne]
Saving/restoring termios is only done for GHC

21 years ago[project @ 2003-09-26 09:17:28 by simonmar]
simonmar [Fri, 26 Sep 2003 09:17:28 +0000 (09:17 +0000)]
[project @ 2003-09-26 09:17:28 by simonmar]
Update Linker following changes to saved_termios.

21 years ago[project @ 2003-09-26 09:01:08 by simonpj]
simonpj [Fri, 26 Sep 2003 09:01:08 +0000 (09:01 +0000)]
[project @ 2003-09-26 09:01:08 by simonpj]
Better error trace when cat_evals crashes

21 years ago[project @ 2003-09-25 15:14:41 by panne]
panne [Thu, 25 Sep 2003 15:14:44 +0000 (15:14 +0000)]
[project @ 2003-09-25 15:14:41 by panne]
To fix dynamic linking issues with Hugs, access saved_termios via
getter/setter.

21 years ago[project @ 2003-09-25 09:19:23 by simonmar]
simonmar [Thu, 25 Sep 2003 09:19:23 +0000 (09:19 +0000)]
[project @ 2003-09-25 09:19:23 by simonmar]
Add saved_termios symbol

21 years ago[project @ 2003-09-24 13:20:03 by simonmar]
simonmar [Wed, 24 Sep 2003 13:20:03 +0000 (13:20 +0000)]
[project @ 2003-09-24 13:20:03 by simonmar]
remove docs for -fwith option

21 years ago[project @ 2003-09-24 13:04:45 by simonmar]
simonmar [Wed, 24 Sep 2003 13:04:58 +0000 (13:04 +0000)]
[project @ 2003-09-24 13:04:45 by simonmar]
The concensus seems to be that 'with' should go away now, after its
customary period of deprecation.  Hugs has already removed it, so
we're following suit.

21 years ago[project @ 2003-09-24 11:06:51 by simonmar]
simonmar [Wed, 24 Sep 2003 11:06:54 +0000 (11:06 +0000)]
[project @ 2003-09-24 11:06:51 by simonmar]
Move forkOS_createThread into the RTS so its implementation can be
dependent on RTS_SUPPORTS_THREADS, which means we can provide a stub
implementation in the !RTS_SUPPORTS_THREADS case, and hence not depend
on pthread_create, which requires -lpthread.  The upshot is that GHCi
now works again when !RTS_SUPPORTS_THREADS.

21 years ago[project @ 2003-09-24 10:32:11 by simonmar]
simonmar [Wed, 24 Sep 2003 10:32:12 +0000 (10:32 +0000)]
[project @ 2003-09-24 10:32:11 by simonmar]
If we change the terminal settings as a result of hSetBuffering or
hSetEcho, then restore them again in hs_exit().  This is just good
citizenship on Unixy platforms.

We *don't* just automatically save the terminal settings and restore
them at the end, because that would prevent implementing stty-like
programs in Haskell.  This scheme is a compromise that hopefully DTRT
in most cases.

21 years ago[project @ 2003-09-23 17:07:39 by sof]
sof [Tue, 23 Sep 2003 17:07:39 +0000 (17:07 +0000)]
[project @ 2003-09-23 17:07:39 by sof]
wibble

21 years ago[project @ 2003-09-23 16:52:44 by sof]
sof [Tue, 23 Sep 2003 16:52:45 +0000 (16:52 +0000)]
[project @ 2003-09-23 16:52:44 by sof]
If the user explicitly did an instances-only import, i.e.,
"import Foo ()", don't emit an unused-import warning.

21 years ago[project @ 2003-09-23 16:43:00 by wolfgang]
wolfgang [Tue, 23 Sep 2003 16:43:00 +0000 (16:43 +0000)]
[project @ 2003-09-23 16:43:00 by wolfgang]
Mac OS X uses .dylib instead of .so, recognize that properly.