ghc-hetmet.git
18 years ago[project @ 2005-06-07 15:06:59 by simonmar]
simonmar [Tue, 7 Jun 2005 15:06:59 +0000 (15:06 +0000)]
[project @ 2005-06-07 15:06:59 by simonmar]
Remove some non-portable uses of /bin/test, from Christian Maeder.

18 years ago[project @ 2005-06-07 10:58:31 by simonmar]
simonmar [Tue, 7 Jun 2005 10:58:31 +0000 (10:58 +0000)]
[project @ 2005-06-07 10:58:31 by simonmar]
Various updates and improvements.

18 years ago[project @ 2005-06-07 09:55:03 by simonmar]
simonmar [Tue, 7 Jun 2005 09:55:03 +0000 (09:55 +0000)]
[project @ 2005-06-07 09:55:03 by simonmar]
-ddump-hi-diffs shouldn't turn off recompilation checking

18 years ago[project @ 2005-06-07 08:56:23 by simonmar]
simonmar [Tue, 7 Jun 2005 08:56:23 +0000 (08:56 +0000)]
[project @ 2005-06-07 08:56:23 by simonmar]
add filename to some error messages on mingw32

18 years ago[project @ 2005-06-07 08:19:50 by simonpj]
simonpj [Tue, 7 Jun 2005 08:19:50 +0000 (08:19 +0000)]
[project @ 2005-06-07 08:19:50 by simonpj]
Mention that type splices are not implemented; MERGE to STABLE

18 years ago[project @ 2005-06-06 13:19:41 by simonmar]
simonmar [Mon, 6 Jun 2005 13:19:41 +0000 (13:19 +0000)]
[project @ 2005-06-06 13:19:41 by simonmar]
Hopefully fix more compilation problems with various versions of GHC

18 years ago[project @ 2005-06-06 09:10:41 by simonmar]
simonmar [Mon, 6 Jun 2005 09:10:41 +0000 (09:10 +0000)]
[project @ 2005-06-06 09:10:41 by simonmar]
Make this build with GHC < 6.03 again

18 years ago[project @ 2005-06-06 08:49:07 by tharris]
tharris [Mon, 6 Jun 2005 08:49:07 +0000 (08:49 +0000)]
[project @ 2005-06-06 08:49:07 by tharris]
Remove SMP-only fields from STM data structures from non-SMP builds

18 years ago[project @ 2005-06-03 10:20:34 by simonmar]
simonmar [Fri, 3 Jun 2005 10:20:34 +0000 (10:20 +0000)]
[project @ 2005-06-03 10:20:34 by simonmar]
Allow calls to __alloca in the prologue on mingw32 (previously only
allowed for cygwin32, I guess it hasn't happened for a while).

18 years ago[project @ 2005-06-03 10:08:55 by simonmar]
simonmar [Fri, 3 Jun 2005 10:08:55 +0000 (10:08 +0000)]
[project @ 2005-06-03 10:08:55 by simonmar]
Check for reserved stack space blown.

18 years ago[project @ 2005-06-03 09:56:38 by simonmar]
simonmar [Fri, 3 Jun 2005 09:56:38 +0000 (09:56 +0000)]
[project @ 2005-06-03 09:56:38 by simonmar]
Profiling doesn't require -fvia-C any more.  Also, I optimistically
removed -fvia-C from all the other ways except unreg.

18 years ago[project @ 2005-06-03 08:47:58 by simonmar]
simonmar [Fri, 3 Jun 2005 08:47:58 +0000 (08:47 +0000)]
[project @ 2005-06-03 08:47:58 by simonmar]
Fix crash in LDV profiling on the HEAD

18 years ago[project @ 2005-06-02 16:52:58 by sof]
sof [Thu, 2 Jun 2005 16:52:58 +0000 (16:52 +0000)]
[project @ 2005-06-02 16:52:58 by sof]
add .svn/ to list of ignorable dirs

18 years ago[project @ 2005-06-02 08:51:17 by simonmar]
simonmar [Thu, 2 Jun 2005 08:51:17 +0000 (08:51 +0000)]
[project @ 2005-06-02 08:51:17 by simonmar]
Make GHC.depanal store the module graph in the session again.  Fixes
ghc -M.

18 years ago[project @ 2005-06-01 13:17:12 by simonmar]
simonmar [Wed, 1 Jun 2005 13:17:12 +0000 (13:17 +0000)]
[project @ 2005-06-01 13:17:12 by simonmar]
Fix a regex bug

18 years ago[project @ 2005-05-31 14:14:26 by simonmar]
simonmar [Tue, 31 May 2005 14:14:26 +0000 (14:14 +0000)]
[project @ 2005-05-31 14:14:26 by simonmar]
Make more error messages from the downsweep into ErrMsg exceptions.

18 years ago[project @ 2005-05-31 13:10:39 by simonmar]
simonmar [Tue, 31 May 2005 13:10:39 +0000 (13:10 +0000)]
[project @ 2005-05-31 13:10:39 by simonmar]
oops, fix updating the module graph

18 years ago[project @ 2005-05-31 12:45:03 by simonmar]
simonmar [Tue, 31 May 2005 12:45:04 +0000 (12:45 +0000)]
[project @ 2005-05-31 12:45:03 by simonmar]
Fix some reporting of errors in the GHC API: errors during the
downsweep were thrown as exceptions; now they're reported via the
(Messages->IO ()) callback in the same way as other errors.

getModuleInfo no longer prints anything on stdout.  It does ignore
error messages and return Nothing, however - we should fix this and
return the error messages at some point.

The ErrMsg type can now be thrown as an exception.  This can be a
convenient alternative if collecting multiple error messages isn't
required.  We do this in the downsweep now.

18 years ago[project @ 2005-05-31 09:11:27 by simonmar]
simonmar [Tue, 31 May 2005 09:11:27 +0000 (09:11 +0000)]
[project @ 2005-05-31 09:11:27 by simonmar]
Fix the names of a few fields.

18 years ago[project @ 2005-05-27 14:47:08 by tharris]
tharris [Fri, 27 May 2005 14:47:10 +0000 (14:47 +0000)]
[project @ 2005-05-27 14:47:08 by tharris]
Update STM implementation for SMP builds

18 years ago[project @ 2005-05-26 21:37:13 by simonpj]
simonpj [Thu, 26 May 2005 21:37:13 +0000 (21:37 +0000)]
[project @ 2005-05-26 21:37:13 by simonpj]
MERGE TO STABLE

Put back in a missing case for higher-rank types. When the
definition is
a) non-recursive
b) a function binding
c) lacks a type signature
we want to *infer* a perhaps-higher-rank type for the RHS,
before making a monomorphically-typed Id for the LHS.

