ghc-hetmet.git
21 years ago[project @ 2002-09-06 14:34:13 by simonmar]
simonmar [Fri, 6 Sep 2002 14:34:15 +0000 (14:34 +0000)]
[project @ 2002-09-06 14:34:13 by simonmar]
Partial rewrite of the POSIX library.

The main purpose of this sweep is to remove the last dependencies of
the compiler on hslibs.  When I've committed the associated compiler
changes, only the 'base' package will be required to bootstrap the
compiler.  Additionally to build GHCi, the 'readline' and 'unix'
packages will be required.

The new POSIX library lives mostly in libraries/unix, with a few bits
required for compiler bootstrapping in libraries/base.  The 'base'
package is mostly free of hsc2hs code to make bootstrapping from HC
files easier, but the 'unix' package will use hsc2hs liberally.

The old POSIX library continues to provide more-or-less the same
interface as before, although some of the types are more correct now
(previously lots of POSIX types were just mapped to Int).  The new
interface is largely the same as the old, except that some new
functionality from the latest POSIX spec has been added (eg. symbolic
links).

So far, the new POSIX library has signal support, directory/file
operations and lots of stuff from unistd.h.  The module names are:

  System.Posix
The main dude, exports everything

  System.Posix.Types
All the POSIX types, using the same naming scheme as
        Foreign.C.Types, Eg. CUid, COff, etc.  Many of these types
        were previously exported by GHC.Posix.

        Additionally exports the "nicer" names used by the old POSIX
library for compatibility (eg. ProcessID == CPid, FileMode ==
CMode, etc.)

All reasonable instances are derived for these types.

  System.Posix.Signals
Signal support, contains most of which was in PosixProcPrim before.
The RTS interface to the signal handling support has been
rationalised slightly.

  System.Posix.Directory
  Directory support, most were in PosixFiles before.

  System.Posix.Files
File operations, most were in PosixFiles before.

  System.Posix.Unistd
(for want of a better name) Miscellaneous bits that mostly come
from the unistd.h header file.  PosixProcEnv before.

The rest of the library should pan out like so:

  System.Posix.IO
  System.Posix.Error   (maybe)
  System.Posix.Process
  System.Posix.Terminal

(I've no doubt broken Win32 support, but I'm checking the build at the moment).

21 years ago[project @ 2002-09-06 14:00:25 by simonmar]
simonmar [Fri, 6 Sep 2002 14:00:25 +0000 (14:00 +0000)]
[project @ 2002-09-06 14:00:25 by simonmar]
Remove ForeignObj and ForeignPtr keys

21 years ago[project @ 2002-09-06 13:58:58 by simonmar]
simonmar [Fri, 6 Sep 2002 13:58:58 +0000 (13:58 +0000)]
[project @ 2002-09-06 13:58:58 by simonmar]
Remove foreignPtrTyCon and foreignObjTyCon

21 years ago[project @ 2002-09-06 13:52:21 by simonmar]
simonmar [Fri, 6 Sep 2002 13:52:21 +0000 (13:52 +0000)]
[project @ 2002-09-06 13:52:21 by simonmar]
Disallow ForeignPtr as an FFI argument type.

21 years ago[project @ 2002-09-06 13:51:38 by simonmar]
simonmar [Fri, 6 Sep 2002 13:51:38 +0000 (13:51 +0000)]
[project @ 2002-09-06 13:51:38 by simonmar]
Disallow 'ForeignPtr' as an FFI argument type.  It has been deprecated
for some time (withForeignPtr is the approved way to pass a
ForeignPtr).  The changes I'm about to make to ForeignPtr will stop it
working anyhow.

21 years ago[project @ 2002-09-06 09:56:12 by simonmar]
simonmar [Fri, 6 Sep 2002 09:56:12 +0000 (09:56 +0000)]
[project @ 2002-09-06 09:56:12 by simonmar]
Selector Thunk Fix, take II.

The previous version didn't deal well with selector thunks which point
to more selector thunks, and on closer inspection the method was
flawed.  Now I've introduced a function

StgClosure *eval_selector_thunk( int field, StgClosure * )

which evaluates a selector thunk returning its value, in from-space,
if possible.  It blackholes the thunk during evaluation.  It might
recursively evaluate more selector thunks, but it does this in a
bounded way and updates the thunks with indirections (NOT forwarding
pointers) after evaluation.

This cleans things up somewhat, and I believe it deals properly with
both types of selector-thunk loops that arise.

MERGE TO STABLE

21 years ago[project @ 2002-09-06 01:00:04 by ken]
ken [Fri, 6 Sep 2002 01:00:04 +0000 (01:00 +0000)]
[project @ 2002-09-06 01:00:04 by ken]
perl made uglier to work around the perl 5.7/5.8 bug documented at
http://bugs6.perl.org/rt2/Ticket/Display.html?id=1760 and illustrated
by the seg fault of perl -e '("x\n" x 5000) =~ /(.*\n)+/'

