ghc-hetmet.git
18 years ago[project @ 2005-10-27 01:39:40 by sof]
sof [Thu, 27 Oct 2005 01:39:40 +0000 (01:39 +0000)]
[project @ 2005-10-27 01:39:40 by sof]
[mingw/msys only]
Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e.,
the linker wasn't correctly generating relocatable object files when
the number of relocs exceeded 2^16. Worked around the issue by
hackily splitting up the GHCi object file for the larger packages
('base', 'ObjectIO' and 'win32') into a handful of object files,
each with a manageable number of relocs. Tiresome and error-prone
(but the hack has served us well!)

This commit imposes a restriction on the 'ld' you use to compile
up GHC with; it now has to be ld-2.15.x or later (something GHC
binary dists have shipped with since 6.2.2)

18 years ago[project @ 2005-10-27 01:27:37 by sof]
sof [Thu, 27 Oct 2005 01:27:37 +0000 (01:27 +0000)]
[project @ 2005-10-27 01:27:37 by sof]
ocGetNames_PEi386(): fix bug in previous commit to this function;
the correct .bss size for object files wasn't being passed to
addProddableBlock().
Not directly harmful, but triggers ASSERT() failure w/ DEBUG.

Merge to STABLE.

18 years ago[project @ 2005-10-27 00:21:24 by sof]
sof [Thu, 27 Oct 2005 00:21:24 +0000 (00:21 +0000)]
[project @ 2005-10-27 00:21:24 by sof]
emitForeignCall: avoid CC warnings by hinting that resume/suspendThread id arg is a ptr

18 years ago[project @ 2005-10-26 22:33:20 by sof]
sof [Wed, 26 Oct 2005 22:33:20 +0000 (22:33 +0000)]
[project @ 2005-10-26 22:33:20 by sof]
ASSERT_TASK_ID(): THREADED_RTS-only assert

18 years ago[project @ 2005-10-26 15:36:06 by simonmar]
simonmar [Wed, 26 Oct 2005 15:36:06 +0000 (15:36 +0000)]
[project @ 2005-10-26 15:36:06 by simonmar]
Package up the various properties of Capabilities/Tasks that we were
asserting all over the place, and put them in a single macro
ASSERT_CAPABILITY_INVARIANTS().

18 years ago[project @ 2005-10-26 15:22:08 by simonmar]
simonmar [Wed, 26 Oct 2005 15:22:08 +0000 (15:22 +0000)]
[project @ 2005-10-26 15:22:08 by simonmar]
The prev/next link fields in struct Capability_ aren't used

18 years ago[project @ 2005-10-26 15:20:59 by simonmar]
simonmar [Wed, 26 Oct 2005 15:20:59 +0000 (15:20 +0000)]
[project @ 2005-10-26 15:20:59 by simonmar]
- forkProcess fix: add a forgotten rts_unlock()
- add a couple more ASSERTs

18 years ago[project @ 2005-10-26 14:53:30 by simonpj]
simonpj [Wed, 26 Oct 2005 14:53:30 +0000 (14:53 +0000)]
[project @ 2005-10-26 14:53:30 by simonpj]
awaitRequests: blocked_queue_tl was being set to NULL rather than
END_TSO_QUEUE if the thread being removed was at the end of the queue.

This bug has been in the code since 2003 - I have absolutely no idea
why it hasn't manifested until today.

18 years ago[project @ 2005-10-26 13:58:40 by simonmar]
simonmar [Wed, 26 Oct 2005 13:58:40 +0000 (13:58 +0000)]
[project @ 2005-10-26 13:58:40 by simonmar]
forkOS_createThreadWrapper: oops, better use the result from rts_evalStableIO()

18 years ago[project @ 2005-10-26 13:03:39 by simonpj]
simonpj [Wed, 26 Oct 2005 13:03:39 +0000 (13:03 +0000)]
[project @ 2005-10-26 13:03:39 by simonpj]
Improve documentation of typeclass extensions; merge to stable if it goes easily

18 years ago[project @ 2005-10-26 12:35:12 by simonpj]
simonpj [Wed, 26 Oct 2005 12:35:12 +0000 (12:35 +0000)]
[project @ 2005-10-26 12:35:12 by simonpj]
Simplify Provenance (the LocalDef constructor) a little

18 years ago[project @ 2005-10-26 12:05:03 by simonpj]
simonpj [Wed, 26 Oct 2005 12:05:03 +0000 (12:05 +0000)]
[project @ 2005-10-26 12:05:03 by simonpj]
MERGE TO STABLE

Fix two small Template Haskell bugs.

(1) A bug in the renaming of [d| brackets |].  The problem was
that when we renamed the bracket we messed up the name cache, because
the module was still that of the parent module.  Now we set a fake
module before renaming it.

TH_spliceDecl4 is the test.

(2) An expression splice can in principle mention *any* variable,
so the renamer really has to assume that it does when doing depdendency
analysis.  For example
f = ...
h = ...$(thing "f")...
The renamer had better not put 'h' before 'f', else the type checker
won't find a defn for 'f' in the type envt.