E.g.  f = \(x :: forall a. a->a) -> (x True, x 'c')

This case got lost in the transition to 6.4

tc194 tests it

18 years ago[project @ 2005-05-25 20:28:26 by simonmar]
simonmar [Wed, 25 May 2005 20:28:26 +0000 (20:28 +0000)]
[project @ 2005-05-25 20:28:26 by simonmar]
Fix Linker on Windows: there was one more place where we had to check
for ".ctors" sections.

18 years ago[project @ 2005-05-25 12:38:14 by simonpj]
simonpj [Wed, 25 May 2005 12:38:14 +0000 (12:38 +0000)]
[project @ 2005-05-25 12:38:14 by simonpj]
Fix url

18 years ago[project @ 2005-05-25 08:33:15 by simonmar]
simonmar [Wed, 25 May 2005 08:33:15 +0000 (08:33 +0000)]
[project @ 2005-05-25 08:33:15 by simonmar]
something very strange happened with previous commit; try again

18 years ago[project @ 2005-05-25 08:23:17 by simonmar]
simonmar [Wed, 25 May 2005 08:23:17 +0000 (08:23 +0000)]
[project @ 2005-05-25 08:23:17 by simonmar]
Fix threaded RTS with older gcc versions. (merge rev. 1.215.2.10)

18 years ago[project @ 2005-05-24 16:10:35 by simonmar]
simonmar [Tue, 24 May 2005 16:10:35 +0000 (16:10 +0000)]
[project @ 2005-05-24 16:10:35 by simonmar]
Move RTS_SUPPORTS_THREADS into RtsConfig.h

18 years ago[project @ 2005-05-24 15:43:32 by simonmar]
simonmar [Tue, 24 May 2005 15:43:32 +0000 (15:43 +0000)]
[project @ 2005-05-24 15:43:32 by simonmar]
implement lockClosure properly

18 years ago[project @ 2005-05-24 14:52:08 by simonmar]
simonmar [Tue, 24 May 2005 14:52:08 +0000 (14:52 +0000)]
[project @ 2005-05-24 14:52:08 by simonmar]
isObjectLinkable: don't return True for an empty linkable

18 years ago[project @ 2005-05-24 14:19:09 by simonmar]
simonmar [Tue, 24 May 2005 14:19:09 +0000 (14:19 +0000)]
[project @ 2005-05-24 14:19:09 by simonmar]
If hsc_lang is HscNothing, produce an empty linkable.

