ghc-hetmet.git
19 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

19 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.

19 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.

19 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

19 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

19 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.

19 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

19 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

19 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)

19 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

19 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

19 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

19 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.

19 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

19 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

19 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

19 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.

19 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.

19 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

19 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.

19 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

19 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'

19 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)

19 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".

19 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

19 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

19 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

19 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!).

19 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)

19 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.

19 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)

19 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"

19 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... :-]

19 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.

19 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.

19 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

19 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

19 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

19 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

19 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.

19 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

19 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).

19 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.

19 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

19 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.

19 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"

19 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

19 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.

19 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.

19 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

19 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)

19 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

19 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

19 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.

19 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

19 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.

19 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)

19 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)

19 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

19 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

19 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.

19 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

19 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

19 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

19 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.

19 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.

19 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.

19 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.

19 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.

19 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

19 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

19 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

19 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

19 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).

19 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

19 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

19 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.

19 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.

19 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.

19 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

19 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

19 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)

19 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)

19 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.

19 years ago[project @ 2005-05-16 09:24:53 by simonmar]
simonmar [Mon, 16 May 2005 09:24:53 +0000 (09:24 +0000)]
[project @ 2005-05-16 09:24:53 by simonmar]
- re-initalise cap on returning from STG land, because we might now
  have a different capability.  ToDo: we should pass it back somehow,
  rather than looking it up in the hash table

- export unblockOneLocked (we'll need this later)

19 years ago[project @ 2005-05-15 03:20:29 by wolfgang]
wolfgang [Sun, 15 May 2005 03:20:29 +0000 (03:20 +0000)]
[project @ 2005-05-15 03:20:29 by wolfgang]
Reinstate __stginit_Foo functions even when they don't do anything, because
they are part of the documented interface (as discussed on cvs-ghc, Apr 26).

19 years ago[project @ 2005-05-15 02:46:27 by wolfgang]
wolfgang [Sun, 15 May 2005 02:46:27 +0000 (02:46 +0000)]
[project @ 2005-05-15 02:46:27 by wolfgang]
Clean up things by making PicBaseReg a constructor of GlobalReg instead
of CmmExpr.

19 years ago[project @ 2005-05-14 13:34:11 by panne]
panne [Sat, 14 May 2005 13:34:11 +0000 (13:34 +0000)]
[project @ 2005-05-14 13:34:11 by panne]
Include Cabal documentation in the RPM

19 years ago[project @ 2005-05-14 09:59:32 by panne]
panne [Sat, 14 May 2005 09:59:32 +0000 (09:59 +0000)]
[project @ 2005-05-14 09:59:32 by panne]
Fixed previous commit

19 years ago[project @ 2005-05-13 15:06:13 by krasimir]
krasimir [Fri, 13 May 2005 15:06:13 +0000 (15:06 +0000)]
[project @ 2005-05-13 15:06:13 by krasimir]
replace emptyNodeMap with old_summary_map.

19 years ago[project @ 2005-05-13 14:28:59 by simonmar]
simonmar [Fri, 13 May 2005 14:28:59 +0000 (14:28 +0000)]
[project @ 2005-05-13 14:28:59 by simonmar]
gcc 4.0.0 fix: don't declare static total_prof_ticks as extern

19 years ago[project @ 2005-05-13 14:27:56 by simonmar]
simonmar [Fri, 13 May 2005 14:27:56 +0000 (14:27 +0000)]
[project @ 2005-05-13 14:27:56 by simonmar]
gcc 4.0.0 fix: don't declare static static_objects as extern

19 years ago[project @ 2005-05-13 14:27:09 by simonmar]
simonmar [Fri, 13 May 2005 14:27:09 +0000 (14:27 +0000)]
[project @ 2005-05-13 14:27:09 by simonmar]
gcc 4.0.0 fix: avoid casted expression as lvalue

19 years ago[project @ 2005-05-13 10:59:28 by simonmar]
simonmar [Fri, 13 May 2005 10:59:28 +0000 (10:59 +0000)]
[project @ 2005-05-13 10:59:28 by simonmar]
Add undocumented :check command, for testing GHC.checkModule

19 years ago[project @ 2005-05-13 10:58:10 by simonmar]
simonmar [Fri, 13 May 2005 10:58:10 +0000 (10:58 +0000)]
[project @ 2005-05-13 10:58:10 by simonmar]
Add debug_s way

19 years ago[project @ 2005-05-13 10:18:35 by simonmar]
simonmar [Fri, 13 May 2005 10:18:35 +0000 (10:18 +0000)]
[project @ 2005-05-13 10:18:35 by simonmar]
Export nameModule

19 years ago[project @ 2005-05-13 10:05:32 by krasimir]
krasimir [Fri, 13 May 2005 10:05:33 +0000 (10:05 +0000)]
[project @ 2005-05-13 10:05:32 by krasimir]
Fixed install-docs

19 years ago[project @ 2005-05-13 09:39:00 by simonmar]
simonmar [Fri, 13 May 2005 09:39:00 +0000 (09:39 +0000)]
[project @ 2005-05-13 09:39:00 by simonmar]
summariseFile: use a cached summary if one is available.  Previously
we always preprocessed modules named by filename on each reload.

19 years ago[project @ 2005-05-13 01:46:20 by dons]
dons [Fri, 13 May 2005 01:46:20 +0000 (01:46 +0000)]
[project @ 2005-05-13 01:46:20 by dons]
Have SplitObjs=YES by default only on i386, powerpc and sparc.
Lowers the barrier to porting just a little.

19 years ago[project @ 2005-05-12 16:51:03 by simonpj]
simonpj [Thu, 12 May 2005 16:51:03 +0000 (16:51 +0000)]
[project @ 2005-05-12 16:51:03 by simonpj]
Fix bad interaction between operators and higher-rank types
Fixes Source bug #1200592 [GHC fails to pass dictionary in a rank-2 situation]

Merge to STABLE