TH_spliceE5 is the test

18 years ago[project @ 2005-10-26 11:58:57 by simonmar]
simonmar [Wed, 26 Oct 2005 11:58:57 +0000 (11:58 +0000)]
[project @ 2005-10-26 11:58:57 by simonmar]
x86_64 fix: I was a bit sloppy before and assumed that the malloc()'d
memory would be in the low 2Gb, so I could use 32-bit offset
addressing.  It appears that this sometimes isn't the case, so do it
properly and use 64-bit absolute addressing.

18 years ago[project @ 2005-10-26 11:41:51 by simonmar]
simonmar [Wed, 26 Oct 2005 11:41:51 +0000 (11:41 +0000)]
[project @ 2005-10-26 11:41:51 by simonmar]
fix to previous change: allow workers to exit

18 years ago[project @ 2005-10-26 10:42:54 by simonmar]
simonmar [Wed, 26 Oct 2005 10:42:54 +0000 (10:42 +0000)]
[project @ 2005-10-26 10:42:54 by simonmar]
- change the type of StgRun(): now we return the Capability that the
  thread currently holds.  The return status of the thread is now
  stored in cap->r.rRet (a new slot in the reg table).

  This was necessary because on return from StgRun(), the current
  TSO may be blocked, so it no longer belongs to us.  If it is a bound
  thread, then the Task may have been already woken up on another
  Capability, so the scheduler can't use task->cap to find the
  capability it currently owns.

- when shutting down, allow a bound thread to remove its TSO from
  the run queue when exiting (eliminates an error condition in
  releaseCapability()).

18 years ago[project @ 2005-10-26 10:23:47 by simonpj]
simonpj [Wed, 26 Oct 2005 10:24:10 +0000 (10:24 +0000)]
[project @ 2005-10-26 10:23:47 by simonpj]
Cosmetics

18 years ago[project @ 2005-10-26 08:41:32 by simonpj]
simonpj [Wed, 26 Oct 2005 08:41:32 +0000 (08:41 +0000)]
[project @ 2005-10-26 08:41:32 by simonpj]
Fix PUSH_ON_RUN_QUEUE bug on Win32

18 years ago[project @ 2005-10-25 17:31:38 by sof]
sof [Tue, 25 Oct 2005 17:31:38 +0000 (17:31 +0000)]
[project @ 2005-10-25 17:31:38 by sof]
FPTOOLS_CHECK_HTYPE: correctly scope the resetting of CPPFLAGS; as was,
it got blown away if the value was cached.

Merge to STABLE.

18 years ago[project @ 2005-10-25 15:27:22 by simonmar]
simonmar [Tue, 25 Oct 2005 15:27:22 +0000 (15:27 +0000)]
[project @ 2005-10-25 15:27:22 by simonmar]
Fix bug in allocateLocal, we weren't assigning bd->step properly

18 years ago[project @ 2005-10-25 15:04:58 by simonmar]
simonmar [Tue, 25 Oct 2005 15:04:58 +0000 (15:04 +0000)]
[project @ 2005-10-25 15:04:58 by simonmar]
add missing boot files

18 years ago[project @ 2005-10-25 12:56:50 by simonmar]
simonmar [Tue, 25 Oct 2005 12:56:50 +0000 (12:56 +0000)]
[project @ 2005-10-25 12:56:50 by simonmar]
doc LANGUAGE pragma

18 years ago[project @ 2005-10-25 12:48:35 by simonmar]
simonmar [Tue, 25 Oct 2005 12:48:35 +0000 (12:48 +0000)]
[project @ 2005-10-25 12:48:35 by simonmar]
Two changes from Krasimir Angelov, which were required for Visual
Haskell:

  - messaging cleanup throughout the compiler.  DynFlags has a new
    field:

    log_action :: Severity -> SrcSpan -> PprStyle -> Message -> IO ()

    this action is invoked for every message generated by the
    compiler.  This means a client of the GHC API can direct messages to
    any destination, or collect them up in an IORef for later
    perusal.

    This replaces previous hacks to redirect messages in the GHC API
    (hence some changes to function types in GHC.hs).

  - The JustTypecheck mode of GHC now does what it says.  It doesn't
    run any of the compiler passes beyond the typechecker for each module,
    but does generate the ModIface in order that further modules can be
    typechecked.

And one change from me:

  - implement the LANGUAGE pragma, finally

18 years ago[project @ 2005-10-25 10:48:44 by simonmar]
simonmar [Tue, 25 Oct 2005 10:48:44 +0000 (10:48 +0000)]
[project @ 2005-10-25 10:48:44 by simonmar]
companion to Lexer.x rev. 1.29; columns now always count tabs as 1 in SrcLoc.

18 years ago[project @ 2005-10-25 10:28:59 by simonmar]
simonmar [Tue, 25 Oct 2005 10:28:59 +0000 (10:28 +0000)]
[project @ 2005-10-25 10:28:59 by simonmar]
- include the contents of ghc/HACKING verbatim, as a "quick start"
  guide