18 years ago[project @ 2005-05-24 14:18:34 by simonmar]
simonmar [Tue, 24 May 2005 14:18:34 +0000 (14:18 +0000)]
[project @ 2005-05-24 14:18:34 by simonmar]
Don't write the interface in JustTypecheck mode

18 years ago[project @ 2005-05-24 09:38:29 by simonpj]
simonpj [Tue, 24 May 2005 09:38:29 +0000 (09:38 +0000)]
[project @ 2005-05-24 09:38:29 by simonpj]
Yet another wibble to the GHCi top-level interaction story; avoid dup error messages

18 years ago[project @ 2005-05-24 07:47:12 by simonpj]
simonpj [Tue, 24 May 2005 07:47:12 +0000 (07:47 +0000)]
[project @ 2005-05-24 07:47:12 by simonpj]
typo

18 years ago[project @ 2005-05-24 04:45:15 by chak]
chak [Tue, 24 May 2005 04:45:15 +0000 (04:45 +0000)]
[project @ 2005-05-24 04:45:15 by chak]
More details about the representation of types after type checking.

18 years ago[project @ 2005-05-23 15:44:10 by simonmar]
simonmar [Mon, 23 May 2005 15:44:10 +0000 (15:44 +0000)]
[project @ 2005-05-23 15:44:10 by simonmar]
Simplify and improve the Capability-passing machinery for bound
threads.

The old story was quite complicated: if you find a thread on the run
queue which the current task can't run, you had to call
passCapability(), which set a flag saying where the next Capability
was to go, and then release the Capability.  When multiple
Capabilities are flying around, it's not clear how this story should
extend.

The new story is much simpler: each time around the scheduler loop,
the task looks to see whether it can make any progress, and if not, it
releases its Capability and wakes up a task which *can* make some
progress.  The predicate for whether we can make any progress is
encapsulated in the (inline) function ANY_WORK_FOR_ME(Condition).
Waking up an appropriate task is encapsulated in the function
threadRunnable() (previously it was in two places).

The logic in Capability.c is simpler, but unfortunately it is now more
closely connected with the Scheduler, because it inspects the run
queue.  However, performance when communicating between bound and
unbound threads might be better.

The concurrency tests still work, so hopefully this hasn't broken
anything.

18 years ago[project @ 2005-05-23 14:49:59 by simonpj]
simonpj [Mon, 23 May 2005 14:49:59 +0000 (14:49 +0000)]
[project @ 2005-05-23 14:49:59 by simonpj]
Print only the result of a bind stmt

18 years ago[project @ 2005-05-23 13:39:55 by simonmar]
simonmar [Mon, 23 May 2005 13:39:55 +0000 (13:39 +0000)]
[project @ 2005-05-23 13:39:55 by simonmar]
- scheduleDetectDeadlock() should invoke GarbageCollect() via
  scheduleDoGC(), which collects the Capabilities first.

- scheduleDoGC() doesn't need the Capability.  Also, it appears that
  there was an out-of-bounds array access in here.

- add printThreadQueue(), useful from gdb.

- fix a couple of warnings.

18 years ago[project @ 2005-05-23 13:00:46 by simonpj]
simonpj [Mon, 23 May 2005 13:00:46 +0000 (13:00 +0000)]
[project @ 2005-05-23 13:00:46 by simonpj]
rename exportsFromAvail

18 years ago[project @ 2005-05-23 13:00:30 by simonpj]
simonpj [Mon, 23 May 2005 13:00:30 +0000 (13:00 +0000)]
[project @ 2005-05-23 13:00:30 by simonpj]
Further GHCi wibbles

a) Don't print the value of a 'let'
b) Only one error message for 'print id'

18 years ago[project @ 2005-05-23 10:17:45 by simonpj]
simonpj [Mon, 23 May 2005 10:17:45 +0000 (10:17 +0000)]
[project @ 2005-05-23 10:17:45 by simonpj]
Dead code (HEAD only)

18 years ago[project @ 2005-05-23 10:17:22 by simonpj]
simonpj [Mon, 23 May 2005 10:17:22 +0000 (10:17 +0000)]
[project @ 2005-05-23 10:17:22 by simonpj]
Fix what "standard class" means

MERGE to STABLE

The Report's definition of defaulting (Section 4.3.4) defines a "standard class" to be
one defined by the Prelude or a standard library.  GHC was omitting the "..or a standard
library" part; and it even omitted the Prelude classes Monad and Functor.
This commit fixes the bug by adding

Random, RandomGen,
Monad, MonadPlus, Functor

to the classes defined as "standard".

18 years ago[project @ 2005-05-23 09:56:17 by simonpj]
simonpj [Mon, 23 May 2005 09:56:17 +0000 (09:56 +0000)]
[project @ 2005-05-23 09:56:17 by simonpj]
Comments and type sig only

