ghc.git
14 years ago[project @ 2005-05-10 10:27:20 by simonmar]
simonmar [Tue, 10 May 2005 10:27:20 +0000 (10:27 +0000)] 
[project @ 2005-05-10 10:27:20 by simonmar]
GNU/Hurd platform (from Thomas Schwinge
<schwinge-list-ghc-users@nic-nac-project.de>)

14 years ago[project @ 2005-05-10 10:08:50 by simonmar]
simonmar [Tue, 10 May 2005 10:08:50 +0000 (10:08 +0000)] 
[project @ 2005-05-10 10:08:50 by simonmar]
-ignore-package lang if GHC >= 6.3, fixes build breakage if wxHaskell
 is installed.

14 years ago[project @ 2005-05-09 13:25:07 by chak]
chak [Mon, 9 May 2005 13:25:07 +0000 (13:25 +0000)] 
[project @ 2005-05-09 13:25:07 by chak]
More details about type checking.

14 years ago[project @ 2005-05-09 10:18:05 by simonmar]
simonmar [Mon, 9 May 2005 10:18:05 +0000 (10:18 +0000)] 
[project @ 2005-05-09 10:18:05 by simonmar]
printAllThreads: handle ThreadRelocated

14 years ago[project @ 2005-05-09 10:10:33 by simonmar]
simonmar [Mon, 9 May 2005 10:10:33 +0000 (10:10 +0000)] 
[project @ 2005-05-09 10:10:33 by simonmar]
deleteAllThreads: handle ThreadRelocated

14 years ago[project @ 2005-05-09 09:00:04 by simonmar]
simonmar [Mon, 9 May 2005 09:00:04 +0000 (09:00 +0000)] 
[project @ 2005-05-09 09:00:04 by simonmar]
ProjectPatchLevel hack: the STABLE branch versions now look like
6.4.1.20050508 which confuses the compiler which thinks
ProjectPatchLevel should be an Int.

14 years ago[project @ 2005-05-07 17:28:05 by wolfgang]
wolfgang [Sat, 7 May 2005 17:28:05 +0000 (17:28 +0000)] 
[project @ 2005-05-07 17:28:05 by wolfgang]
GCC 4.0 Fix: Do not emit lvalue casts for foreign calls.