- change the title to "Building and devleloping GHC", and make it a
  bit more GHC-centric.

18 years ago[project @ 2005-10-25 10:22:48 by simonmar]
simonmar [Tue, 25 Oct 2005 10:22:48 +0000 (10:22 +0000)]
[project @ 2005-10-25 10:22:48 by simonmar]
add info about actually doing the build

18 years ago[project @ 2005-10-25 09:35:57 by simonmar]
simonmar [Tue, 25 Oct 2005 09:35:57 +0000 (09:35 +0000)]
[project @ 2005-10-25 09:35:57 by simonmar]
Add a "getting started" guide to hacking on GHC.

18 years ago[project @ 2005-10-25 02:57:47 by wolfgang]
wolfgang [Tue, 25 Oct 2005 02:57:47 +0000 (02:57 +0000)]
[project @ 2005-10-25 02:57:47 by wolfgang]
Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
commit.

Remember how we deliberately misaligned the .o file in memory to compensate
for Mach-O's lax alignment rules.
This should have been comitted along with Linker.c 1.203 about two weeks ago.

18 years ago[project @ 2005-10-24 12:23:44 by simonmar]
simonmar [Mon, 24 Oct 2005 12:23:44 +0000 (12:23 +0000)]
[project @ 2005-10-24 12:23:44 by simonmar]
define THREADED_RTS for the SMP way too

18 years ago[project @ 2005-10-24 09:37:08 by simonmar]
simonmar [Mon, 24 Oct 2005 09:37:08 +0000 (09:37 +0000)]
[project @ 2005-10-24 09:37:08 by simonmar]
Fix the build; none of this is actually used in THREADED_RTS or SMP,
but I haven't got around to fixing things so we can omit it from the
build completely yet.

18 years ago[project @ 2005-10-24 09:33:37 by simonmar]
simonmar [Mon, 24 Oct 2005 09:33:37 +0000 (09:33 +0000)]
[project @ 2005-10-24 09:33:37 by simonmar]
Fix a warning

18 years ago[project @ 2005-10-24 09:28:38 by simonmar]
simonmar [Mon, 24 Oct 2005 09:28:38 +0000 (09:28 +0000)]
[project @ 2005-10-24 09:28:38 by simonmar]
Fix build for way "u"

18 years ago[project @ 2005-10-21 15:23:59 by simonmar]
simonmar [Fri, 21 Oct 2005 15:23:59 +0000 (15:23 +0000)]
[project @ 2005-10-21 15:23:59 by simonmar]
more Win32 fixes

18 years ago[project @ 2005-10-21 15:18:54 by simonmar]
simonmar [Fri, 21 Oct 2005 15:18:54 +0000 (15:18 +0000)]
[project @ 2005-10-21 15:18:54 by simonmar]
Fix Win32 DEBUG warnings

18 years ago[project @ 2005-10-21 15:14:06 by simonmar]
simonmar [Fri, 21 Oct 2005 15:14:06 +0000 (15:14 +0000)]
[project @ 2005-10-21 15:14:06 by simonmar]
Fix Win32 build

18 years ago[project @ 2005-10-21 14:47:36 by simonmar]
simonmar [Fri, 21 Oct 2005 14:47:36 +0000 (14:47 +0000)]
[project @ 2005-10-21 14:47:36 by simonmar]
No need to import platform-specific stuff now.

18 years ago[project @ 2005-10-21 14:45:59 by simonmar]
simonmar [Fri, 21 Oct 2005 14:45:59 +0000 (14:45 +0000)]
[project @ 2005-10-21 14:45:59 by simonmar]
Itimer.h has moved into posix/

18 years ago[project @ 2005-10-21 14:42:47 by simonmar]
simonmar [Fri, 21 Oct 2005 14:42:47 +0000 (14:42 +0000)]
[project @ 2005-10-21 14:42:47 by simonmar]
wibble

18 years ago[project @ 2005-10-21 14:41:04 by simonmar]
simonmar [Fri, 21 Oct 2005 14:41:04 +0000 (14:41 +0000)]
[project @ 2005-10-21 14:41:04 by simonmar]
oops, remove old file

18 years ago[project @ 2005-10-21 14:38:18 by simonmar]
simonmar [Fri, 21 Oct 2005 14:38:18 +0000 (14:38 +0000)]
[project @ 2005-10-21 14:38:18 by simonmar]
wibble

18 years ago[project @ 2005-10-21 14:02:17 by simonmar]
simonmar [Fri, 21 Oct 2005 14:02:18 +0000 (14:02 +0000)]
[project @ 2005-10-21 14:02:17 by simonmar]
Big re-hash of the threaded/SMP runtime

This is a significant reworking of the threaded and SMP parts of
the runtime.  There are two overall goals here:

  - To push down the scheduler lock, reducing contention and allowing
    more parts of the system to run without locks.  In particular,
    the scheduler does not require a lock any more in the common case.

  - To improve affinity, so that running Haskell threads stick to the
    same OS threads as much as possible.