18 years ago[project @ 2005-05-23 09:56:03 by simonpj]
simonpj [Mon, 23 May 2005 09:56:03 +0000 (09:56 +0000)]
[project @ 2005-05-23 09:56:03 by simonpj]
Track new semantics of splitLongestPrefix; fixes -main-is bug

18 years ago[project @ 2005-05-23 09:50:26 by simonpj]
simonpj [Mon, 23 May 2005 09:50:26 +0000 (09:50 +0000)]
[project @ 2005-05-23 09:50:26 by simonpj]
Clarify code for splitLongestPrefix; no effect on behaviour

18 years ago[project @ 2005-05-23 08:22:06 by simonmar]
simonmar [Mon, 23 May 2005 08:22:06 +0000 (08:22 +0000)]
[project @ 2005-05-23 08:22:06 by simonmar]
needsCDecl: remove extra equation for CaseLabel, which was overlapped
(and wrong!).

18 years ago[project @ 2005-05-21 16:09:18 by panne]
panne [Sat, 21 May 2005 16:09:18 +0000 (16:09 +0000)]
[project @ 2005-05-21 16:09:18 by panne]
Warning police (format strings, unused variables)

18 years ago[project @ 2005-05-21 15:39:00 by panne]
panne [Sat, 21 May 2005 15:39:00 +0000 (15:39 +0000)]
[project @ 2005-05-21 15:39:00 by panne]
Warning police: Removed overlapped patterns. In general, taking
compiler warnings about unmatched patterns seriously when they come up
later might be better than writing catch-all patterns right from the
start. Otherwise readers are confused and wonder which patterns might
be missing when there are none.

18 years ago[project @ 2005-05-21 15:20:43 by panne]
panne [Sat, 21 May 2005 15:20:43 +0000 (15:20 +0000)]
[project @ 2005-05-21 15:20:43 by panne]
Warning police: Removed an overlapped catch-all pattern (which could
really never match due to genprimopcode)

18 years ago[project @ 2005-05-21 15:12:00 by panne]
panne [Sat, 21 May 2005 15:12:00 +0000 (15:12 +0000)]
[project @ 2005-05-21 15:12:00 by panne]
Warning police: Use non-deprecated form of "foreign import"

18 years ago[project @ 2005-05-21 15:07:26 by panne]
panne [Sat, 21 May 2005 15:07:26 +0000 (15:07 +0000)]
[project @ 2005-05-21 15:07:26 by panne]
While acting as warning police, I tried to clean up the #ifdef chaos a
little bit, I hope nothing has been broken due to that... :-]

18 years ago[project @ 2005-05-20 14:40:50 by krasimir]
krasimir [Fri, 20 May 2005 14:40:50 +0000 (14:40 +0000)]
[project @ 2005-05-20 14:40:50 by krasimir]
Bugfix: in rtsFatalInternalErrorFn vsnprintf function was used instead of
snprintf. The code is changed so that the error message will be displayed
even if it is longer that BUFSIZE.

18 years ago[project @ 2005-05-20 12:50:42 by simonmar]
simonmar [Fri, 20 May 2005 12:50:42 +0000 (12:50 +0000)]
[project @ 2005-05-20 12:50:42 by simonmar]
Implement some more error checking to catch some cases where
registering a package will lead to a package database containing
conflicts, which would otherwise prevent GHC from being used without
any -hide-package options.

In 'update' mode, instead of complaining about conflicts, we now
attempt to hide any packages which would cause a conflict.  Previously
this was limited to just older versions of the current package, now it
applies to all packages which contain, or depend on packages which
contain, modules which conflict with any module belonging to the
current package or a dependency of it.

Unfortunately we still can't cope with conflicts that cross the
boundary between the user package databse and the global one.  We will
need some kind of white-out mechanism in order to be able to hide a
global package in the user database.

18 years ago[project @ 2005-05-20 12:28:14 by simonpj]
simonpj [Fri, 20 May 2005 12:28:14 +0000 (12:28 +0000)]
[project @ 2005-05-20 12:28:14 by simonpj]
Documentation for new GHCi behaviour

18 years ago[project @ 2005-05-20 12:06:00 by simonpj]
simonpj [Fri, 20 May 2005 12:06:00 +0000 (12:06 +0000)]
[project @ 2005-05-20 12:06:00 by simonpj]
Further wibble to preceding GHCi commit

18 years ago[project @ 2005-05-20 11:58:01 by simonpj]
simonpj [Fri, 20 May 2005 11:58:01 +0000 (11:58 +0000)]
[project @ 2005-05-20 11:58:01 by simonpj]
Wibble to preceding GHCi commit