MERGE TO STABLE

21 years ago[project @ 2002-09-05 16:26:33 by simonmar]
simonmar [Thu, 5 Sep 2002 16:26:33 +0000 (16:26 +0000)]
[project @ 2002-09-05 16:26:33 by simonmar]
Fix for infinite loop when there is a THUNK_SELECTOR which eventually
refers to itself, such as might be generated by code like

let x = (fst x, snd x) in ...

At the same time, I re-enabled the code to traverse multiple selector
thunks with bounded depth, because I believe it now works.

MERGE TO STABLE (but test thoroughly in the HEAD first, this is
fragile stuff)

21 years ago[project @ 2002-09-05 10:25:01 by simonmar]
simonmar [Thu, 5 Sep 2002 10:25:01 +0000 (10:25 +0000)]
[project @ 2002-09-05 10:25:01 by simonmar]
In code style, print negative floating point literals in parentheses
to avoid interacting with surrounding syntax.

Fixes SourceForge bug #604849

MERGE TO STABLE

21 years ago[project @ 2002-09-05 08:58:55 by simonmar]
simonmar [Thu, 5 Sep 2002 08:58:56 +0000 (08:58 +0000)]
[project @ 2002-09-05 08:58:55 by simonmar]
Remove RtsAPIDeprec.c, since this is causing grief.  The upshot (I
think) is that you won't be able to do foreign import "wrapper" with
an Addr in the type.

21 years ago[project @ 2002-09-04 11:19:48 by simonmar]
simonmar [Wed, 4 Sep 2002 11:19:48 +0000 (11:19 +0000)]
[project @ 2002-09-04 11:19:48 by simonmar]
Disallow 'foreign import stdcall "wrapper"' when compiling via the
NCG.

MERGE TO STABLE

21 years ago[project @ 2002-09-04 11:06:19 by simonmar]
simonmar [Wed, 4 Sep 2002 11:06:19 +0000 (11:06 +0000)]
[project @ 2002-09-04 11:06:19 by simonmar]
Import fixups

21 years ago[project @ 2002-09-04 11:04:45 by simonmar]
simonmar [Wed, 4 Sep 2002 11:04:45 +0000 (11:04 +0000)]
[project @ 2002-09-04 11:04:45 by simonmar]
Exception => Control.Exception