At this point we have the basic structure working, but there are some
pieces missing.  I believe it's reasonably stable - the important
parts of the testsuite pass in all the (normal,threaded,SMP) ways.

In more detail:

  - Each capability now has a run queue, instead of one global run
    queue.  The Capability and Task APIs have been completely
    rewritten; see Capability.h and Task.h for the details.

  - Each capability has its own pool of worker Tasks.  Hence, Haskell
    threads on a Capability's run queue will run on the same worker
    Task(s).  As long as the OS is doing something reasonable, this
    should mean they usually stick to the same CPU.  Another way to
    look at this is that we're assuming each Capability is associated
    with a fixed CPU.

  - What used to be StgMainThread is now part of the Task structure.
    Every OS thread in the runtime has an associated Task, and it
    can ask for its current Task at any time with myTask().

  - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead
    (it is now defined for SMP too).

  - The RtsAPI has had to change; we must explicitly pass a Capability
    around now.  The previous interface assumed some global state.
    SchedAPI has also changed a lot.

  - The OSThreads API now supports thread-local storage, used to
    implement myTask(), although it could be done more efficiently
    using gcc's __thread extension when available.

  - I've moved some POSIX-specific stuff into the posix subdirectory,
    moving in the direction of separating out platform-specific
    implementations.

  - lots of lock-debugging and assertions in the runtime.  In particular,
    when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is
    also an ASSERT_LOCK_HELD() call.

What's missing so far:

  - I have almost certainly broken the Win32 build, will fix soon.

  - any kind of thread migration or load balancing.  This is high up
    the agenda, though.

  - various performance tweaks to do

  - throwTo and forkProcess still do not work in SMP mode

18 years ago[project @ 2005-10-20 14:00:36 by simonmar]
simonmar [Thu, 20 Oct 2005 14:00:36 +0000 (14:00 +0000)]
[project @ 2005-10-20 14:00:36 by simonmar]
Column numbers in SrcLocs are now counted as the number of characters,
rather than columns.  i.e. a tab always counts as 1.  This was
necessary for communication with Visual Studio interfaces which expect
character indices, but also it seems the majority of other compilers
also do things this way.

From: Krasimir Angelov <kr.angelov@gmail.com>

18 years ago[project @ 2005-10-20 11:45:19 by simonmar]
simonmar [Thu, 20 Oct 2005 11:45:19 +0000 (11:45 +0000)]
[project @ 2005-10-20 11:45:19 by simonmar]
changes to exitScheduler(): instead of waiting for all the tasks to
stop, which is unreasonable, we just wait for the run queue to drain.
This is much quicker, but not ideal (see comments).

18 years ago[project @ 2005-10-20 00:52:38 by sof]
sof [Thu, 20 Oct 2005 00:52:38 +0000 (00:52 +0000)]
[project @ 2005-10-20 00:52:38 by sof]
[mingw]delay flushing console buffer until last possible moment. Merge to STABLE

18 years ago[project @ 2005-10-19 16:04:38 by sof]
sof [Wed, 19 Oct 2005 16:04:38 +0000 (16:04 +0000)]
[project @ 2005-10-19 16:04:38 by sof]
ocGetNames_PEi386(): correctly allocate .bss sections in relocatable
 object files. See commit for details; fixes misc GHCi crashes reported
 against 6.4.1.

Merge to STABLE.

18 years ago[project @ 2005-10-18 11:04:28 by panne]
panne [Tue, 18 Oct 2005 11:04:28 +0000 (11:04 +0000)]
[project @ 2005-10-18 11:04:28 by panne]
For the 100th time: Fixed the DocBook XML. >:-( Please, please, please:
Everybody should do a "make validate" before checking in any XML stuff!

18 years ago[project @ 2005-10-17 11:11:15 by simonpj]
simonpj [Mon, 17 Oct 2005 11:11:15 +0000 (11:11 +0000)]
[project @ 2005-10-17 11:11:15 by simonpj]
Buglets in GADT record-syntax stuff, which killed the weekend builds

18 years ago[project @ 2005-10-17 11:10:36 by simonpj]
simonpj [Mon, 17 Oct 2005 11:10:36 +0000 (11:10 +0000)]
[project @ 2005-10-17 11:10:36 by simonpj]
Small simplifier bug in case optimisation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The simplifier eliminates redundant case branches, and panics if there
are no case alternatives.  But due to a slightly delayed instantiation
of a type constructor variable 'p' by a type constructor 'P', it turned
out that an inner case had no alternatives at all, becuase an outer case
had not pruned a branch as quickly as it should have.

This commit fixes both problems:

a) SimplUtils.mkCase1 now returns a call to 'error' (instead of panicing)
   when it gets an empty list of alternatives.   Somewhat analogous to
   the inaccessible GADT case in Simplify.simplifyAlt

b) In SimplUtils.prepareDefault, use the up-to-date scrutinee, rather than
   the less up-to-date case_bndr, to get the case type constructor.  That
   leads to slightly earlier pruning of inaccessible branches.