18 years ago[project @ 2005-05-20 11:42:57 by simonpj]
simonpj [Fri, 20 May 2005 11:42:57 +0000 (11:42 +0000)]
[project @ 2005-05-20 11:42:57 by simonpj]
Improve the GHCi interaction

Merge to STABLE?

This fix addresses Sourceforge #1156554 "GHCi: No instance for (Show (IO ()))",
and simultaneously improves the top-level interaction in two other ways:

- Only one error can show up (previously there could be two)

- If an I/O action gives a Showable result, the result is printed
  (provided it isn't ()).  So
prompt> return 4
  prints 4, rather than nothing

- For command-line 'let' and 'x<-e' forms, if exactly one variable
  is bound, we print its value if it is Showable and not ()
prompt> let x = 4
4
prompt> x <- return 5
5

18 years ago[project @ 2005-05-20 11:32:03 by simonpj]
simonpj [Fri, 20 May 2005 11:32:03 +0000 (11:32 +0000)]
[project @ 2005-05-20 11:32:03 by simonpj]
Liberalise the defaulting rules for GHCi

Merge to STABLE?

The H98 defaulting rules are these.  Group constraints of the form (C v),
for some particular type variable v. Then default v if

a) v appears only in this group (no implicit params or D [v])
b) at least one of the C's is numeric
c) all the C's are standard

GHCi changed rules (b) to