21 years ago[project @ 2002-09-04 10:00:45 by simonmar]
simonmar [Wed, 4 Sep 2002 10:00:46 +0000 (10:00 +0000)]
[project @ 2002-09-04 10:00:45 by simonmar]
Recent changes to simplify PrimRep had introduced a bug: the heap
check code was assuming that anything with PtrRep representation was
enterable.  This isn't the case for the unpointed primitive types
(eg. ByteArray#), resulting in the ARR_WORDS crash in last night's
build.

This bug isn't in STABLE.

21 years ago[project @ 2002-09-03 15:34:11 by simonmar]
simonmar [Tue, 3 Sep 2002 15:34:11 +0000 (15:34 +0000)]
[project @ 2002-09-03 15:34:11 by simonmar]
Exception => Control.Exception
GlaExts => GHC.Exts

21 years ago[project @ 2002-09-03 15:32:16 by simonmar]
simonmar [Tue, 3 Sep 2002 15:33:10 +0000 (15:33 +0000)]
[project @ 2002-09-03 15:32:16 by simonmar]
GlaExts => GHC.Exts

21 years ago[project @ 2002-09-03 15:14:54 by simonmar]
simonmar [Tue, 3 Sep 2002 15:14:54 +0000 (15:14 +0000)]
[project @ 2002-09-03 15:14:54 by simonmar]
GlaExts => GLAEXTS

21 years ago[project @ 2002-09-03 14:39:06 by simonmar]
simonmar [Tue, 3 Sep 2002 14:39:06 +0000 (14:39 +0000)]
[project @ 2002-09-03 14:39:06 by simonmar]
Just hit a problem caused by gcc 3.1+: it uses instructions like

movl %esi, 4(%esp)

in the prologue, which the mangler wasn't expecting.  This might fix
problems that other people have been seeing with gcc 3.1 on x86.

MERGE TO STABLE

21 years ago[project @ 2002-09-03 14:07:03 by simonmar]
simonmar [Tue, 3 Sep 2002 14:07:03 +0000 (14:07 +0000)]
[project @ 2002-09-03 14:07:03 by simonmar]
stg_sig_install: restore the old signal mask at the end, rather than
unconditionally unblocking the signal we just installed the handler for.

21 years ago[project @ 2002-09-03 11:27:33 by simonpj]
simonpj [Tue, 3 Sep 2002 11:27:33 +0000 (11:27 +0000)]
[project @ 2002-09-03 11:27:33 by simonpj]
More comments

21 years ago[project @ 2002-09-02 16:39:19 by simonpj]
simonpj [Mon, 2 Sep 2002 16:39:19 +0000 (16:39 +0000)]
[project @ 2002-09-02 16:39:19 by simonpj]
Wibble in demand analyser; no need to merge

21 years ago[project @ 2002-09-02 16:38:24 by simonpj]
simonpj [Mon, 2 Sep 2002 16:38:24 +0000 (16:38 +0000)]
[project @ 2002-09-02 16:38:24 by simonpj]
Fix an obscure bug in an optimisation for 'coerce' which
wasn't taking account of the possiblity of type arguments.

MERGE TO STABLE

21 years ago[project @ 2002-09-02 16:37:13 by simonpj]
simonpj [Mon, 2 Sep 2002 16:37:13 +0000 (16:37 +0000)]
[project @ 2002-09-02 16:37:13 by simonpj]
Fix an obscure bug in the creation of default methods for class
ops with higher-rank type.   See the comments with
TcClassDcl.mkDefMethRhs

Test is should_compile/tc161

MERGE TO STABLE

21 years ago[project @ 2002-09-02 16:31:34 by simonpj]
simonpj [Mon, 2 Sep 2002 16:31:34 +0000 (16:31 +0000)]
[project @ 2002-09-02 16:31:34 by simonpj]
Do not specialise functions that take implicit parameters.
The specialisation mechanism doesn't work for them, because
their implicit args are not driven by their type args (unlike
the implicit dictionary parameters)

MERGE TO STABLE

21 years ago[project @ 2002-09-02 13:06:30 by simonmar]
simonmar [Mon, 2 Sep 2002 13:06:30 +0000 (13:06 +0000)]
[project @ 2002-09-02 13:06:30 by simonmar]
revert part of previous commit; looks like it was accidental

21 years ago[project @ 2002-09-01 00:34:21 by mthomas]
mthomas [Sun, 1 Sep 2002 00:34:21 +0000 (00:34 +0000)]
[project @ 2002-09-01 00:34:21 by mthomas]
Foreign does not export C.String so CString and peekCString are undefined.

21 years ago[project @ 2002-08-30 15:17:00 by simonpj]
simonpj [Fri, 30 Aug 2002 15:17:00 +0000 (15:17 +0000)]
[project @ 2002-08-30 15:17:00 by simonpj]
Add notes about linear implicit parameters

21 years ago[project @ 2002-08-30 12:21:16 by simonmar]
simonmar [Fri, 30 Aug 2002 12:21:16 +0000 (12:21 +0000)]
[project @ 2002-08-30 12:21:16 by simonmar]
oops, 'make Foo.s' in ghc/rts was completely busted

MERGE TO STABLE

21 years ago[project @ 2002-08-30 09:14:02 by simonmar]
simonmar [Fri, 30 Aug 2002 09:14:02 +0000 (09:14 +0000)]
[project @ 2002-08-30 09:14:02 by simonmar]
Remove unused import of PrelPack (should fix the build again)

21 years ago[project @ 2002-08-29 15:44:11 by simonmar]
simonmar [Thu, 29 Aug 2002 15:44:23 +0000 (15:44 +0000)]
[project @ 2002-08-29 15:44:11 by simonmar]
Housekeeping:

  - The main goal is to remove dependencies on hslibs for a
    bootstrapped compiler, leaving only a requirement that the
    packages base, haskell98 and readline are built in stage 1 in
    order to bootstrap.  We're almost there: Posix is still required
    for signal handling, but all other dependencies on hslibs are now
    gone.

    Uses of Addr and ByteArray/MutableByteArray array are all gone
    from the compiler.  PrimPacked defines the Ptr type for GHC 4.08
    (which didn't have it), and it defines simple BA and MBA types to
    replace uses of ByteArray and MutableByteArray respectively.

  - Clean up import lists.  HsVersions.h now defines macros for some
    modules which have moved between GHC versions.  eg. one now
    imports 'GLAEXTS' to get at unboxed types and primops in the
    compiler.

    Many import lists have been sorted as per the recommendations in
    the new style guidelines in the commentary.

I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and
itself, and everything still works here.  Doubtless I've got something
wrong, though.

21 years ago[project @ 2002-08-29 13:38:45 by simonpj]
simonpj [Thu, 29 Aug 2002 13:38:45 +0000 (13:38 +0000)]
[project @ 2002-08-29 13:38:45 by simonpj]
Fix eta-expansion bug, which led to an infinite loop in
CoreUtils.etaExpand. This showed up when compiling FranTk.

MERGE TO STABLE

21 years ago[project @ 2002-08-29 12:57:34 by simonmar]
simonmar [Thu, 29 Aug 2002 12:57:34 +0000 (12:57 +0000)]
[project @ 2002-08-29 12:57:34 by simonmar]
Add notes about DEBUG and GHCI.

21 years ago[project @ 2002-08-29 11:52:42 by simonmar]
simonmar [Thu, 29 Aug 2002 11:52:42 +0000 (11:52 +0000)]
[project @ 2002-08-29 11:52:42 by simonmar]
update (readline has moved)

21 years ago[project @ 2002-08-29 11:47:46 by simonmar]
simonmar [Thu, 29 Aug 2002 11:47:46 +0000 (11:47 +0000)]
[project @ 2002-08-29 11:47:46 by simonmar]
Add a ToDo note.

21 years ago[project @ 2002-08-28 19:28:02 by ken]
ken [Wed, 28 Aug 2002 19:28:02 +0000 (19:28 +0000)]
[project @ 2002-08-28 19:28:02 by ken]
Further mangler changes to get ghc working with gcc 3.04 on the Alpha.
Jeff Lewis: "The compiler was sometimes emitting the $..ng label for a symbol
before the regular label.  This really confused the mangler, and it completely
scrambled the file."

21 years ago[project @ 2002-08-28 16:02:51 by simonmar]
simonmar [Wed, 28 Aug 2002 16:02:52 +0000 (16:02 +0000)]
[project @ 2002-08-28 16:02:51 by simonmar]
Add the beginnings of the "Coding Style Guidelines" for ghc/compiler.

21 years ago[project @ 2002-08-28 13:02:51 by simonmar]
simonmar [Wed, 28 Aug 2002 13:02:51 +0000 (13:02 +0000)]
[project @ 2002-08-28 13:02:51 by simonmar]
Remove duplicate sched_belch() call from raiseAsync().

21 years ago[project @ 2002-08-28 11:29:42 by simonpj]
simonpj [Wed, 28 Aug 2002 11:29:42 +0000 (11:29 +0000)]
[project @ 2002-08-28 11:29:42 by simonpj]
Add notes about data types

21 years ago[project @ 2002-08-28 09:24:15 by simonmar]
simonmar [Wed, 28 Aug 2002 09:24:15 +0000 (09:24 +0000)]
[project @ 2002-08-28 09:24:15 by simonmar]
Fix braino in previous commit

MERGE TO STABLE

21 years ago[project @ 2002-08-27 09:38:43 by simonmar]
simonmar [Tue, 27 Aug 2002 09:38:43 +0000 (09:38 +0000)]
[project @ 2002-08-27 09:38:43 by simonmar]
- If the same module is defined in multiple "root" source files, then
  complain.  Before, the compiler would silently ignore one of them.

- Remove some unuseed imports

MERGE TO STABLE

21 years ago[project @ 2002-08-27 09:34:20 by simonmar]
simonmar [Tue, 27 Aug 2002 09:34:20 +0000 (09:34 +0000)]
[project @ 2002-08-27 09:34:20 by simonmar]
Fix a bug in the cleaning up of temporary files: we were wrongly
cleaning the temporary pre-processed source files for stable modules,
with the result that the compiler would panic the next time they were
required.

Reported ages ago by: Hal Duame.

MERGE TO STABLE

21 years ago[project @ 2002-08-27 09:12:53 by simonmar]
simonmar [Tue, 27 Aug 2002 09:12:53 +0000 (09:12 +0000)]
[project @ 2002-08-27 09:12:53 by simonmar]
Replace "Funny global thing" with a better error message, as suggested
by Alastair Reid.  The message is:

  Warning: retaining unknown function `$_' in output from C compiler

("unknown function" is a bit vague, but I couldn't come up with an
alternative that wasn't misleading).

21 years ago[project @ 2002-08-23 20:59:29 by sof]
sof [Fri, 23 Aug 2002 20:59:29 +0000 (20:59 +0000)]
[project @ 2002-08-23 20:59:29 by sof]
bring write() proto into scope

21 years ago[project @ 2002-08-21 22:06:02 by ken]
ken [Wed, 21 Aug 2002 22:06:03 +0000 (22:06 +0000)]
[project @ 2002-08-21 22:06:02 by ken]
Use __DISCARD__ to prevent overly aggressive optimization by certain
gcc versions on the Alpha.  Thanks to Jeffrey Lewis!

21 years ago[project @ 2002-08-21 16:02:58 by simonmar]
simonmar [Wed, 21 Aug 2002 16:02:58 +0000 (16:02 +0000)]
[project @ 2002-08-21 16:02:58 by simonmar]
Add link to Mark Jones' paper on functional dependencies, in lieu of
real documentation.

21 years ago[project @ 2002-08-21 12:58:56 by simonmar]
simonmar [Wed, 21 Aug 2002 12:58:56 +0000 (12:58 +0000)]
[project @ 2002-08-21 12:58:56 by simonmar]
fromInt ==> fromIntegral

21 years ago[project @ 2002-08-21 10:44:26 by simonmar]
simonmar [Wed, 21 Aug 2002 10:44:26 +0000 (10:44 +0000)]
[project @ 2002-08-21 10:44:26 by simonmar]
Oops, string literals were using mkFastStringNarrow instead of
mkFastString, with the result that characters >= 256 were being
truncated modulo 256.

MERGE TO STABLE

21 years ago[project @ 2002-08-20 10:32:48 by simonmar]
simonmar [Tue, 20 Aug 2002 10:32:48 +0000 (10:32 +0000)]
[project @ 2002-08-20 10:32:48 by simonmar]
Fix a buglet in CorePrep:  an expression such as

case __coerce (\x -> e) :: T of { ... }

would be left as is, but the lambda expression should really be
abstracted as a let (causes a panic later in srtExpr; shown up by
the dynamic001 test).  There was a missing call to deLam in the case
for Case expressions in corePrepExprFloat.

In addition, I made a new version of deLam, deLamFloat, which can
float any bindings generated.  This helps to generate slightly cleaner
code in the above case (the binding is floated out of the scrutinee).

Also: GC unused imports while I'm here.

21 years ago[project @ 2002-08-19 16:02:26 by simonmar]
simonmar [Mon, 19 Aug 2002 16:02:26 +0000 (16:02 +0000)]
[project @ 2002-08-19 16:02:26 by simonmar]
Protect against divide by zero when there have been zero major GCs in
the one-line stats mode.

21 years ago[project @ 2002-08-19 08:38:36 by simonmar]
simonmar [Mon, 19 Aug 2002 08:38:36 +0000 (08:38 +0000)]
[project @ 2002-08-19 08:38:36 by simonmar]
oops, rts_n_free_capabilities is used in an inline function.

21 years ago[project @ 2002-08-16 14:30:21 by simonmar]
simonmar [Fri, 16 Aug 2002 14:30:21 +0000 (14:30 +0000)]
[project @ 2002-08-16 14:30:21 by simonmar]
Use an stg_ap_2 thunk rather than an AP_UPD in rts_apply().  Saves one
word per rts_apply(), and a little time too.

21 years ago[project @ 2002-08-16 13:29:05 by simonmar]
simonmar [Fri, 16 Aug 2002 13:29:07 +0000 (13:29 +0000)]
[project @ 2002-08-16 13:29:05 by simonmar]
Global and common variable sweep: staticize many variables that don't
need to be globally visible.

21 years ago[project @ 2002-08-16 13:28:22 by simonmar]
simonmar [Fri, 16 Aug 2002 13:28:22 +0000 (13:28 +0000)]
[project @ 2002-08-16 13:28:22 by simonmar]
Re-order the checks in HP_STK_CHK and HP_STK_CHK_NP: if the stack
check failed before the heap check, then we would get bogus allocation
results.

21 years ago[project @ 2002-08-16 13:20:36 by simonmar]
simonmar [Fri, 16 Aug 2002 13:20:36 +0000 (13:20 +0000)]
[project @ 2002-08-16 13:20:36 by simonmar]
large_alloc_list seems to be a fossil; remove it

21 years ago[project @ 2002-08-16 09:36:36 by simonmar]
simonmar [Fri, 16 Aug 2002 09:36:36 +0000 (09:36 +0000)]
[project @ 2002-08-16 09:36:36 by simonmar]
Be a bit clearer about the current directory when GHCi is started, and
mention that you might have to ':cd' to the right place before you can
load something.

21 years ago[project @ 2002-08-14 14:06:25 by sof]
sof [Wed, 14 Aug 2002 14:06:25 +0000 (14:06 +0000)]
[project @ 2002-08-14 14:06:25 by sof]
If booting unregisterised, add -DNO_REGS -DUSE_MINIINTERPRETER
to PLATFORM_HC_BOOT_CC_OPTS

21 years ago[project @ 2002-08-13 10:13:40 by simonmar]
simonmar [Tue, 13 Aug 2002 10:13:40 +0000 (10:13 +0000)]
[project @ 2002-08-13 10:13:40 by simonmar]
Update docs about not using Float.

21 years ago[project @ 2002-08-12 14:40:25 by sof]
sof [Mon, 12 Aug 2002 14:40:25 +0000 (14:40 +0000)]
[project @ 2002-08-12 14:40:25 by sof]
HC_BOOT_LD_OPTS:
  - if needed, include ghc/rts/gmp on -L list.
  - sync -u list wrt ghc/rts/rts.conf.in

21 years ago[project @ 2002-08-09 22:16:03 by sof]
sof [Fri, 9 Aug 2002 22:16:03 +0000 (22:16 +0000)]
[project @ 2002-08-09 22:16:03 by sof]
oops, YES is NO

21 years ago[project @ 2002-08-09 22:13:51 by sof]
sof [Fri, 9 Aug 2002 22:13:51 +0000 (22:13 +0000)]
[project @ 2002-08-09 22:13:51 by sof]
UseGhcForCc: don't use "ifneq" to control its setting; too strict.
Resort to a $(shell ..) hack.

21 years ago[project @ 2002-08-09 21:28:09 by sof]
sof [Fri, 9 Aug 2002 21:28:10 +0000 (21:28 +0000)]
[project @ 2002-08-09 21:28:09 by sof]
Added GHC_MANGLER_DIR, GHC_SPLIT_DIR + fix .raw_s -> .s bootstrap suffix rule

21 years ago[project @ 2002-08-09 20:59:41 by sof]
sof [Fri, 9 Aug 2002 20:59:41 +0000 (20:59 +0000)]
[project @ 2002-08-09 20:59:41 by sof]
NON_HS_PKG vs NON_HS_PACKAGE confusion - NON_HS_PACKAGE wins

21 years ago[project @ 2002-08-06 13:43:35 by simonmar]
simonmar [Tue, 6 Aug 2002 13:43:35 +0000 (13:43 +0000)]
[project @ 2002-08-06 13:43:35 by simonmar]
Make this compile, and maybe even work

21 years ago[project @ 2002-08-05 11:11:44 by simonmar]
simonmar [Mon, 5 Aug 2002 11:11:46 +0000 (11:11 +0000)]
[project @ 2002-08-05 11:11:44 by simonmar]
- Update the old coding style document
- Move it to the commentary under the "RTS & libs" section

21 years ago[project @ 2002-08-05 10:11:03 by simonmar]
simonmar [Mon, 5 Aug 2002 10:11:04 +0000 (10:11 +0000)]
[project @ 2002-08-05 10:11:03 by simonmar]
Overhaul the debugging flags.  The old bitfield mechanism was a bit
silly, so now instead of writing -D129 (the one I use most) you can
now write -DSs.  Each debugging option has a single character assigned
to it, documented in the -? help text.

21 years ago[project @ 2002-08-05 09:18:27 by simonmar]
simonmar [Mon, 5 Aug 2002 09:18:27 +0000 (09:18 +0000)]
[project @ 2002-08-05 09:18:27 by simonmar]
We have to turn off the buffering on stdout, stdin & stderr after
every time we revert all CAFs, not just when starting up GHCi.

MERGE TO STABLE

21 years ago[project @ 2002-08-02 13:08:33 by simonmar]
simonmar [Fri, 2 Aug 2002 13:08:35 +0000 (13:08 +0000)]
[project @ 2002-08-02 13:08:33 by simonmar]
PrimRep Cleanup

   - Remove all PrimReps which were just different flavours of
     PtrRep.  Now, everything which is a pointer to a closure of
     some kind is always a PtrRep.

   - Three of the deleted PrimReps, namely ArrayRep, ByteArrayRep,
     and ForeignObj rep, had a subtle reason for their existence:
     the abstract C pretty-printer(!) used them to decide whether
     to apply a shim to an outgoing C-call argument: a ByteArrayRep
     argument would be adjusted to point past the object header,
     for example.

     I've changed this to happen in a much more reasonable and
     obvious way: there are now explict macros in AbsCSyn to do the
     adjustment, and the code generator makes calls to these as
     necessary.  Slightly less hackery is necessary in the NCG as
     a result.

21 years ago[project @ 2002-08-02 12:24:04 by simonmar]
simonmar [Fri, 2 Aug 2002 12:24:04 +0000 (12:24 +0000)]
[project @ 2002-08-02 12:24:04 by simonmar]
Pass -fno-builtin to gcc when compiling .hc files, because this avoids
a common cause of running out of registers when foreign calls to
functions like memcpy(), strlen() are made from Haskell.

MERGE

21 years ago[project @ 2002-08-02 11:17:15 by simonmar]
simonmar [Fri, 2 Aug 2002 11:17:15 +0000 (11:17 +0000)]
[project @ 2002-08-02 11:17:15 by simonmar]
Remove out-of-date comment

21 years ago[project @ 2002-08-02 09:44:26 by simonmar]
simonmar [Fri, 2 Aug 2002 09:44:26 +0000 (09:44 +0000)]
[project @ 2002-08-02 09:44:26 by simonmar]
Mention that --show-iface is needed for viewing interface files.

21 years ago[project @ 2002-08-01 14:34:42 by simonpj]
simonpj [Thu, 1 Aug 2002 14:34:42 +0000 (14:34 +0000)]
[project @ 2002-08-01 14:34:42 by simonpj]
Make the byte-code generator understand about unboxed
tuple returns.  The previous code was just wrong.

This code is better but it is still not *right*, I fear.
Don't merge till we sort this out.

21 years ago[project @ 2002-08-01 14:13:10 by simonpj]
simonpj [Thu, 1 Aug 2002 14:13:11 +0000 (14:13 +0000)]
[project @ 2002-08-01 14:13:10 by simonpj]
Another rebindable-syntax wibble; merge to stable branch

21 years ago[project @ 2002-08-01 12:49:41 by simonpj]
simonpj [Thu, 1 Aug 2002 12:49:41 +0000 (12:49 +0000)]
[project @ 2002-08-01 12:49:41 by simonpj]
Comments only

21 years ago[project @ 2002-08-01 12:49:06 by simonpj]
simonpj [Thu, 1 Aug 2002 12:49:06 +0000 (12:49 +0000)]
[project @ 2002-08-01 12:49:06 by simonpj]
More documentation about hoisting

21 years ago[project @ 2002-07-31 14:11:13 by simonmar]
simonmar [Wed, 31 Jul 2002 14:11:14 +0000 (14:11 +0000)]
[project @ 2002-07-31 14:11:13 by simonmar]
Detect Python (any version).

21 years ago[project @ 2002-07-31 12:17:35 by simonmar]
simonmar [Wed, 31 Jul 2002 12:17:35 +0000 (12:17 +0000)]
[project @ 2002-07-31 12:17:35 by simonmar]
Remove unused primRepTyCon

21 years ago[project @ 2002-07-30 17:35:59 by sof]
sof [Tue, 30 Jul 2002 17:35:59 +0000 (17:35 +0000)]
[project @ 2002-07-30 17:35:59 by sof]
wibble

21 years ago[project @ 2002-07-30 11:49:17 by simonpj]
simonpj [Tue, 30 Jul 2002 11:49:18 +0000 (11:49 +0000)]
[project @ 2002-07-30 11:49:17 by simonpj]
Wibble to yestdays commit re module versioning

21 years ago[project @ 2002-07-30 03:42:56 by sof]
sof [Tue, 30 Jul 2002 03:42:56 +0000 (03:42 +0000)]
[project @ 2002-07-30 03:42:56 by sof]
hc-file-bundle:
  * only include the .hsc-derived .hs files that exist in the build tree.
  * updated to include current happy-derived .hs files

21 years ago[project @ 2002-07-29 16:12:07 by simonpj]
simonpj [Mon, 29 Jul 2002 16:12:08 +0000 (16:12 +0000)]
[project @ 2002-07-29 16:12:07 by simonpj]
** MERGE TO STABLE **

1. Make TidyPgm forget IdInfo for exported things.  This is
   really important for the recompilation checker; see the
   commment with TidyPgm.tidyTopIdInfo

   Fixes a bug reported by Sigbjorn.

2. Make CoreToStg more robust, by avoiding the duplicate
   calculation of update flag for top-level closures

21 years ago[project @ 2002-07-29 16:08:20 by simonpj]
simonpj [Mon, 29 Jul 2002 16:08:20 +0000 (16:08 +0000)]
[project @ 2002-07-29 16:08:20 by simonpj]
Comment only

21 years ago[project @ 2002-07-29 13:19:52 by simonpj]
simonpj [Mon, 29 Jul 2002 13:19:53 +0000 (13:19 +0000)]
[project @ 2002-07-29 13:19:52 by simonpj]
** MERGE TO STABLE **

Fix an alpha-renaming bug in hoistForAlls

21 years ago[project @ 2002-07-29 12:22:37 by simonpj]
simonpj [Mon, 29 Jul 2002 12:22:38 +0000 (12:22 +0000)]
[project @ 2002-07-29 12:22:37 by simonpj]
*** MERGE TO STABLE BRANCH ***

Surprisingly large delta to make rebindable names work properly.
I was sloppily not checking the type of the user-supplied name,
and Ashley Yakeley's first experiment showed up the problem!

Solution: typechecker has to check both the 'standard' name and
the 'user' name and check the latter has a type compatible with the
former.

The main comment is with Inst.tcSyntaxName (a new function).

21 years ago[project @ 2002-07-29 11:22:31 by simonmar]
simonmar [Mon, 29 Jul 2002 11:22:31 +0000 (11:22 +0000)]
[project @ 2002-07-29 11:22:31 by simonmar]
Back out previous commit; -static is on by default and we don't want
to always pass -static to the linker.

21 years ago[project @ 2002-07-29 10:50:43 by simonmar]
simonmar [Mon, 29 Jul 2002 10:50:44 +0000 (10:50 +0000)]
[project @ 2002-07-29 10:50:43 by simonmar]
Type variables created by the typechecker didn't have the correct
NameSpace: they were in the Var namespace rather than the TyVar
namespace, which can lead to strange warnings about quantified type
variables being not mentioned in the type when DEBUG is on.

Name:
- added mkSystemNameEncoded for use when the string
  is already encoded (saves re-encoding the string every
  time)

- added mkSystemTvNameEncoded for making a type variable
  name, as above

Var:
- use mkSystemTvNameEncoded when making type variables

Id:
- add mkSysLocalUnencoded for the (rare) case when
  the string needs encoding

TcMType:
- use mkSystemTvNameEncoded rather than mkSystemName for
  making type variables

SetLevels:
- use mkSysLocalUnencoded since the names generated here
  need encoding.

21 years ago[project @ 2002-07-29 10:42:29 by simonmar]
simonmar [Mon, 29 Jul 2002 10:42:29 +0000 (10:42 +0000)]
[project @ 2002-07-29 10:42:29 by simonmar]
Add -static to the linker command line when -static is passed to GHC.

At some point we might want a way to say that Haskell libraries should
be linked statically but everything else should be linked as normal,
but since we aren't really supporting dynamic Haskell libraries at
this time, we don't need to address that yet.

21 years ago[project @ 2002-07-29 09:11:04 by simonpj]
simonpj [Mon, 29 Jul 2002 09:11:04 +0000 (09:11 +0000)]
[project @ 2002-07-29 09:11:04 by simonpj]
More informative crash in rdrNameModule

21 years ago[project @ 2002-07-28 14:10:03 by krasimir]
krasimir [Sun, 28 Jul 2002 14:10:03 +0000 (14:10 +0000)]
[project @ 2002-07-28 14:10:03 by krasimir]
Documentation for #size

21 years ago[project @ 2002-07-28 13:55:32 by krasimir]
krasimir [Sun, 28 Jul 2002 13:55:32 +0000 (13:55 +0000)]
[project @ 2002-07-28 13:55:32 by krasimir]
add `size` macro

21 years ago[project @ 2002-07-28 02:31:11 by sof]
sof [Sun, 28 Jul 2002 02:31:11 +0000 (02:31 +0000)]
[project @ 2002-07-28 02:31:11 by sof]
include stdlib.h (to get at NULL)

21 years ago[project @ 2002-07-26 09:35:46 by simonmar]
simonmar [Fri, 26 Jul 2002 09:35:46 +0000 (09:35 +0000)]
[project @ 2002-07-26 09:35:46 by simonmar]
Always return 8-byte-aligned memory from arenaAlloc().  Fixes problems
with profiling on sparc-sun-solaris2, and might fix problems with
Windows too.

MERGE

21 years ago[project @ 2002-07-26 03:06:58 by sof]
sof [Fri, 26 Jul 2002 03:06:58 +0000 (03:06 +0000)]
[project @ 2002-07-26 03:06:58 by sof]
interactiveLoop{mingw32}: always show prompt under mingw.

hIsTerminalDevice returns True iff stdin is connected to a Console
under Win32. Which it is when running in a command shell
(DOS,bash etc.), but Emacs sub-shells don't get a Console of their
own when invoked. So, just disable this feature (whose motivation
somewhat escapes me.)

21 years ago[project @ 2002-07-25 18:36:59 by sof]
sof [Thu, 25 Jul 2002 18:37:00 +0000 (18:37 +0000)]
[project @ 2002-07-25 18:36:59 by sof]
Expose printAllThreads() in non-DEBUG builds;
of some use when debugging ConcHask code and
want a dump of the current state of the system's
threads.

Not provided via a library, so to use, do

 foreign import call unsafe printAllThreads :: IO ()

21 years ago[project @ 2002-07-25 14:47:30 by simonmar]
simonmar [Thu, 25 Jul 2002 14:47:30 +0000 (14:47 +0000)]
[project @ 2002-07-25 14:47:30 by simonmar]
Add -ddump-minimal-imports (not sure why this was missing)

MERGE

21 years ago[project @ 2002-07-24 18:18:13 by sof]
sof [Wed, 24 Jul 2002 18:18:13 +0000 (18:18 +0000)]
[project @ 2002-07-24 18:18:13 by sof]
warning removal

21 years ago[project @ 2002-07-24 09:47:49 by simonmar]
simonmar [Wed, 24 Jul 2002 09:47:49 +0000 (09:47 +0000)]
[project @ 2002-07-24 09:47:49 by simonmar]
Documentation for #offset

21 years ago[project @ 2002-07-24 09:44:37 by simonmar]
simonmar [Wed, 24 Jul 2002 09:44:37 +0000 (09:44 +0000)]
[project @ 2002-07-24 09:44:37 by simonmar]
Add #offset for just grabbing the byte offset of a struct field.

21 years ago[project @ 2002-07-24 06:27:01 by krasimir]
krasimir [Wed, 24 Jul 2002 06:27:01 +0000 (06:27 +0000)]
[project @ 2002-07-24 06:27:01 by krasimir]
add GhcLibsWithObjectIO

21 years ago[project @ 2002-07-24 03:38:58 by sof]
sof [Wed, 24 Jul 2002 03:38:58 +0000 (03:38 +0000)]
[project @ 2002-07-24 03:38:58 by sof]
awaitEvent: if select() reports EBADF,
always unblock all waiting threads, even if
the prior invocation of select() also
elicited an EBADF.

The 'smart' that was there previously runs
the risk of working against us (if the EBADFs are
coming from different fds), so the above
scheme is preferable (and simpler.)

21 years ago[project @ 2002-07-23 22:42:17 by krasimir]
krasimir [Tue, 23 Jul 2002 22:42:18 +0000 (22:42 +0000)]
[project @ 2002-07-23 22:42:17 by krasimir]
add --enable-objectio configuration option