Fixes a bug reported by Ian Lynagh.

Test is simplCore/should_compile/simpl013

18 years ago[project @ 2005-10-17 11:09:51 by simonpj]
simonpj [Mon, 17 Oct 2005 11:09:51 +0000 (11:09 +0000)]
[project @ 2005-10-17 11:09:51 by simonpj]
Comments only

18 years ago[project @ 2005-10-17 10:47:10 by simonmar]
simonmar [Mon, 17 Oct 2005 10:47:10 +0000 (10:47 +0000)]
[project @ 2005-10-17 10:47:10 by simonmar]
merge rev. 1.13.2.12 from ghc-6-4-branch

18 years ago[project @ 2005-10-17 10:01:35 by simonmar]
simonmar [Mon, 17 Oct 2005 10:01:35 +0000 (10:01 +0000)]
[project @ 2005-10-17 10:01:35 by simonmar]
Fix a comment

18 years ago[project @ 2005-10-17 09:42:56 by simonmar]
simonmar [Mon, 17 Oct 2005 09:42:56 +0000 (09:42 +0000)]
[project @ 2005-10-17 09:42:56 by simonmar]
note about watching for/preventing overwrites of critical files in the
bootstrap process.

18 years ago[project @ 2005-10-17 09:36:39 by simonmar]
simonmar [Mon, 17 Oct 2005 09:36:39 +0000 (09:36 +0000)]
[project @ 2005-10-17 09:36:39 by simonmar]
if TARGETPLATFORM differs from HOSTPLATFORM, don't attempt to build
DerivedConstants,h, ghcautoconf.h and GHCConstants.h.  If these aren't
present, emit a message to remind the user to copy them from the
target system.  Hopefully this should make bootstrapping slightly less
error prone.

18 years ago[project @ 2005-10-14 13:11:21 by simonmar]
simonmar [Fri, 14 Oct 2005 13:11:21 +0000 (13:11 +0000)]
[project @ 2005-10-14 13:11:21 by simonmar]
StrHash doesn't appear to be used; remove it.  I think it was an
earlier version of the string hashing code in Hash.c.

18 years ago[project @ 2005-10-14 12:29:53 by simonmar]
simonmar [Fri, 14 Oct 2005 12:29:53 +0000 (12:29 +0000)]
[project @ 2005-10-14 12:29:53 by simonmar]
Some more informative diagnostics for ghc -v about what the package
system is doing.  This should help when diagnosing strange-looking
errors from GHC:

Using package config file: /home/simonmar/fp/lib/i386-unknown-linux/ghc-6.4.1/package.conf
package posix-1.0 will be ignored due to missing dependencies:
  lang-1.0
package util-1.0 will be ignored due to missing dependencies:
  lang-1.0
package data-1.0 will be ignored due to missing dependencies:
  lang-1.0
package text-1.0 will be ignored due to missing dependencies:
  lang-1.0
package Cabal-1.1.4 will be ignored due to missing dependencies:
  util-1.0
*** Deleting temp files
Deleting:
ghc-6.4.1: unknown package: Cabal-1.1.4

18 years ago[project @ 2005-10-14 11:48:56 by simonmar]
simonmar [Fri, 14 Oct 2005 11:48:56 +0000 (11:48 +0000)]
[project @ 2005-10-14 11:48:56 by simonmar]
Fix a couple of problems with the "unknown package" error message

18 years ago[project @ 2005-10-14 11:22:41 by simonpj]
simonpj [Fri, 14 Oct 2005 11:22:42 +0000 (11:22 +0000)]
[project @ 2005-10-14 11:22:41 by simonpj]
Add record syntax for GADTs
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Atrijus Tang wanted to add record syntax for GADTs and existential
types, so he and I worked on it a bit at ICFP.  This commit is the
result.  Now you can say

 data T a where
  T1 { x :: a }             :: T [a]
  T2 { x :: a, y :: Int }   :: T [a]
  forall b. Show b =>
  T3 { naughty :: b, ok :: Int } :: T Int
  T4 :: Eq a => a -> b -> T (a,b)

Here the constructors are declared using record syntax.

Still to come after this commit:
  - User manual documentation
  - More regression tests
  - Some missing cases in the parser (e.g. T3 won't parse)
Autrijus is going to do these.

Here's a quick summary of the rules.  (Atrijus is going to write
proper documentation shortly.)

Defnition: a 'vanilla' constructor has a type of the form
forall a1..an. t1 -> ... -> tm -> T a1 ... an
No existentials, no context, nothing.  A constructor declared with
Haskell-98 syntax is vanilla by construction.  A constructor declared
with GADT-style syntax is vanilla iff its type looks like the above.
(In the latter case, the order of the type variables does not matter.)

* You can mix record syntax and non-record syntax in a single decl

* All constructors that share a common field 'x' must have the
  same result type (T [a] in the example).

* You can use field names without restriction in record construction
  and record pattern matching.

* Record *update* only works for data types that only have 'vanilla'
  constructors.