(b') at least one of the C's is numeric, or Eq,Ord,Show

This commit further liberalises GHCi to change (c):

(c') any of the C's are standard

Otherwise the existence of a non-standard class (e.g. Random) is enough
to kill defaulting altogether.

18 years ago[project @ 2005-05-20 11:31:46 by simonpj]
simonpj [Fri, 20 May 2005 11:31:46 +0000 (11:31 +0000)]
[project @ 2005-05-20 11:31:46 by simonpj]
Comments only

18 years ago[project @ 2005-05-19 13:46:24 by simonmar]
simonmar [Thu, 19 May 2005 13:46:24 +0000 (13:46 +0000)]
[project @ 2005-05-19 13:46:24 by simonmar]
Fix locking when unblocking a thread in take/putMVar.  Due to CPP
nonsense the previous locking wasn't actually working, which lead to
deadlock problems.  It now turns out that I can call unblockOne
directly rather than needing unblockOneLocked (the lock on the MVar
means I have exclusive access to the threads on its queue).

18 years ago[project @ 2005-05-19 13:21:55 by simonmar]
simonmar [Thu, 19 May 2005 13:21:55 +0000 (13:21 +0000)]
[project @ 2005-05-19 13:21:55 by simonmar]
- Move the call to threadPaused() from the scheduler into STG land,
  and put it in a new code fragment (stg_returnToSched) that we pass
  through every time we return from STG to the scheduler.  Also, the
  SAVE_THREAD_STATE() is now in stg_returnToSched which might save a
  little code space (at the expense of an extra jump for every return
  to the scheduler).

- SMP: when blocking on an MVar, we now wait until the thread has been
  made fully safe and placed on the blocked queue of the MVar before
  we unlock the MVar.  This closes a race whereby another OS thread could
  begin waking us up before the current TSO had been properly tidied up.

Fixes one cause of crashes when using MVars with SMP.  I still have a
deadlock problem to track down.

18 years ago[project @ 2005-05-19 11:17:20 by simonmar]
simonmar [Thu, 19 May 2005 11:17:20 +0000 (11:17 +0000)]
[project @ 2005-05-19 11:17:20 by simonmar]
SMP: omit the -pthread flag on Windows

18 years ago[project @ 2005-05-19 11:15:40 by simonpj]
simonpj [Thu, 19 May 2005 11:15:44 +0000 (11:15 +0000)]
[project @ 2005-05-19 11:15:40 by simonpj]
Tune up the reporting of unused imports

Merge to STABLE
(I think the earlier change made it across)
(PS: the commit also does some trimming of
redundant imports.  If they don't merge, just
discard them.)

My earlier fixes to the reporting of unused imports still missed
some obscure cases, some of which are now fixed by this commit.
I had to make the import-provenance data type yet richer, but in
fact it has more sharing now, so it may be cheaper on space.

There's still one infelicity. Consider
import M( x )
imoprt N( x )
where the same underlying 'x' is involved in both cases.  Currently we
don't report a redundant import, because dropping either import would
change the qualified names in scope (M.x, N.x). But if the qualified
names aren't used, the import is indeed redundant. Sadly we don't know
that, because we only know what Names are used.  Left for the future!
There's a comment in RnNames.warnDuplicateImports

This commit also trims quite a few redundant imports disovered
by the new setup.

18 years ago[project @ 2005-05-19 11:13:23 by simonmar]
simonmar [Thu, 19 May 2005 11:13:23 +0000 (11:13 +0000)]
[project @ 2005-05-19 11:13:23 by simonmar]
Add required include: #include "RtsFlags.h"

18 years ago[project @ 2005-05-19 11:09:27 by simonmar]
simonmar [Thu, 19 May 2005 11:09:27 +0000 (11:09 +0000)]
[project @ 2005-05-19 11:09:27 by simonmar]
Fix SMP build on Windows

18 years ago[project @ 2005-05-19 07:58:35 by simonpj]
simonpj [Thu, 19 May 2005 07:58:36 +0000 (07:58 +0000)]
[project @ 2005-05-19 07:58:35 by simonpj]
Catch an exception in Template Haskell code

Merge to STABLE

If the code run by a Template Haskell splice fails with, say,
a pattern-match failure, we should not report it as a GHC panic.
It's a bug in the user's program.

This commit fixes up the exception handling to do the right thing.

Fixes SourceForge item #1201666

TH_fail tests it.

18 years ago[project @ 2005-05-19 07:56:58 by simonpj]
simonpj [Thu, 19 May 2005 07:56:58 +0000 (07:56 +0000)]
[project @ 2005-05-19 07:56:58 by simonpj]
Make sure the default methods are in scope
in a Template Haskell splice

Merge to STABLE

This was just a typo really; in TcRnDriver.tcTopSrcDecls there were two
tcl_envs, but one had a different name so we got the less up-to-date one.

Fixes SourceForge item #1194808

TH_spliceInst tests it.

18 years ago[project @ 2005-05-18 15:34:27 by simonpj]
simonpj [Wed, 18 May 2005 15:34:27 +0000 (15:34 +0000)]
[project @ 2005-05-18 15:34:27 by simonpj]
Stuff about building on windows, mainly from Claus

18 years ago[project @ 2005-05-18 14:21:49 by simonmar]
simonmar [Wed, 18 May 2005 14:21:49 +0000 (14:21 +0000)]
[project @ 2005-05-18 14:21:49 by simonmar]
Slop-filling fix for SMP (and squash duplicate code)

18 years ago[project @ 2005-05-18 14:19:12 by simonmar]
simonmar [Wed, 18 May 2005 14:19:12 +0000 (14:19 +0000)]
[project @ 2005-05-18 14:19:12 by simonmar]
Slop-filling fixes for SMP/DEBUG

18 years ago[project @ 2005-05-18 13:10:21 by simonmar]
simonmar [Wed, 18 May 2005 13:10:21 +0000 (13:10 +0000)]
[project @ 2005-05-18 13:10:21 by simonmar]
Fix unreg build on Windows

18 years ago[project @ 2005-05-18 12:14:03 by simonmar]
simonmar [Wed, 18 May 2005 12:14:03 +0000 (12:14 +0000)]
[project @ 2005-05-18 12:14:03 by simonmar]
We should be using ASSIGN_DBL/PK_DBL for stores/loads respectively of
doubles.  Hopefully fixes SIGBUS on HPPA, and possible Sparc too.

18 years ago[project @ 2005-05-18 12:06:51 by simonmar]
simonmar [Wed, 18 May 2005 12:06:51 +0000 (12:06 +0000)]
[project @ 2005-05-18 12:06:51 by simonmar]
revert rev. 1.71

18 years ago[project @ 2005-05-18 09:43:50 by simonmar]
simonmar [Wed, 18 May 2005 09:43:50 +0000 (09:43 +0000)]
[project @ 2005-05-18 09:43:50 by simonmar]
Fix and hopefully rationalise the #ifdefs for rawSystem/system/runProcess.

18 years ago[project @ 2005-05-18 04:02:39 by wolfgang]
wolfgang [Wed, 18 May 2005 04:02:39 +0000 (04:02 +0000)]
[project @ 2005-05-18 04:02:39 by wolfgang]
Use constructor functions instead of stginit functions on Win32, too.
(stginit functions are still used for profiling)

18 years ago[project @ 2005-05-18 03:54:47 by wolfgang]
wolfgang [Wed, 18 May 2005 03:54:47 +0000 (03:54 +0000)]
[project @ 2005-05-18 03:54:47 by wolfgang]
Make the Windows version of the Linker ignore constructors rather than abort
(just as it does on other platforms)

18 years ago[project @ 2005-05-17 15:03:38 by simonmar]
simonmar [Tue, 17 May 2005 15:03:38 +0000 (15:03 +0000)]
[project @ 2005-05-17 15:03:38 by simonmar]
more import fixing

18 years ago[project @ 2005-05-17 14:55:46 by simonmar]
simonmar [Tue, 17 May 2005 14:55:46 +0000 (14:55 +0000)]
[project @ 2005-05-17 14:55:46 by simonmar]
import fix

18 years ago[project @ 2005-05-17 13:47:39 by simonmar]
simonmar [Tue, 17 May 2005 13:47:39 +0000 (13:47 +0000)]
[project @ 2005-05-17 13:47:39 by simonmar]
closureDescription: remove duplicate module name for external names,
and include the unique for local names.  This makes profiling with -hd
more uesful.

18 years ago[project @ 2005-05-17 13:06:15 by simonmar]
simonmar [Tue, 17 May 2005 13:06:15 +0000 (13:06 +0000)]
[project @ 2005-05-17 13:06:15 by simonmar]
remove duplicate export

18 years ago[project @ 2005-05-17 13:05:45 by simonmar]
simonmar [Tue, 17 May 2005 13:05:45 +0000 (13:05 +0000)]
[project @ 2005-05-17 13:05:45 by simonmar]
Add showSDocDump

18 years ago[project @ 2005-05-17 12:34:13 by simonmar]
simonmar [Tue, 17 May 2005 12:34:13 +0000 (12:34 +0000)]
[project @ 2005-05-17 12:34:13 by simonmar]
Build thr_debug by default

18 years ago[project @ 2005-05-17 12:22:37 by simonmar]
simonmar [Tue, 17 May 2005 12:22:37 +0000 (12:22 +0000)]
[project @ 2005-05-17 12:22:37 by simonmar]
Profiling: the type_descr and closure_descr were the wrong way around,
so +RTS -hy behaves like +RTS -hd, and vice-versa.  How on earth that
happened I have no idea.

18 years ago[project @ 2005-05-17 12:00:04 by simonmar]
simonmar [Tue, 17 May 2005 12:00:04 +0000 (12:00 +0000)]
[project @ 2005-05-17 12:00:04 by simonmar]
Improve source locations on error messages from the downsweep.  We now
keep track of SrcSpans from import declarations, so we can report a
proper source location for unknown imports (this improves on the
previous hacky solution of keeping track of the filename that
contained the original import declaration).

ModSummary now contains (Located Module) for each import instead of Module.

18 years ago[project @ 2005-05-17 11:01:59 by simonmar]
simonmar [Tue, 17 May 2005 11:02:00 +0000 (11:02 +0000)]
[project @ 2005-05-17 11:01:59 by simonmar]
Further tweaks to the filename handling.

18 years ago[project @ 2005-05-17 10:51:04 by simonmar]
simonmar [Tue, 17 May 2005 10:51:05 +0000 (10:51 +0000)]
[project @ 2005-05-17 10:51:04 by simonmar]
Rationalise the filename handling in a few places, taking some bits
from the defunct System.FilePath library.  Also fixes a bug I recently
introduced in replaceFilenameDirectory.

18 years ago[project @ 2005-05-17 09:48:27 by krasimir]
krasimir [Tue, 17 May 2005 09:48:27 +0000 (09:48 +0000)]
[project @ 2005-05-17 09:48:27 by krasimir]
Use runProcess instead of system if the former is available and we would like
to redirect stdout of the new process. system is unsafe if you have spaces
in the file path or you have / instead of \ on Windows.

18 years ago[project @ 2005-05-17 09:46:22 by simonmar]
simonmar [Tue, 17 May 2005 09:46:22 +0000 (09:46 +0000)]
[project @ 2005-05-17 09:46:22 by simonmar]
replaceFilenameSuffix: fix

18 years ago[project @ 2005-05-17 09:40:51 by simonmar]
simonmar [Tue, 17 May 2005 09:40:51 +0000 (09:40 +0000)]
[project @ 2005-05-17 09:40:51 by simonmar]
Add modInfoInstances

18 years ago[project @ 2005-05-17 09:21:53 by simonmar]
simonmar [Tue, 17 May 2005 09:21:53 +0000 (09:21 +0000)]
[project @ 2005-05-17 09:21:53 by simonmar]
More commentary

18 years ago[project @ 2005-05-17 08:48:28 by simonmar]
simonmar [Tue, 17 May 2005 08:48:28 +0000 (08:48 +0000)]
[project @ 2005-05-17 08:48:28 by simonmar]
expand comment

18 years ago[project @ 2005-05-17 07:49:47 by simonmar]
simonmar [Tue, 17 May 2005 07:49:47 +0000 (07:49 +0000)]
[project @ 2005-05-17 07:49:47 by simonmar]
Bugfix to previous commit: filenames without an extension are assumed
to be a haskell source filenames with the extension removed (eg. ghc
--make hello should compile hello.hs).

18 years ago[project @ 2005-05-17 07:48:20 by simonmar]
simonmar [Tue, 17 May 2005 07:48:20 +0000 (07:48 +0000)]
[project @ 2005-05-17 07:48:20 by simonmar]
small cleanup: use joinFileExt

18 years ago[project @ 2005-05-16 14:40:06 by simonmar]
simonmar [Mon, 16 May 2005 14:40:06 +0000 (14:40 +0000)]
[project @ 2005-05-16 14:40:06 by simonmar]
document +RTS -I

18 years ago[project @ 2005-05-16 14:39:54 by simonmar]
simonmar [Mon, 16 May 2005 14:39:54 +0000 (14:39 +0000)]
[project @ 2005-05-16 14:39:54 by simonmar]
Set BINDIST_DOC_WAYS appropriately depending on which doc-building
tools are available.  The default is to build all of html, ps & pdf if
possible.

18 years ago[project @ 2005-05-16 14:27:07 by simonmar]
simonmar [Mon, 16 May 2005 14:27:08 +0000 (14:27 +0000)]
[project @ 2005-05-16 14:27:07 by simonmar]
Allow the amount of idle time which must pass before we force a major
GC to be configured at runtime with the +RTS -I<secs> option.

The idle GC only happens in the threaded RTS, and it is useful because
it can make finalizers run more promptly, and also detect cases of
deadlock.  Without the idle GC, Haskell computation must be taking
place in order for finalizers to run or deadlock to be detected, and
the only way some Haskell computation can take place is usually by
in-calls.

+RTS -I0 turns off the idle GC, the default is +RTS -I0.3.

We might need to add more tuning if it turns out that the idle GC is
problematic, for example we don't check how long the GC actually took,
and we should probably back off if major GCs are taking too long and
adversely affecting interactive responsiveness.

18 years ago[project @ 2005-05-16 13:47:57 by simonmar]
simonmar [Mon, 16 May 2005 13:47:58 +0000 (13:47 +0000)]
[project @ 2005-05-16 13:47:57 by simonmar]
Implement -x <suffix> flag to override the suffix of a filename for
the purposes of determinig how it should be compiled.  The usage is
similar to gcc, except that we just use a suffix rather than a name
for the language. eg.

   ghc -c -x hs hello.blah

will pretend hello.blah is a .hs file.  Another possible use is -x
hspp, which skips preprocessing.

This works for one-shot compilation, --make, GHCi, and ghc -e.  The
original idea was to make it possible to use runghc on a file that
doesn't end in .hs, so changes to runghc will follow.

Also, I made it possible to specify .c files and other kinds of files
on the --make command line; these will be compiled to objects as
normal and linked into the final executable.

GHC API change: I had to extend the Target type to include an optional
start phase, and also GHC.guessTarget now takes a (Maybe Phase) argument.

I thought this would be half an hour, in fact it took half a day, and
I still haven't documented it.  Sigh.

18 years ago[project @ 2005-05-16 13:21:11 by krasimir]
krasimir [Mon, 16 May 2005 13:21:11 +0000 (13:21 +0000)]
[project @ 2005-05-16 13:21:11 by krasimir]
added modInfoIsExportedName & modInfoLookupName functions

18 years ago[project @ 2005-05-16 12:40:14 by simonpj]
simonpj [Mon, 16 May 2005 12:40:14 +0000 (12:40 +0000)]
[project @ 2005-05-16 12:40:14 by simonpj]
Better debug-printing for -ddump-inlinings

18 years ago[project @ 2005-05-16 12:39:55 by simonpj]
simonpj [Mon, 16 May 2005 12:39:55 +0000 (12:39 +0000)]
[project @ 2005-05-16 12:39:55 by simonpj]
Dont print result type for Core case-expressions (too voluminous)

18 years ago[project @ 2005-05-16 12:39:15 by simonpj]
simonpj [Mon, 16 May 2005 12:39:15 +0000 (12:39 +0000)]
[project @ 2005-05-16 12:39:15 by simonpj]
Add assertions (only)

18 years ago[project @ 2005-05-16 12:38:38 by simonpj]
simonpj [Mon, 16 May 2005 12:38:38 +0000 (12:38 +0000)]
[project @ 2005-05-16 12:38:38 by simonpj]
Newtype representation

Merge to STABLE

This commit fixes a long-standing bug (simple clerical error) in mkNewTyConRep,
which for some reason had gone un-discovered for years.

tc183 tests it.