Note: This fix might break cmm code that directly assigns the result
      of a foreign call to a "strange type" register (but we don't do that).

MERGE TO STABLE

14 years ago[project @ 2005-05-07 12:17:01 by josefs]
josefs [Sat, 7 May 2005 12:17:01 +0000 (12:17 +0000)] 
[project @ 2005-05-07 12:17:01 by josefs]
Allow unicode in string and character literals when pretty printing
external core.

14 years ago[project @ 2005-05-06 11:06:14 by simonpj]
simonpj [Fri, 6 May 2005 11:06:14 +0000 (11:06 +0000)] 
[project @ 2005-05-06 11:06:14 by simonpj]
Rule overlap message should be only in ifdef DEBUG

14 years ago[project @ 2005-05-06 00:30:56 by sof]
sof [Fri, 6 May 2005 00:30:57 +0000 (00:30 +0000)] 
[project @ 2005-05-06 00:30:56 by sof]
[mingw only]
Work around bug in win32 Console API which showed up in the GHCi UI:
if the user typed in characters prior to the appearance of the prompt,
the first of these characters always came out as a 'g'. The GHCi UI does
for good reasons one-character reads from 'stdin', which causes the
underlying APIs to become confused. A simple repro case is the following
piece of C code:

/*----------------------*/
#include <stdio.h>
#include <windows.h>
int main()
{
    char ch1,ch2;
    HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
    DWORD dw;

    /* Type in some characters before the prompt appears and be amused.. */
    sleep(1000); printf("? ");
    ReadConsoleA(hStdIn,&ch1,1,&dw,NULL);
    ReadConsoleA(hStdIn,&ch2,1,&dw,NULL);
/*  or, if you want to use libc:
    read(0,&ch1,1); read(0,&ch2,1); */

    printf("%c%c\n", ch1,ch2);
    return 0;
}
/*----------------------*/

This happens across win32 OSes, and I can't see anything untoward as far
as API usage goes (the GHC IO implementation uses read(), but that
reduces to ReadConsoleA() calls.) People inside the Behemoth might want
to have a closer look at this..

Not much we can do about this except work around the problem by flushing
the input buffer prior to reading from stdin. Not ideal, as type-ahead
is a useful feature. Flushing is handled by GHC.ConsoleHandler.flushConsole

Merge to STABLE.

14 years ago[project @ 2005-05-05 18:14:27 by sof]
sof [Thu, 5 May 2005 18:14:27 +0000 (18:14 +0000)] 
[project @ 2005-05-05 18:14:27 by sof]
ocResolve_PEi386():
    when fixing up REL32 relocations, _add_ displacement to value at the
    given offset. The existing value has so far been assumed to be zero
    (which we've asserted for), but curiously wxhaskell-0.9.4's wx.o
    contains lots of interesting non-zero values. Information / specifications
    are awfully thin on the ground as to how to precisely handle these
    relocations, but adding rather than overwriting seems to have a
    generally healthy effect; unable to crash wxhaskell-0.9.4 with a 6.4 build.

Merge to STABLE.

14 years ago[project @ 2005-05-05 13:17:47 by simonmar]
simonmar [Thu, 5 May 2005 13:17:47 +0000 (13:17 +0000)] 
[project @ 2005-05-05 13:17:47 by simonmar]
Some fixes to the blackhole garbage collection strategy. conc049 is a
great test case.

14 years ago[project @ 2005-05-05 13:15:19 by simonpj]
simonpj [Thu, 5 May 2005 13:15:19 +0000 (13:15 +0000)] 
[project @ 2005-05-05 13:15:19 by simonpj]
Report instances correctly in GHCi

14 years ago[project @ 2005-05-05 12:39:19 by simonpj]
simonpj [Thu, 5 May 2005 12:39:19 +0000 (12:39 +0000)] 
[project @ 2005-05-05 12:39:19 by simonpj]
Only compare hi-boot iface with mother module if there *is* an hi-boot iface

14 years ago[project @ 2005-05-05 12:26:15 by simonpj]
simonpj [Thu, 5 May 2005 12:26:15 +0000 (12:26 +0000)] 
[project @ 2005-05-05 12:26:15 by simonpj]
Be a bit more parsimonious about type-error contexts

14 years ago[project @ 2005-05-05 11:35:29 by simonmar]
simonmar [Thu, 5 May 2005 11:35:29 +0000 (11:35 +0000)] 
[project @ 2005-05-05 11:35:29 by simonmar]
Treat the blackhole_queue as a weak list: it shouldn't keep its
elements alive, because otherwise we can't detect deadlock using the
GC.  Fortunately the fix is quite simple.

14 years ago[project @ 2005-05-05 11:33:10 by simonmar]
simonmar [Thu, 5 May 2005 11:33:10 +0000 (11:33 +0000)] 
[project @ 2005-05-05 11:33:10 by simonmar]
AP_STACK fix for SMP

14 years ago[project @ 2005-05-05 11:20:12 by simonmar]
simonmar [Thu, 5 May 2005 11:20:12 +0000 (11:20 +0000)] 
[project @ 2005-05-05 11:20:12 by simonmar]
Fix the offsets and macros for AP_STACK closures (was wrong for SMP only)

14 years ago[project @ 2005-05-05 11:19:42 by simonmar]
simonmar [Thu, 5 May 2005 11:19:42 +0000 (11:19 +0000)] 
[project @ 2005-05-05 11:19:42 by simonmar]
Sanity fix for SMP

14 years ago[project @ 2005-05-05 10:52:43 by ross]
ross [Thu, 5 May 2005 10:52:43 +0000 (10:52 +0000)] 
[project @ 2005-05-05 10:52:43 by ross]
Stop the renamer from barfing on arrow notation outside of proc, since
this will be caught by the typechecker (tcfail120).

14 years ago[project @ 2005-05-05 09:40:37 by simonmar]
simonmar [Thu, 5 May 2005 09:40:37 +0000 (09:40 +0000)] 
[project @ 2005-05-05 09:40:37 by simonmar]
Make GHC.modInfoPrintUnqualified work for package modules too.  Also
refactor a bit: move mkExportEnv from TcRnDriver up to GHC which is
the only use of it.

14 years ago[project @ 2005-05-05 07:43:28 by simonpj]
simonpj [Thu, 5 May 2005 07:43:29 +0000 (07:43 +0000)] 
[project @ 2005-05-05 07:43:28 by simonpj]
Make it so that you can deprecate a data constructor.
Previously {-# DEPRECATED T "no" #-} referred only to the type
or class T.  Now it refers to the data constructor T as well,
just like in fixity declarations.

There's no way to deprecate the data constructor T without also
deprecating the type T, alas.  Same problem in fixity decls.
Main problem is coming up with a suitable concrete syntax to do
so.

We could consider merging this to the STABLE branch.

NB: Sven, the manual fixes are not XML-valideated!  I'm at home.

14 years ago[project @ 2005-05-05 07:35:43 by simonpj]
simonpj [Thu, 5 May 2005 07:35:43 +0000 (07:35 +0000)] 
[project @ 2005-05-05 07:35:43 by simonpj]
Two small things

a) report duplicate declarations in canonical order
b) report deprecations for all uses (a longstanding bug)

both MERGE TO STABLE

14 years ago[project @ 2005-05-05 00:58:38 by sof]
sof [Thu, 5 May 2005 00:58:38 +0000 (00:58 +0000)] 
[project @ 2005-05-05 00:58:38 by sof]
[mingw only]
Provide (unsatisfying) workaround for pesky Ctrl-C issue, whereby a
cygwin-based bash will terminate the 'ghci.exe' wrapper without the
wrapper process getting a chance to respond (and shut down its child,
if nothing else.) The result instead being that the child (ghc.exe) ends up
lingering in the background.

To steer users away from such badness, the wrapper checks to see whether
it is running in a *nix-like shell, and if it is, issue a warning that
it would be better to invoke GHCi using the 'ghcii.sh' shell script instead.

Merge to STABLE.

14 years ago[project @ 2005-05-04 16:20:27 by simonmar]
simonmar [Wed, 4 May 2005 16:20:27 +0000 (16:20 +0000)] 
[project @ 2005-05-04 16:20:27 by simonmar]
getModuleInfo now does something reasonable for package modules.

14 years ago[project @ 2005-05-04 15:46:39 by simonmar]
simonmar [Wed, 4 May 2005 15:46:39 +0000 (15:46 +0000)] 
[project @ 2005-05-04 15:46:39 by simonmar]
Fix instance-matching issue (affects nofib/real/prolog).

14 years ago[project @ 2005-05-04 15:44:59 by simonmar]
simonmar [Wed, 4 May 2005 15:44:59 +0000 (15:44 +0000)] 
[project @ 2005-05-04 15:44:59 by simonmar]
Add lookupGlobalName

14 years ago[project @ 2005-05-04 15:19:37 by chak]
chak [Wed, 4 May 2005 15:19:37 +0000 (15:19 +0000)] 
[project @ 2005-05-04 15:19:37 by chak]
Updated and extended the section about the renamer.

14 years ago[project @ 2005-05-04 15:12:14 by josefs]
josefs [Wed, 4 May 2005 15:12:14 +0000 (15:12 +0000)] 
[project @ 2005-05-04 15:12:14 by josefs]
Make GHC accept external core files with higher rank types.

14 years ago[project @ 2005-05-04 13:06:39 by simonmar]
simonmar [Wed, 4 May 2005 13:06:39 +0000 (13:06 +0000)] 
[project @ 2005-05-04 13:06:39 by simonmar]
Fix porting instructions

14 years ago[project @ 2005-05-04 11:23:28 by simonpj]
simonpj [Wed, 4 May 2005 11:23:28 +0000 (11:23 +0000)] 
[project @ 2005-05-04 11:23:28 by simonpj]
Further wibbles to unused-import reporting; merge to stable

14 years ago[project @ 2005-05-04 10:28:07 by ross]
ross [Wed, 4 May 2005 10:28:08 +0000 (10:28 +0000)] 
[project @ 2005-05-04 10:28:07 by ross]
Another go at the handling of -< in arrow notation, continuing and
fixing the changes in

http://www.haskell.org/pipermail/cvs-all/2005-April/040391.html

Now do the same thing in the renamer as we do in the type checker,
i.e. return to the environment of the proc when considering the left
argument of -<.

This is much simpler than the old proc_level stuff, and matches the
type rules more clearly.  But there is a change in error messages.
For the input

f :: Int -> Int
f = proc x -> (+x) -< 1

GHC 6.4 says

test.hs:6:
    Command-bound variable `x' is not in scope here
Reason: it is used in the left argument of (-<)
    In the second argument of `(+)', namely `x'
    In the command: (+ x) -< 1
    In the definition of `f': f = proc x -> (+ x) -< 1

but now we just get the blunt

test.hs:6:16: Not in scope: `x'

The beauty is all on the inside.

Similarly leakage of existential type variables (arrow1) is detected,
but the error message isn't very helpful.

14 years ago[project @ 2005-05-03 13:41:01 by simonpj]
simonpj [Tue, 3 May 2005 13:41:01 +0000 (13:41 +0000)] 
[project @ 2005-05-03 13:41:01 by simonpj]
Check for illegal declarations in hs-boot files

14 years ago[project @ 2005-05-03 13:13:24 by simonpj]
simonpj [Tue, 3 May 2005 13:13:24 +0000 (13:13 +0000)] 
[project @ 2005-05-03 13:13:24 by simonpj]
Second stab at the duplicate-import warnings

14 years ago[project @ 2005-05-03 11:10:08 by simonpj]
simonpj [Tue, 3 May 2005 11:10:09 +0000 (11:10 +0000)] 
[project @ 2005-05-03 11:10:08 by simonpj]
Improve generation of 'duplicate import' warnings.
This involved changing (actually simplifying) the
definition of RdrName.ImportSpec.

I'm not sure whether this one merits merging or not.
Perhaps worth a try.

14 years ago[project @ 2005-05-03 10:53:00 by simonpj]
simonpj [Tue, 3 May 2005 10:53:01 +0000 (10:53 +0000)] 
[project @ 2005-05-03 10:53:00 by simonpj]
Fix the test for duplicate local bindings, so that it works with
Template Haskell.  Pre-TH, all the local bindings came into scope
at once, but with TH they come into scope in groups, and we must
check for conflict with existing local bindings.

MERGE TO STABLE

14 years ago[project @ 2005-05-03 10:38:19 by simonmar]
simonmar [Tue, 3 May 2005 10:38:19 +0000 (10:38 +0000)] 
[project @ 2005-05-03 10:38:19 by simonmar]
Add a couple more lint tests

14 years ago[project @ 2005-05-03 10:29:19 by simonmar]
simonmar [Tue, 3 May 2005 10:29:19 +0000 (10:29 +0000)] 
[project @ 2005-05-03 10:29:19 by simonmar]
MO_S_Conv folding: fold floating-point literals properly

14 years ago[project @ 2005-05-03 00:42:28 by sof]
sof [Tue, 3 May 2005 00:42:28 +0000 (00:42 +0000)] 
[project @ 2005-05-03 00:42:28 by sof]
permit mingw_* vars to be overridden; merge to STABLE

14 years ago[project @ 2005-05-03 00:41:15 by sof]
sof [Tue, 3 May 2005 00:41:15 +0000 (00:41 +0000)] 
[project @ 2005-05-03 00:41:15 by sof]
re-use prep-bin-dist-mingw by exec'ing it. Merge to STABLE

14 years ago[project @ 2005-05-02 13:08:38 by simonpj]
simonpj [Mon, 2 May 2005 13:08:39 +0000 (13:08 +0000)] 
[project @ 2005-05-02 13:08:38 by simonpj]
In the :i command for ghci, load the interface files for
the home module of every in-scope type or class. That way
we are sure to see all their instance declarations.

MERGE TO STABLE branch

14 years ago[project @ 2005-05-02 12:33:06 by simonpj]
simonpj [Mon, 2 May 2005 12:33:06 +0000 (12:33 +0000)] 
[project @ 2005-05-02 12:33:06 by simonpj]
Nuke bogus warnings in deriving; MERGE TO STABLE

14 years ago[project @ 2005-04-30 15:45:58 by wolfgang]
wolfgang [Sat, 30 Apr 2005 15:45:58 +0000 (15:45 +0000)] 
[project @ 2005-04-30 15:45:58 by wolfgang]
More Mac OS X Tiger / GCC 4.0 fixes.

MERGE TO STABLE

14 years ago[project @ 2005-04-29 23:39:12 by simonpj]
simonpj [Fri, 29 Apr 2005 23:39:13 +0000 (23:39 +0000)] 
[project @ 2005-04-29 23:39:12 by simonpj]
Wibbles to new hs-boot instance story

14 years ago[project @ 2005-04-29 23:37:10 by simonpj]
simonpj [Fri, 29 Apr 2005 23:37:10 +0000 (23:37 +0000)] 
[project @ 2005-04-29 23:37:10 by simonpj]
Better kind error reporting; MERGE TO STABLE

14 years ago[project @ 2005-04-29 22:15:36 by wolfgang]
wolfgang [Fri, 29 Apr 2005 22:15:36 +0000 (22:15 +0000)] 
[project @ 2005-04-29 22:15:36 by wolfgang]
Mac OS X (Tiger): Fix the Mangler for (Apple's version of) GCC 4.0

MERGE TO STABLE

14 years ago[project @ 2005-04-29 22:02:46 by sof]
sof [Fri, 29 Apr 2005 22:02:46 +0000 (22:02 +0000)] 
[project @ 2005-04-29 22:02:46 by sof]
BINDIST_DOC_WAYS: permit variable to be overridden (in a mk/build.mk, perhaps); merge to STABLE

14 years ago[project @ 2005-04-29 21:56:06 by sof]
sof [Fri, 29 Apr 2005 21:56:06 +0000 (21:56 +0000)] 
[project @ 2005-04-29 21:56:06 by sof]
leave out Java bits in include/ that mingw-3.2 supplies; temporarily disable PDF document generation

14 years ago[project @ 2005-04-29 21:52:38 by sof]
sof [Fri, 29 Apr 2005 21:52:38 +0000 (21:52 +0000)] 
[project @ 2005-04-29 21:52:38 by sof]
gcc-mingw-3.4.x seems to have renamed .rodata to .rdata; look for either

14 years ago[project @ 2005-04-29 21:02:15 by sof]
sof [Fri, 29 Apr 2005 21:02:15 +0000 (21:02 +0000)] 
[project @ 2005-04-29 21:02:15 by sof]
'ghcprof' is a perl script, but installed in the bin/ directory. Merge to STABLE

14 years ago[project @ 2005-04-29 16:58:19 by simonpj]
simonpj [Fri, 29 Apr 2005 16:58:19 +0000 (16:58 +0000)] 
[project @ 2005-04-29 16:58:19 by simonpj]
The boot dfunid should be a LocalId

14 years ago[project @ 2005-04-29 16:18:58 by simonmar]
simonmar [Fri, 29 Apr 2005 16:18:58 +0000 (16:18 +0000)] 
[project @ 2005-04-29 16:18:58 by simonmar]
(from 1.4.6.1 on 6-4-branch)

Fix some incorrect use of int/nat that breaks x86_64

14 years ago[project @ 2005-04-29 13:09:27 by krasimir]
krasimir [Fri, 29 Apr 2005 13:09:28 +0000 (13:09 +0000)] 
[project @ 2005-04-29 13:09:27 by krasimir]
Small fixes that adds chm and HxS targets to the build system. The former is used
to build all documentation in HtmlHelp format while the letter uses HtmlHelp2 format.

14 years ago[project @ 2005-04-29 11:24:56 by simonpj]
simonpj [Fri, 29 Apr 2005 11:24:56 +0000 (11:24 +0000)] 
[project @ 2005-04-29 11:24:56 by simonpj]
Fix typo causing loop in SpecConstr!

14 years ago[project @ 2005-04-29 11:10:42 by simonpj]
simonpj [Fri, 29 Apr 2005 11:10:42 +0000 (11:10 +0000)] 
[project @ 2005-04-29 11:10:42 by simonpj]
XML wibble

14 years ago[project @ 2005-04-29 11:08:51 by simonpj]
simonpj [Fri, 29 Apr 2005 11:08:51 +0000 (11:08 +0000)] 
[project @ 2005-04-29 11:08:51 by simonpj]
Document improvements in overlap handling

14 years ago[project @ 2005-04-29 08:59:30 by simonmar]
simonmar [Fri, 29 Apr 2005 08:59:30 +0000 (08:59 +0000)] 
[project @ 2005-04-29 08:59:30 by simonmar]
Re-instate support for environment variable expansion and the -D flag.
Now it is done pre-parsing, however.

14 years ago[project @ 2005-04-29 08:19:49 by simonpj]
simonpj [Fri, 29 Apr 2005 08:19:49 +0000 (08:19 +0000)] 
[project @ 2005-04-29 08:19:49 by simonpj]
Strip wired-in names from interface files

14 years ago[project @ 2005-04-28 23:37:53 by simonpj]
simonpj [Thu, 28 Apr 2005 23:37:53 +0000 (23:37 +0000)] 
[project @ 2005-04-28 23:37:53 by simonpj]
Further stage-2 wibbles

14 years ago[project @ 2005-04-28 23:11:45 by simonpj]
simonpj [Thu, 28 Apr 2005 23:11:45 +0000 (23:11 +0000)] 
[project @ 2005-04-28 23:11:45 by simonpj]
Missing import

14 years ago[project @ 2005-04-28 23:09:24 by simonpj]
simonpj [Thu, 28 Apr 2005 23:09:24 +0000 (23:09 +0000)] 
[project @ 2005-04-28 23:09:24 by simonpj]
A couple of hs-boot files

14 years ago[project @ 2005-04-28 23:00:52 by simonpj]
simonpj [Thu, 28 Apr 2005 23:00:52 +0000 (23:00 +0000)] 
[project @ 2005-04-28 23:00:52 by simonpj]
Further wibbles to the new tidying plumbing

14 years ago[project @ 2005-04-28 21:31:45 by simonmar]
simonmar [Thu, 28 Apr 2005 21:31:45 +0000 (21:31 +0000)] 
[project @ 2005-04-28 21:31:45 by simonmar]
StgFunInfoExtra_slow_apply(): convert the slow_apply_offset to a W_
before arithmetic.

14 years ago[project @ 2005-04-28 16:05:54 by simonpj]
simonpj [Thu, 28 Apr 2005 16:05:57 +0000 (16:05 +0000)] 
[project @ 2005-04-28 16:05:54 by simonpj]
Re-plumb the connections between TidyPgm and the various
code generators.  There's a new type, CgGuts, to mediate this,
which has the happy effect that ModGuts can die earlier.

The non-O route still isn't quite right, because default methods
are being lost.  I'm working on it.

14 years ago[project @ 2005-04-28 15:44:16 by simonmar]
simonmar [Thu, 28 Apr 2005 15:44:16 +0000 (15:44 +0000)] 
[project @ 2005-04-28 15:44:16 by simonmar]
calcAllocated: fix small mis-calculation in the SMP case

14 years ago[project @ 2005-04-28 15:28:05 by simonmar]
simonmar [Thu, 28 Apr 2005 15:28:09 +0000 (15:28 +0000)] 
[project @ 2005-04-28 15:28:05 by simonmar]
Small code-size optimisation: I forgot to add a specialised case for
functions with no argument words (which might happen if the function
takes a void argument, for example).

14 years ago[project @ 2005-04-28 13:13:27 by simonpj]
simonpj [Thu, 28 Apr 2005 13:13:27 +0000 (13:13 +0000)] 
[project @ 2005-04-28 13:13:27 by simonpj]
Instance for wired-in tycons wibble

14 years ago[project @ 2005-04-28 10:09:41 by simonpj]
simonpj [Thu, 28 Apr 2005 10:09:51 +0000 (10:09 +0000)] 
[project @ 2005-04-28 10:09:41 by simonpj]
This big commit does several things at once (aeroplane hacking)
which change the format of interface files.

So you'll need to recompile your libraries!

1. The "stupid theta" of a newtype declaration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retain the "stupid theta" in a newtype declaration.
For some reason this was being discarded, and putting it
back in meant changing TyCon and IfaceSyn slightly.

2. Overlap flags travel with the instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arrange that the ability to support overlap and incoherence
is a property of the *instance declaration* rather than the
module that imports the instance decl.  This allows a library
writer to define overlapping instance decls without the
library client having to know.

The implementation is that in an Instance we store the
overlap flag, and preseve that across interface files

3. Nuke the "instnce pool" and "rule pool"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A major tidy-up and simplification of the way that instances
and rules are sucked in from interface files.  Up till now
an instance decl has been held in a "pool" until its "gates"
(a set of Names) are in play, when the instance is typechecked
and added to the InstEnv in the ExternalPackageState.
This is complicated and error-prone; it's easy to suck in
too few (and miss an instance) or too many (and thereby be
forced to suck in its type constructors, etc).

Now, as we load an instance from an interface files, we
put it straight in the InstEnv... but the Instance we put in
the InstEnv has some Names (the "rough-match" names) that
can be used on lookup to say "this Instance can't match".
The detailed dfun is only read lazily, and the rough-match
thing meansn it is'nt poked on until it has a chance of
being needed.

This simply continues the successful idea for Ids, whereby
they are loaded straightaway into the TypeEnv, but their
TyThing is a lazy thunk, not poked on until the thing is looked
up.

Just the same idea applies to Rules.

On the way, I made CoreRule and Instance into full-blown records
with lots of info, with the same kind of key status as TyCon or
DataCon or Class.  And got rid of IdCoreRule altogether.
It's all much more solid and uniform, but it meant touching
a *lot* of modules.

4. Allow instance decls in hs-boot files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allowing instance decls in hs-boot files is jolly useful, becuase
in a big mutually-recursive bunch of data types, you want to give
the instances with the data type declarations.  To achieve this

* The hs-boot file makes a provisional name for the dict-fun, something
  like $fx9.

* When checking the "mother module", we check that the instance
  declarations line up (by type) and generate bindings for the
  boot dfuns, such as
$fx9 = $f2
  where $f2 is the dfun generated by the mother module

* In doing this I decided that it's cleaner to have DFunIds get their
  final External Name at birth.  To do that they need a stable OccName,
  so I have an integer-valued dfun-name-supply in the TcM monad.
  That keeps it simple.

This feature is hardly tested yet.

5. Tidy up tidying, and Iface file generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main/TidyPgm now has two entry points:

  simpleTidyPgm is for hi-boot files, when typechecking only
  (not yet implemented), and potentially when compiling without -O.
  It ignores the bindings, and generates a nice small TypeEnv.

  optTidyPgm is the normal case: compiling with -O.  It generates a
  TypeEnv rich in IdInfo

MkIface.mkIface now only generates a ModIface.  A separate
procedure, MkIface.writeIfaceFile, writes the file out to disk.

14 years ago[project @ 2005-04-28 09:46:25 by simonmar]
simonmar [Thu, 28 Apr 2005 09:46:25 +0000 (09:46 +0000)] 
[project @ 2005-04-28 09:46:25 by simonmar]
Run each nofib program multiple times, tunable by the $(NoFibRuns)
variable.  nofib-analyse already knows how to average the times from
multiple runs.

14 years ago[project @ 2005-04-27 17:13:13 by sof]
sof [Wed, 27 Apr 2005 17:13:13 +0000 (17:13 +0000)] 
[project @ 2005-04-27 17:13:13 by sof]
comment wibble; switch from Italian to English spelling of 'compatible'

14 years ago[project @ 2005-04-27 14:37:26 by simonmar]
simonmar [Wed, 27 Apr 2005 14:37:26 +0000 (14:37 +0000)] 
[project @ 2005-04-27 14:37:26 by simonmar]
When using -H<size> in SMP mode, divide the total nursery size amongst
the various nurseries.  -H<size> now does something reasonable with
SMP.

14 years ago[project @ 2005-04-27 14:25:17 by simonmar]
simonmar [Wed, 27 Apr 2005 14:25:18 +0000 (14:25 +0000)] 
[project @ 2005-04-27 14:25:17 by simonmar]
Hold the sm_mutex around access to the mutable list.

The SMP RTS now seems quite stable, I've run my simple test program
with 64 threads without crashes.

14 years ago[project @ 2005-04-27 14:09:43 by simonmar]
simonmar [Wed, 27 Apr 2005 14:09:43 +0000 (14:09 +0000)] 
[project @ 2005-04-27 14:09:43 by simonmar]
fprintf(stderr,..) --> debugBelch(...)

14 years ago[project @ 2005-04-27 12:54:45 by simonmar]
simonmar [Wed, 27 Apr 2005 12:54:45 +0000 (12:54 +0000)] 
[project @ 2005-04-27 12:54:45 by simonmar]
Some extra sanity checking

14 years ago[project @ 2005-04-27 12:53:35 by simonmar]
simonmar [Wed, 27 Apr 2005 12:53:35 +0000 (12:53 +0000)] 
[project @ 2005-04-27 12:53:35 by simonmar]
initCapability: initialise the rInHaskell field (found by Valgrind)

14 years ago[project @ 2005-04-27 12:52:52 by simonmar]
simonmar [Wed, 27 Apr 2005 12:52:52 +0000 (12:52 +0000)] 
[project @ 2005-04-27 12:52:52 by simonmar]
expandTaskTable: we need to update the hash table too
  (found by: Valgrind :-)

initTaskManager: take into account -N flag when sizing the initial
task table.

14 years ago[project @ 2005-04-27 11:31:22 by simonmar]
simonmar [Wed, 27 Apr 2005 11:31:22 +0000 (11:31 +0000)] 
[project @ 2005-04-27 11:31:22 by simonmar]
i386 wibble

14 years ago[project @ 2005-04-27 11:15:15 by simonmar]
simonmar [Wed, 27 Apr 2005 11:15:16 +0000 (11:15 +0000)] 
[project @ 2005-04-27 11:15:15 by simonmar]
Support for returning the renamed syntax from checkModule (untested).

14 years ago[project @ 2005-04-27 09:57:14 by simonmar]
simonmar [Wed, 27 Apr 2005 09:57:14 +0000 (09:57 +0000)] 
[project @ 2005-04-27 09:57:14 by simonmar]
x86_64: hang register parameters off the call instruction, like
powerpc does.  This gives the register allocator better information.

14 years ago[project @ 2005-04-27 09:55:50 by simonmar]
simonmar [Wed, 27 Apr 2005 09:55:50 +0000 (09:55 +0000)] 
[project @ 2005-04-27 09:55:50 by simonmar]
showReg(x86_64): fix
callerSaves: fix

14 years ago[project @ 2005-04-27 09:54:26 by simonmar]
simonmar [Wed, 27 Apr 2005 09:54:26 +0000 (09:54 +0000)] 
[project @ 2005-04-27 09:54:26 by simonmar]
Fix the volatile regs to the suspendThread call

14 years ago[project @ 2005-04-27 09:48:34 by simonmar]
simonmar [Wed, 27 Apr 2005 09:48:34 +0000 (09:48 +0000)] 
[project @ 2005-04-27 09:48:34 by simonmar]
Remove uses of stderr from .cmm code.

We can't reliably refer to stdin/stdout/stderr from .cmm, because the
C standard doesn't specify whether stderr is a variable or a macro.

14 years ago[project @ 2005-04-27 09:39:27 by simonmar]
simonmar [Wed, 27 Apr 2005 09:39:27 +0000 (09:39 +0000)] 
[project @ 2005-04-27 09:39:27 by simonmar]
Add comment

14 years ago[project @ 2005-04-27 08:25:46 by simonmar]
simonmar [Wed, 27 Apr 2005 08:25:46 +0000 (08:25 +0000)] 
[project @ 2005-04-27 08:25:46 by simonmar]
newTempName: instead of bumping the processId until we find a name
that isn't used, add an integer suffix to the processId.  This should
prevent temp-file conflicts that appear to have been affecting our
nightly builds and occasionally make -j.

The right way to allocate a temporary file is to create it straight
away, but I'm not sure of the implications of passing existing
temporary files to the various sub-processes that GHC executes, hence
this fix instead.

14 years ago[project @ 2005-04-26 15:44:48 by simonmar]
simonmar [Tue, 26 Apr 2005 15:44:48 +0000 (15:44 +0000)] 
[project @ 2005-04-26 15:44:48 by simonmar]
resetStaticObjectForRetainerProfiling: catch up changes in ClosureMacros.h

14 years ago[project @ 2005-04-26 15:08:16 by simonmar]
simonmar [Tue, 26 Apr 2005 15:08:16 +0000 (15:08 +0000)] 
[project @ 2005-04-26 15:08:16 by simonmar]
When chasing explicit imports, we now look for the module in both the
home package and external packages, and complain if it is found in
both:

Chasing modules from: Overlap
Cannot import `List':
  it was found in both overlap/List.hs and package haskell98-1.0.
  Possible fix: -ignore-package haskell98-1.0
  (imported from overlap/Overlap.hs)

Previously the home module would have been ignored in favour of the
package module.  It means we're doing a bit more searching, but the
behaviour is less obscure.

14 years ago[project @ 2005-04-26 14:43:31 by simonmar]
simonmar [Tue, 26 Apr 2005 14:43:31 +0000 (14:43 +0000)] 
[project @ 2005-04-26 14:43:31 by simonmar]
Back out previous revision.

It appears that passing -g to the assembly phase of C compilation
results in an object file with broken debug info, that gdb can't
read.  This is probably a bug in gcc and/or binutils, but this change
means that I can't avoid it (unless we were to hack the pipeline to
do .c->.s->.o in one stage instead of two).

14 years ago[project @ 2005-04-26 12:00:48 by simonmar]
simonmar [Tue, 26 Apr 2005 12:00:48 +0000 (12:00 +0000)] 
[project @ 2005-04-26 12:00:48 by simonmar]
Add entry about non-blocking stdin and System.Cmd.{system,rawSystem}.

14 years ago[project @ 2005-04-26 00:08:17 by sof]
sof [Tue, 26 Apr 2005 00:08:17 +0000 (00:08 +0000)] 
[project @ 2005-04-26 00:08:17 by sof]
runSomething: 'rawSystem' might raise an exception to indicate that
'pgm' couldn't be executed, so catch this here & report.

Merge to STABLE.

14 years ago[project @ 2005-04-25 15:56:19 by simonmar]
simonmar [Mon, 25 Apr 2005 15:56:19 +0000 (15:56 +0000)] 
[project @ 2005-04-25 15:56:19 by simonmar]
scavenge_one: fix reversed PAP/AP cases

14 years ago[project @ 2005-04-25 15:36:28 by simonmar]
simonmar [Mon, 25 Apr 2005 15:36:29 +0000 (15:36 +0000)] 
[project @ 2005-04-25 15:36:28 by simonmar]
Partial support for deadlock detection in the threaded/SMP RTS.

The idea is to wait until a complete time slice has gone by without
running any Haskell code, and then try doing a GC to detect deadlocked
threads.

This kind of works: but we can only wake up a worker thread from the
signal handler if there's another worker running - we can't wake up the
current thread, it seems.

14 years ago[project @ 2005-04-25 14:22:29 by simonmar]
simonmar [Mon, 25 Apr 2005 14:22:29 +0000 (14:22 +0000)] 
[project @ 2005-04-25 14:22:29 by simonmar]
interruptStgRts: call threadRunnable().  This might not work properly
from a signal handler, but it's all we can do (and seems to do
something reasonable on Linux).

14 years ago[project @ 2005-04-25 14:13:23 by simonmar]
simonmar [Mon, 25 Apr 2005 14:13:23 +0000 (14:13 +0000)] 
[project @ 2005-04-25 14:13:23 by simonmar]
atomicModifyMutVarzh_fast: move the sm_mutex acquisition *after* the
heap check

14 years ago[project @ 2005-04-25 13:45:40 by simonmar]
simonmar [Mon, 25 Apr 2005 13:45:40 +0000 (13:45 +0000)] 
[project @ 2005-04-25 13:45:40 by simonmar]
Yet another StgClosure that should be StgThunk

14 years ago[project @ 2005-04-25 13:17:59 by simonmar]
simonmar [Mon, 25 Apr 2005 13:17:59 +0000 (13:17 +0000)] 
[project @ 2005-04-25 13:17:59 by simonmar]
stg_raise: we should by using StgThunk_payload(), not StgClosure_payload()

14 years ago[project @ 2005-04-25 13:02:31 by simonmar]
simonmar [Mon, 25 Apr 2005 13:02:31 +0000 (13:02 +0000)] 
[project @ 2005-04-25 13:02:31 by simonmar]
Requested by Duncan Coutts: -optc flags get passed to the assembler
phase too.  It's not obvious, when using GHC to compile a .c file,
that options need to be passed both with -optc and -opta - gcc doesn't
need this, for example.

This is an experimental change - if it breaks anything we can back it
out.  If anyone needs to pass flags to the .c->.s phase *only*, then
we will need to add another flag for that purpose.  It seems unlikely,
though (there aren't many flags that affect the assembler only, and
those that do don't conflict with flags for the C phase).

14 years ago[project @ 2005-04-25 09:32:23 by simonmar]
simonmar [Mon, 25 Apr 2005 09:32:23 +0000 (09:32 +0000)] 
[project @ 2005-04-25 09:32:23 by simonmar]
daVinci is now called uDraw(Graph)

14 years ago[project @ 2005-04-24 21:50:26 by simonmar]
simonmar [Sun, 24 Apr 2005 21:50:26 +0000 (21:50 +0000)] 
[project @ 2005-04-24 21:50:26 by simonmar]
Fix bogus uses of C variable stable_ptr_table exposed by recent fix to
C backend.

14 years ago[project @ 2005-04-24 20:19:30 by panne]
panne [Sun, 24 Apr 2005 20:19:30 +0000 (20:19 +0000)] 
[project @ 2005-04-24 20:19:30 by panne]
Warning police (unused parameter)

14 years ago[project @ 2005-04-24 20:17:28 by panne]
panne [Sun, 24 Apr 2005 20:17:28 +0000 (20:17 +0000)] 
[project @ 2005-04-24 20:17:28 by panne]
Nuked dead code