* Consider the field 'naughty', which uses a type variable that does
  not appear in the result type ('b' in the example).  You can use the
  field 'naughty' in pattern matching and construction, but NO
  SELECTOR function is generated for 'naughty'.  [An attempt to use
  'naughty' as a selector function will elicit a helpful error
  message.]

* Data types declared in GADT syntax cannot have a context. So this
is illegal:
data (Monad m) => T a where
  ....

* Constructors in GADT syntax can have a context (t.g. T3, T4 above)
  and that context is stored in the constructor and made available
  when the constructor is pattern-matched on.  WARNING: not competely
  implemented yet, but that's the plan.

Implementation notes
~~~~~~~~~~~~~~~~~~~~
- Data constructors (even vanilla ones) no longer share the type
  variables of their parent type constructor.

- HsDecls.ConDecl has changed quite a bit

- TyCons don't record the field labels and type any more (doesn't
  make sense for existential fields)

- GlobalIdDetails records which selectors are 'naughty', and hence
  don't have real code.

18 years ago[project @ 2005-10-13 00:11:17 by sof]
sof [Thu, 13 Oct 2005 00:11:17 +0000 (00:11 +0000)]
[project @ 2005-10-13 00:11:17 by sof]
add protos for HeapStackCheck.cmm:stg_block_blackhole_* entry points

18 years ago[project @ 2005-10-12 14:10:12 by simonmar]
simonmar [Wed, 12 Oct 2005 14:10:12 +0000 (14:10 +0000)]
[project @ 2005-10-12 14:10:12 by simonmar]
- we should be acquiring the sm_lock around allocGroup()
- sanity check threads as they are pulled off the blackhole_queue

18 years ago[project @ 2005-10-12 13:31:12 by simonpj]
simonpj [Wed, 12 Oct 2005 13:31:12 +0000 (13:31 +0000)]
[project @ 2005-10-12 13:31:12 by simonpj]
MERGE TO STABLE

Fix a bug in TcUnify.unifyTyConApp that made a GADT program fail.
The trouble happens if the type that we are expecting to be
a TyConApp is of form (m a b), where 'm' is refined to a type
constructor.  Then we want to get nice rigid results, and we weren't.

18 years ago[project @ 2005-10-12 13:29:12 by simonpj]
simonpj [Wed, 12 Oct 2005 13:29:12 +0000 (13:29 +0000)]
[project @ 2005-10-12 13:29:12 by simonpj]
Small refactoring

18 years ago[project @ 2005-10-12 12:58:38 by simonmar]
simonmar [Wed, 12 Oct 2005 12:58:38 +0000 (12:58 +0000)]
[project @ 2005-10-12 12:58:38 by simonmar]
DEBUG_FILL_SLOP: don't do anything on SMP, zeroing slop words isn't safe

18 years ago[project @ 2005-10-12 12:57:23 by simonmar]
simonmar [Wed, 12 Oct 2005 12:57:23 +0000 (12:57 +0000)]
[project @ 2005-10-12 12:57:23 by simonmar]
checkHeap: just return on SMP, we can't do heap sanity checking
because we can't zero slop words safely.

18 years ago[project @ 2005-10-12 12:56:30 by simonmar]
simonmar [Wed, 12 Oct 2005 12:56:30 +0000 (12:56 +0000)]
[project @ 2005-10-12 12:56:30 by simonmar]
Fix assertion failure in memInventory() with SMP

18 years ago[project @ 2005-10-12 12:53:15 by simonmar]
simonmar [Wed, 12 Oct 2005 12:53:15 +0000 (12:53 +0000)]
[project @ 2005-10-12 12:53:15 by simonmar]
When blocking on a BLACKHOLE, we must wait until we have finished
manipulating the current thread's stack before we release sched_mutex,
otherwise another thread can pick up the thread from the
blackhole_queue and start running it.

18 years ago[project @ 2005-10-12 02:12:34 by wolfgang]
wolfgang [Wed, 12 Oct 2005 02:12:34 +0000 (02:12 +0000)]
[project @ 2005-10-12 02:12:34 by wolfgang]
Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
commit.

Make the code that allocates jump islands for PowerPC aware of how we shift
.o files in memory to compensate for Mach-O's lax alignment rules.

18 years ago[project @ 2005-10-11 13:28:49 by simonpj]
simonpj [Tue, 11 Oct 2005 13:28:49 +0000 (13:28 +0000)]
[project @ 2005-10-11 13:28:49 by simonpj]
Small fixes to the Win32 build log

18 years ago[project @ 2005-10-10 10:32:09 by simonmar]
simonmar [Mon, 10 Oct 2005 10:32:09 +0000 (10:32 +0000)]
[project @ 2005-10-10 10:32:09 by simonmar]
Fix bug in previous commit (fixes recent seg faults in nightly stage2)

18 years ago[project @ 2005-10-10 10:15:05 by simonmar]
simonmar [Mon, 10 Oct 2005 10:15:05 +0000 (10:15 +0000)]
[project @ 2005-10-10 10:15:05 by simonmar]
identify "mode" as a class of flags, in addition to "static" and "dyanmic"

18 years ago[project @ 2005-10-10 10:14:06 by simonmar]
simonmar [Mon, 10 Oct 2005 10:14:06 +0000 (10:14 +0000)]
[project @ 2005-10-10 10:14:06 by simonmar]
flag reference update: a bunch of static flags are now dynamic

18 years ago[project @ 2005-10-07 11:01:47 by simonmar]
simonmar [Fri, 7 Oct 2005 11:01:47 +0000 (11:01 +0000)]
[project @ 2005-10-07 11:01:47 by simonmar]
Fix a bug I just found: hiding a package if later versions are exposed
wasn't actually checking the exposed flag.

18 years ago[project @ 2005-10-06 10:41:15 by simonmar]
simonmar [Thu, 6 Oct 2005 10:41:15 +0000 (10:41 +0000)]
[project @ 2005-10-06 10:41:15 by simonmar]
comment typo

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-06 10:40:40 by simonmar]
simonmar [Thu, 6 Oct 2005 10:40:40 +0000 (10:40 +0000)]
[project @ 2005-10-06 10:40:40 by simonmar]
remove old comment

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-06 10:40:10 by simonmar]
simonmar [Thu, 6 Oct 2005 10:40:10 +0000 (10:40 +0000)]
[project @ 2005-10-06 10:40:10 by simonmar]
add dataConFieldType

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-06 10:39:37 by simonmar]
simonmar [Thu, 6 Oct 2005 10:39:37 +0000 (10:39 +0000)]
[project @ 2005-10-06 10:39:37 by simonmar]
refactoring (use record fields instead of selector functions)

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-06 10:38:54 by simonmar]
simonmar [Thu, 6 Oct 2005 10:38:54 +0000 (10:38 +0000)]
[project @ 2005-10-06 10:38:54 by simonmar]
add splitHsFunType

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-06 10:38:22 by simonmar]
simonmar [Thu, 6 Oct 2005 10:38:22 +0000 (10:38 +0000)]
[project @ 2005-10-06 10:38:22 by simonmar]
small refactoring

From: Autrijus Tang <autrijus@autrijus.org>

18 years ago[project @ 2005-10-05 13:34:04 by simonmar]
simonmar [Wed, 5 Oct 2005 13:34:04 +0000 (13:34 +0000)]
[project @ 2005-10-05 13:34:04 by simonmar]
DEBUG_FILL_SLOP(): fill slop for AP_STACK closures too

18 years ago[project @ 2005-10-05 13:09:28 by simonmar]
simonmar [Wed, 5 Oct 2005 13:09:28 +0000 (13:09 +0000)]
[project @ 2005-10-05 13:09:28 by simonmar]
Mention that assertions are turned off by -O

18 years ago[project @ 2005-10-05 13:08:58 by simonmar]
simonmar [Wed, 5 Oct 2005 13:08:58 +0000 (13:08 +0000)]
[project @ 2005-10-05 13:08:58 by simonmar]
remove duplicate mention of -fignore-asserts

18 years ago[project @ 2005-09-24 15:07:49 by panne]
panne [Sat, 24 Sep 2005 15:07:49 +0000 (15:07 +0000)]
[project @ 2005-09-24 15:07:49 by panne]
Synched all FPTOOLS_CHECK_HTYPE definitions with the latest changes in
libraries/OpenAL/aclocal.m4. Although it is not strictly necessary, keeping
things identical is good for consistency. At some point in time we should
really find a way to eliminate all this redundancy... *sigh*

18 years ago[project @ 2005-09-24 04:22:22 by wolfgang]
wolfgang [Sat, 24 Sep 2005 04:22:22 +0000 (04:22 +0000)]
[project @ 2005-09-24 04:22:22 by wolfgang]
x86 & PIC: make floating point constants on x86 PIC-aware

18 years ago[project @ 2005-09-24 04:21:29 by wolfgang]
wolfgang [Sat, 24 Sep 2005 04:21:29 +0000 (04:21 +0000)]
[project @ 2005-09-24 04:21:29 by wolfgang]
Darwin/x86: Try again to get stack alignment right.

18 years ago[project @ 2005-09-24 02:15:32 by wolfgang]
wolfgang [Sat, 24 Sep 2005 02:15:32 +0000 (02:15 +0000)]
[project @ 2005-09-24 02:15:32 by wolfgang]
PowerPC: track changes in the rest of the register allocator

18 years ago[project @ 2005-09-23 10:13:33 by simonmar]
simonmar [Fri, 23 Sep 2005 10:13:33 +0000 (10:13 +0000)]
[project @ 2005-09-23 10:13:33 by simonmar]
in --make mode, don't re-link when the executable is up to date.

18 years ago[project @ 2005-09-21 09:58:53 by simonmar]
simonmar [Wed, 21 Sep 2005 09:58:53 +0000 (09:58 +0000)]
[project @ 2005-09-21 09:58:53 by simonmar]
distill a bit of wisdom from the mailing list

18 years ago[project @ 2005-09-21 09:54:59 by simonmar]
simonmar [Wed, 21 Sep 2005 09:54:59 +0000 (09:54 +0000)]
[project @ 2005-09-21 09:54:59 by simonmar]
Document the -x flag

18 years ago[project @ 2005-09-20 16:35:26 by ross]
ross [Tue, 20 Sep 2005 16:35:26 +0000 (16:35 +0000)]
[project @ 2005-09-20 16:35:26 by ross]
move RTLD_* tests down to unix package

18 years ago[project @ 2005-09-20 12:07:58 by simonmar]
simonmar [Tue, 20 Sep 2005 12:07:58 +0000 (12:07 +0000)]
[project @ 2005-09-20 12:07:58 by simonmar]
Update the license: we now use a BSD license, although the release
will be binary-only.

18 years ago[project @ 2005-09-18 16:27:21 by wolfgang]
wolfgang [Sun, 18 Sep 2005 16:27:21 +0000 (16:27 +0000)]
[project @ 2005-09-18 16:27:21 by wolfgang]
Make outOfLineFloatOp PIC/dynamic-linking-aware on i386

18 years ago[project @ 2005-09-18 16:23:57 by wolfgang]
wolfgang [Sun, 18 Sep 2005 16:23:57 +0000 (16:23 +0000)]
[project @ 2005-09-18 16:23:57 by wolfgang]
Fix last commit: it's opt_Static in the HEAD branch, not a local variable
"static".

18 years ago[project @ 2005-09-18 10:01:57 by panne]
panne [Sun, 18 Sep 2005 10:01:57 +0000 (10:01 +0000)]
[project @ 2005-09-18 10:01:57 by panne]
Fixed a few underquoted definitions.

18 years ago[project @ 2005-09-18 07:12:44 by wolfgang]
wolfgang [Sun, 18 Sep 2005 07:12:44 +0000 (07:12 +0000)]
[project @ 2005-09-18 07:12:44 by wolfgang]
PIC version for genSwitch on i386

18 years ago[project @ 2005-09-18 07:09:50 by wolfgang]
wolfgang [Sun, 18 Sep 2005 07:09:50 +0000 (07:09 +0000)]
[project @ 2005-09-18 07:09:50 by wolfgang]
A hack to make -dynamic work again:
when a library listed in extraLibraries ends with "_cbits", append "_dyn"
when -dynamic is passed, i.e. extraLibraries = ["foo", "HSbase_cbits"]
loads -lfoo and -lHSbase_cbits in the static case, but -lfoo and
-lHSbase_cbits_dyn in the -dynamic case.

It's an ugly hack, but it affects only the case when -dynamic is passed,
which would not work otherwise right now, so let's

MERGE TO STABLE

18 years ago[project @ 2005-09-16 14:02:22 by simonmar]
simonmar [Fri, 16 Sep 2005 14:02:22 +0000 (14:02 +0000)]
[project @ 2005-09-16 14:02:22 by simonmar]
Update for Sparc/Solaris from Christian Meader.  This might fix GHCi
on Sparc.

18 years ago[project @ 2005-09-16 11:23:45 by simonmar]
simonmar [Fri, 16 Sep 2005 11:23:45 +0000 (11:23 +0000)]
[project @ 2005-09-16 11:23:45 by simonmar]
- Mention bundled documentation
- Add some more copyrights
- Add authors

18 years ago[project @ 2005-09-16 10:36:53 by simonmar]
simonmar [Fri, 16 Sep 2005 10:36:53 +0000 (10:36 +0000)]
[project @ 2005-09-16 10:36:53 by simonmar]
only set bootstrapped=YES if the version we're building with is
exactly the *same* as the version being built, rather than a later
version.

18 years ago[project @ 2005-09-16 09:59:26 by simonmar]
simonmar [Fri, 16 Sep 2005 09:59:26 +0000 (09:59 +0000)]
[project @ 2005-09-16 09:59:26 by simonmar]
Add some missing cases to heapCensus(); should fix heap profiling of
code that uses STM.

18 years ago[project @ 2005-09-16 09:37:18 by simonmar]
simonmar [Fri, 16 Sep 2005 09:37:18 +0000 (09:37 +0000)]
[project @ 2005-09-16 09:37:18 by simonmar]
rev. 1.258 introduced a double acquire of sched_mutex; createThread()
is called with sched_mutex already held by rts_evalIO() and friends.
This fixes it.

18 years ago[project @ 2005-09-16 07:59:48 by simonmar]
simonmar [Fri, 16 Sep 2005 07:59:48 +0000 (07:59 +0000)]
[project @ 2005-09-16 07:59:48 by simonmar]
Somehow, I managed to commit the wrong version of yesterday's hack.
Sigh.  Try again.

18 years ago[project @ 2005-09-15 18:12:25 by krasimir]
krasimir [Thu, 15 Sep 2005 18:12:25 +0000 (18:12 +0000)]
[project @ 2005-09-15 18:12:25 by krasimir]
Add Makefile