ghc-hetmet.git
23 years ago[project @ 2001-05-29 11:39:00 by rrt]
rrt [Tue, 29 May 2001 11:39:00 +0000 (11:39 +0000)]
[project @ 2001-05-29 11:39:00 by rrt]
Don't build lndir on mingwin, which doesn't have symlinks.

23 years ago[project @ 2001-05-29 11:38:14 by rrt]
rrt [Tue, 29 May 2001 11:38:14 +0000 (11:38 +0000)]
[project @ 2001-05-29 11:38:14 by rrt]
Reimplement getCPUTime in Haskell for Windows.

23 years ago[project @ 2001-05-29 01:07:00 by sof]
sof [Tue, 29 May 2001 01:07:00 +0000 (01:07 +0000)]
[project @ 2001-05-29 01:07:00 by sof]
Deal with nested comments (HDirect sources showed up this bug)

23 years ago[project @ 2001-05-28 17:34:24 by qrczak]
qrczak [Mon, 28 May 2001 17:34:24 +0000 (17:34 +0000)]
[project @ 2001-05-28 17:34:24 by qrczak]
Fix removing temporary files.

23 years ago[project @ 2001-05-28 13:57:19 by simonmar]
simonmar [Mon, 28 May 2001 13:57:19 +0000 (13:57 +0000)]
[project @ 2001-05-28 13:57:19 by simonmar]
When we auto-load a module because the user typed a qualified name at
the prompt, we better not auto-load a home interface (because we won't
have the code to go with it).

So, introduce a new constructor in the WhereFrom datatype, namely
ImportByCmdLine for these auto-imports, and make findAndReadIface fail
if it tries to load a home interface by this route.

ToDo: GHCi should *never* demand-load a home interface under any
circumstances, but we don't have an ASSERT for this yet.

23 years ago[project @ 2001-05-28 12:56:35 by simonmar]
simonmar [Mon, 28 May 2001 12:56:35 +0000 (12:56 +0000)]
[project @ 2001-05-28 12:56:35 by simonmar]
Change the GHCi monad from type

GHCiState -> IO (GHCiState, a)
to
IORef GHCiState -> IO a

to avoid losing recent changes to the state when we receive an
exception (which would normally be harmless, except that the state
isn't purely functional: it must match some state kept by the RTS's
dynamic linker).  Asynchonous exceptions could still cause us some
difficulty.

23 years ago[project @ 2001-05-28 11:42:56 by simonpj]
simonpj [Mon, 28 May 2001 11:42:56 +0000 (11:42 +0000)]
[project @ 2001-05-28 11:42:56 by simonpj]
Wibble for scoped type variables

23 years ago[project @ 2001-05-28 07:13:54 by sof]
sof [Mon, 28 May 2001 07:13:54 +0000 (07:13 +0000)]
[project @ 2001-05-28 07:13:54 by sof]
get rid of some more cpp warnings

23 years ago[project @ 2001-05-28 05:52:55 by sof]
sof [Mon, 28 May 2001 05:52:55 +0000 (05:52 +0000)]
[project @ 2001-05-28 05:52:55 by sof]
de-ramble previous commit

23 years ago[project @ 2001-05-28 03:31:19 by sof]
sof [Mon, 28 May 2001 03:31:19 +0000 (03:31 +0000)]
[project @ 2001-05-28 03:31:19 by sof]
Misc minor changes to integrate GHC a little bit better on Win32 platforms.
Specifically, the commit does the following (assuming you've configured
fptools/ with the option --enable-minimal-unix-deps on a mingw platform):

 * when GHC uses System.system, it expects an MSDOS command processor to
   interpret the command. This implies that 'normal' UNIX shell utils will
   no longer be used, but substituted with MSDOS equivalents.
 * the GHC backend relies on gcc and perl to handle .s/.hc/.o/.a files. GHC
   will now assume that these all live in one 'tool directory', making it
   easier to bundle these backend tools with GHC.

The upshot of these changes is that it is now possible for the user not to
have to install cygwin prior to installing GHC (as the upcoming ghc-win32
binary release will prove).

23 years ago[project @ 2001-05-28 03:17:03 by sof]
sof [Mon, 28 May 2001 03:17:03 +0000 (03:17 +0000)]
[project @ 2001-05-28 03:17:03 by sof]
Avoid the use of Posix when compiling for target i386-unknown-mingw32

23 years ago[project @ 2001-05-27 23:55:07 by sof]
sof [Sun, 27 May 2001 23:55:07 +0000 (23:55 +0000)]
[project @ 2001-05-27 23:55:07 by sof]
Added GHC_TOUCHY_DIR and GHC_TOUCHY

23 years ago[project @ 2001-05-27 23:53:47 by sof]
sof [Sun, 27 May 2001 23:53:47 +0000 (23:53 +0000)]
[project @ 2001-05-27 23:53:47 by sof]
New configure script option, --enable-minimal-unix-deps, a Win32-specific
option which lets you build a compiler that doesn't depend on cygwin tools
to run. Well, you still need tools such as gcc and perl in the backend, but
these don't have to be cygwin ports.

23 years ago[project @ 2001-05-27 06:08:24 by sof]
sof [Sun, 27 May 2001 06:08:24 +0000 (06:08 +0000)]
[project @ 2001-05-27 06:08:24 by sof]
wibble

23 years ago[project @ 2001-05-27 05:00:08 by sof]
sof [Sun, 27 May 2001 05:00:08 +0000 (05:00 +0000)]
[project @ 2001-05-27 05:00:08 by sof]
'flex' or 'lex' is required to compile up fptools/ (e.g., reqd in
glafp-utils/sgmlverb). autoconf's standard macro AC_PROG_LEX just
defaults to 'lex' if 'flex' isn't found, but doesn't actually
check whether 'lex' is available along PATH.

Added AC_PROG_LEX_STRICT, which extends AC_PROG_LEX by checking
for the presence of 'lex' if 'flex' isn't found. It bails
out with an error message if 'lex' cannot be found.

23 years ago[project @ 2001-05-25 18:35:29 by sof]
sof [Fri, 25 May 2001 18:35:29 +0000 (18:35 +0000)]
[project @ 2001-05-25 18:35:29 by sof]
wibble - silence CPP warning

23 years ago[project @ 2001-05-25 18:33:46 by sof]
sof [Fri, 25 May 2001 18:33:46 +0000 (18:33 +0000)]
[project @ 2001-05-25 18:33:46 by sof]
wibble - silence CPP warnings

23 years ago[project @ 2001-05-25 18:32:51 by sof]
sof [Fri, 25 May 2001 18:32:51 +0000 (18:32 +0000)]
[project @ 2001-05-25 18:32:51 by sof]
wibble - drop a ? from a fprintf format string to avoid having it look like a trigraph seq might be present

23 years ago[project @ 2001-05-25 16:14:02 by dsyme]
dsyme [Fri, 25 May 2001 16:14:02 +0000 (16:14 +0000)]
[project @ 2001-05-25 16:14:02 by dsyme]
Minor tweaks to IlxGen backend

23 years ago[project @ 2001-05-25 13:56:25 by simonmar]
simonmar [Fri, 25 May 2001 13:56:25 +0000 (13:56 +0000)]
[project @ 2001-05-25 13:56:25 by simonmar]
Check for re_search_2() when checking whether libc has GNU regex.
This is a temporary fix until we get rid of GNU regex altogether and
do something more portable.

*** MAYBE MERGE ***

23 years ago[project @ 2001-05-25 13:50:39 by simonmar]
simonmar [Fri, 25 May 2001 13:50:39 +0000 (13:50 +0000)]
[project @ 2001-05-25 13:50:39 by simonmar]
NetBSD is ELF only now.

*** MAYBE MERGE (and the last revision) ***

23 years ago[project @ 2001-05-25 13:49:35 by simonmar]
simonmar [Fri, 25 May 2001 13:49:35 +0000 (13:49 +0000)]
[project @ 2001-05-25 13:49:35 by simonmar]
we're only supporting NetBSD/ELF now, not a.out (Lennart's suggestion)

23 years ago[project @ 2001-05-25 12:09:43 by simonpj]
simonpj [Fri, 25 May 2001 12:09:43 +0000 (12:09 +0000)]
[project @ 2001-05-25 12:09:43 by simonpj]
wibble

23 years ago[project @ 2001-05-25 10:53:59 by simonmar]
simonmar [Fri, 25 May 2001 10:53:59 +0000 (10:53 +0000)]
[project @ 2001-05-25 10:53:59 by simonmar]
Add -lm to HC_BOOT_LIBS

*** MAYBE MERGE ***

23 years ago[project @ 2001-05-25 10:50:27 by simonmar]
simonmar [Fri, 25 May 2001 10:50:27 +0000 (10:50 +0000)]
[project @ 2001-05-25 10:50:27 by simonmar]
Link with HStext_cbits in case we need regex (bug from Lennart).

*** MAYBE MERGE ***

23 years ago[project @ 2001-05-25 10:31:08 by simonmar]
simonmar [Fri, 25 May 2001 10:31:08 +0000 (10:31 +0000)]
[project @ 2001-05-25 10:31:08 by simonmar]
netbsd_aout => netbsdaout

23 years ago[project @ 2001-05-25 10:30:53 by simonmar]
simonmar [Fri, 25 May 2001 10:30:53 +0000 (10:30 +0000)]
[project @ 2001-05-25 10:30:53 by simonmar]
NetBSD <= 1.4 is a.out, apparently

23 years ago[project @ 2001-05-25 10:28:58 by simonmar]
simonmar [Fri, 25 May 2001 10:28:58 +0000 (10:28 +0000)]
[project @ 2001-05-25 10:28:58 by simonmar]
NetBSD is ELF by default.

23 years ago[project @ 2001-05-25 08:55:03 by simonpj]
simonpj [Fri, 25 May 2001 08:55:04 +0000 (08:55 +0000)]
[project @ 2001-05-25 08:55:03 by simonpj]
-------------------------------------
Wibbles to Don's runtime-types commit
-------------------------------------

There was an upside down predicate which utterly broke the compiler.

While I was about it

* I changed the global flag to
opt_RuntimeTypes
  with command line option
-fruntime-types (was -fkeep-stg-types)

* I moved isRuntimeArg, isRuntimeVar to CoreSyn

23 years ago[project @ 2001-05-25 01:15:36 by sof]
sof [Fri, 25 May 2001 01:15:36 +0000 (01:15 +0000)]
[project @ 2001-05-25 01:15:36 by sof]
Conditionally descend into touchy/

23 years ago[project @ 2001-05-25 01:15:07 by sof]
sof [Fri, 25 May 2001 01:15:07 +0000 (01:15 +0000)]
[project @ 2001-05-25 01:15:07 by sof]
'touch' replacement (for use under Win32 in a cygwin-free setup only)

23 years ago[project @ 2001-05-24 15:10:19 by dsyme]
dsyme [Thu, 24 May 2001 15:10:20 +0000 (15:10 +0000)]
[project @ 2001-05-24 15:10:19 by dsyme]
Various changes for ILX backend and type-passing compilers, code reviewed by SimonPJ

23 years ago[project @ 2001-05-24 15:01:33 by simonpj]
simonpj [Thu, 24 May 2001 15:01:33 +0000 (15:01 +0000)]
[project @ 2001-05-24 15:01:33 by simonpj]
wibble

23 years ago[project @ 2001-05-24 13:59:09 by simonpj]
simonpj [Thu, 24 May 2001 13:59:12 +0000 (13:59 +0000)]
[project @ 2001-05-24 13:59:09 by simonpj]
------------------------------------------------------
More stuff towards generalising 'foreign' declarations
------------------------------------------------------

This is the second step towards generalising 'foreign' declarations to
handle langauges other than C.  Now I can handle

  foreign import dotnet type T
  foreign import dotnet "void Foo.Baz.f( T )" f :: T -> IO ()

** WARNING **
I believe that all the foreign stuff for C should
work exactly as before, but I have not tested it
thoroughly.  Sven, Manuel, Marcin: please give it a
whirl and compare old with new output.

Lots of fiddling around with data types.  The main changes are

* HsDecls.lhs
The ForeignDecl type and its friends
Note also the ForeignType constructor to TyClDecl

* ForeignCall.lhs
Here's where the stuff that survives right through
compilation lives

* TcForeign.lhs DsForeign.lhs
Substantial changes driven by the new data types

* Parser.y ParseIface.y RnSource
Just what you'd expect

23 years ago[project @ 2001-05-24 13:49:32 by simonpj]
simonpj [Thu, 24 May 2001 13:49:32 +0000 (13:49 +0000)]
[project @ 2001-05-24 13:49:32 by simonpj]
Tiny delta towards .NET

23 years ago[project @ 2001-05-24 10:46:08 by simonmar]
simonmar [Thu, 24 May 2001 10:46:08 +0000 (10:46 +0000)]
[project @ 2001-05-24 10:46:08 by simonmar]
Fixes for the hsc2hs rules.

23 years ago[project @ 2001-05-24 10:41:13 by simonmar]
simonmar [Thu, 24 May 2001 10:41:13 +0000 (10:41 +0000)]
[project @ 2001-05-24 10:41:13 by simonmar]
Make hGetContents work on DuplexHandles, and some small cleanups.

23 years ago[project @ 2001-05-24 06:49:28 by simonpj]
simonpj [Thu, 24 May 2001 06:49:28 +0000 (06:49 +0000)]
[project @ 2001-05-24 06:49:28 by simonpj]
Import assertPanic to support the ASSERT

23 years ago[project @ 2001-05-23 16:47:09 by sewardj]
sewardj [Wed, 23 May 2001 16:47:09 +0000 (16:47 +0000)]
[project @ 2001-05-23 16:47:09 by sewardj]
Add {-# OPTION -fvia-C #-} so that the compiler can compile itself
in --make mode (yes, really!)

23 years ago[project @ 2001-05-23 15:52:12 by sewardj]
sewardj [Wed, 23 May 2001 15:52:12 +0000 (15:52 +0000)]
[project @ 2001-05-23 15:52:12 by sewardj]
-lreadline --> readline

23 years ago[project @ 2001-05-23 10:26:14 by simonmar]
simonmar [Wed, 23 May 2001 10:26:14 +0000 (10:26 +0000)]
[project @ 2001-05-23 10:26:14 by simonmar]
- hack to make getArgs return [] and getProgName return
  "<interactive>" under GHCi.

- use IO.stdout and IO.stderr instead of PrelHandle for the
  automatic flushing.

23 years ago[project @ 2001-05-23 09:59:18 by simonmar]
simonmar [Wed, 23 May 2001 09:59:18 +0000 (09:59 +0000)]
[project @ 2001-05-23 09:59:18 by simonmar]
Don't catch ExitException at the top level, just re-throw it.

23 years ago[project @ 2001-05-23 09:41:34 by rrt]
rrt [Wed, 23 May 2001 09:41:34 +0000 (09:41 +0000)]
[project @ 2001-05-23 09:41:34 by rrt]
Add -mwin32 -mno-cygwin to CPPFLAGS on Windows.

23 years ago[project @ 2001-05-23 09:28:44 by simonmar]
simonmar [Wed, 23 May 2001 09:28:44 +0000 (09:28 +0000)]
[project @ 2001-05-23 09:28:44 by simonmar]
Guess I forgot to commit this file as part of the exitWith changes
yesterday.  Anyway, commit my version now (no functional changes).

23 years ago[project @ 2001-05-22 20:49:47 by sof]
sof [Tue, 22 May 2001 20:49:47 +0000 (20:49 +0000)]
[project @ 2001-05-22 20:49:47 by sof]
wibble

23 years ago[project @ 2001-05-22 19:25:49 by qrczak]
qrczak [Tue, 22 May 2001 19:25:49 +0000 (19:25 +0000)]
[project @ 2001-05-22 19:25:49 by qrczak]
Remove module dependency loop: don't import PrelIOBase in PrelRead.
readIO is in PrelIO, remove it from PrelRead. Derive instance Read
BufferMode automatically.

23 years ago[project @ 2001-05-22 19:07:39 by sof]
sof [Tue, 22 May 2001 19:07:39 +0000 (19:07 +0000)]
[project @ 2001-05-22 19:07:39 by sof]
Added the -h (header) option; it prefixes the unlit'ed output with a pair
of line pragmas, e.g.,

  foo$ unlit -h foo.lhs foo.lhs - | head -3
  # 1 "foo.lhs"
  {-# LINE 1 "foo.lhs" #-}
  module Foo where
  foo$

Using -h saves the main user of 'unlit', GHC, from having to do the
prepending of line pragmas via shellular magic. (=> GHC is able to
drop the dependency on there being a UNIX-like shell underneath when
using System.system).

23 years ago[project @ 2001-05-22 16:45:41 by qrczak]
qrczak [Tue, 22 May 2001 16:45:41 +0000 (16:45 +0000)]
[project @ 2001-05-22 16:45:41 by qrczak]
Fix small callconv-related import mismatches etc.

23 years ago[project @ 2001-05-22 15:58:57 by simonmar]
simonmar [Tue, 22 May 2001 15:58:57 +0000 (15:58 +0000)]
[project @ 2001-05-22 15:58:57 by simonmar]
front panel wibble.

23 years ago[project @ 2001-05-22 15:06:47 by simonmar]
simonmar [Tue, 22 May 2001 15:06:47 +0000 (15:06 +0000)]
[project @ 2001-05-22 15:06:47 by simonmar]
- System.exitWith now raises a (new) exception,
ExitException ExitCode.

- While I was there I cleaned up System.getArgs and
  System.getProgName, using foriegn label and removing progargs.c

23 years ago[project @ 2001-05-22 14:48:28 by simonmar]
simonmar [Tue, 22 May 2001 14:48:28 +0000 (14:48 +0000)]
[project @ 2001-05-22 14:48:28 by simonmar]
Need to make ghc/utils in the second stage before we clean in
ghc/lib/std, because hsc2hs is needed to boot ghc/lib/std, but the
libraries are needed to build hsc2hs itself.

*** MERGE ***

23 years ago[project @ 2001-05-22 14:10:25 by rrt]
rrt [Tue, 22 May 2001 14:10:25 +0000 (14:10 +0000)]
[project @ 2001-05-22 14:10:25 by rrt]
Merge from 4.08 branch.

23 years ago[project @ 2001-05-22 13:43:14 by simonpj]
simonpj [Tue, 22 May 2001 13:43:19 +0000 (13:43 +0000)]
[project @ 2001-05-22 13:43:14 by simonpj]
-------------------------------------------
Towards generalising 'foreign' declarations
-------------------------------------------

This is a first step towards generalising 'foreign' declarations to
handle langauges other than C.  Quite a lot of files are touched,
but nothing has really changed.  Everything should work exactly as
before.

But please be on your guard for ccall-related bugs.

Main things

Basic data types: ForeignCall.lhs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Remove absCSyn/CallConv.lhs

* Add prelude/ForeignCall.lhs.  This defines the ForeignCall
  type and its variants

* Define ForeignCall.Safety to say whether a call is unsafe
  or not (was just a boolean).  Lots of consequential chuffing.

* Remove all CCall stuff from PrimOp, and put it in ForeignCall

Take CCallOp out of the PrimOp type (where it was always a glitch)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Add IdInfo.FCallId variant to the type IdInfo.GlobalIdDetails,
along with predicates Id.isFCallId, Id.isFCallId_maybe

* Add StgSyn.StgOp, to sum PrimOp with FCallOp, because it
  *is* useful to sum them together in Stg and AbsC land.  If
  nothing else, it minimises changes.

Also generally rename "CCall" stuff to "FCall" where it's generic
to all foreign calls.

23 years ago[project @ 2001-05-22 13:22:14 by simonmar]
simonmar [Tue, 22 May 2001 13:22:14 +0000 (13:22 +0000)]
[project @ 2001-05-22 13:22:14 by simonmar]
Clarify what NON_POSIX_SOURCE is needed for (S_ISSOCK namely).  This
module is probably badly named.  Anyway, things will likely change in
this area shortly when the Win32 port happens.

23 years ago[project @ 2001-05-22 12:00:05 by rrt]
rrt [Tue, 22 May 2001 12:00:05 +0000 (12:00 +0000)]
[project @ 2001-05-22 12:00:05 by rrt]
Add changes for latest 4.08.2 InstallShield; merge into 4.08 branch,
especially as the HEAD story will soon change with the New Improved Windows
System for GHC 5.

23 years ago[project @ 2001-05-22 11:55:56 by rrt]
rrt [Tue, 22 May 2001 11:55:56 +0000 (11:55 +0000)]
[project @ 2001-05-22 11:55:56 by rrt]
Update for the latest 4.08.2 InstallShield. This will also be merged into
the 4.08 branch, and will change again shortly (for the better) with the New
Scheme that GHC 5 for Windows will use.

23 years ago[project @ 2001-05-22 11:29:04 by simonmar]
simonmar [Tue, 22 May 2001 11:29:04 +0000 (11:29 +0000)]
[project @ 2001-05-22 11:29:04 by simonmar]
Add -L$(FPTOOLS_TOP_ABS)/ghc/rts/gmp to the link flags (noticed by:
Lennart).

23 years ago[project @ 2001-05-22 11:03:47 by simonmar]
simonmar [Tue, 22 May 2001 11:03:47 +0000 (11:03 +0000)]
[project @ 2001-05-22 11:03:47 by simonmar]
- add missing .gz suffix to -hc.tar file.
- clean up hc-bundle droppings

23 years ago[project @ 2001-05-22 10:38:57 by simonmar]
simonmar [Tue, 22 May 2001 10:38:57 +0000 (10:38 +0000)]
[project @ 2001-05-22 10:38:57 by simonmar]
- Recurse on 'distclean', otherwise we don't get to remove hsc2hs-inplace
- Remove 'veryclean' target which doesn't exist any more

23 years ago[project @ 2001-05-22 10:34:07 by simonmar]
simonmar [Tue, 22 May 2001 10:34:07 +0000 (10:34 +0000)]
[project @ 2001-05-22 10:34:07 by simonmar]
Add a rule to build an hc-file tar bundle.

23 years ago[project @ 2001-05-21 16:34:22 by sewardj]
sewardj [Mon, 21 May 2001 16:34:22 +0000 (16:34 +0000)]
[project @ 2001-05-21 16:34:22 by sewardj]
Implement opcodes bci_TESTLT_F and case bci_TESTEQ_F.  (Duh.)

23 years ago[project @ 2001-05-21 15:25:24 by simonmar]
simonmar [Mon, 21 May 2001 15:25:25 +0000 (15:25 +0000)]
[project @ 2001-05-21 15:25:24 by simonmar]
More test reorganisation - most of these tests work now.

23 years ago[project @ 2001-05-21 14:09:52 by sewardj]
sewardj [Mon, 21 May 2001 14:09:52 +0000 (14:09 +0000)]
[project @ 2001-05-21 14:09:52 by sewardj]
update expected output

23 years ago[project @ 2001-05-21 14:08:36 by simonmar]
simonmar [Mon, 21 May 2001 14:08:36 +0000 (14:08 +0000)]
[project @ 2001-05-21 14:08:36 by simonmar]
Make it a bit clearer which output goes with which test.

23 years ago[project @ 2001-05-21 14:07:31 by simonmar]
simonmar [Mon, 21 May 2001 14:07:31 +0000 (14:07 +0000)]
[project @ 2001-05-21 14:07:31 by simonmar]
Move topHandler and friends into a module on their own.  They can't go
in PrelMain, because PrelMain isn't included in HSstd.o (because
PrelMain depends on Main, which doesn't exist yet...)

23 years ago[project @ 2001-05-21 14:05:04 by simonmar]
simonmar [Mon, 21 May 2001 14:05:04 +0000 (14:05 +0000)]
[project @ 2001-05-21 14:05:04 by simonmar]
minor performance improvement

23 years ago[project @ 2001-05-21 14:04:15 by simonmar]
simonmar [Mon, 21 May 2001 14:04:15 +0000 (14:04 +0000)]
[project @ 2001-05-21 14:04:15 by simonmar]
GC unused imports

23 years ago[project @ 2001-05-21 14:03:05 by simonmar]
simonmar [Mon, 21 May 2001 14:03:05 +0000 (14:03 +0000)]
[project @ 2001-05-21 14:03:05 by simonmar]
- remove support for GHC < 4.00
- fixed to work with GHC 5.01 (new I/O system)

23 years ago[project @ 2001-05-21 14:00:40 by simonmar]
simonmar [Mon, 21 May 2001 14:00:40 +0000 (14:00 +0000)]
[project @ 2001-05-21 14:00:40 by simonmar]
Remove support for GHC < 4.00

23 years ago[project @ 2001-05-21 13:57:49 by simonmar]
simonmar [Mon, 21 May 2001 13:57:49 +0000 (13:57 +0000)]
[project @ 2001-05-21 13:57:49 by simonmar]
fix typos in the welcome message and help text.

23 years ago[project @ 2001-05-21 11:02:50 by simonmar]
simonmar [Mon, 21 May 2001 11:02:50 +0000 (11:02 +0000)]
[project @ 2001-05-21 11:02:50 by simonmar]
file locking works.

23 years ago[project @ 2001-05-21 11:02:15 by simonmar]
simonmar [Mon, 21 May 2001 11:02:15 +0000 (11:02 +0000)]
[project @ 2001-05-21 11:02:15 by simonmar]
Re-instate the missing fstat call.

By some bizarre coincidence, this function declared a 'struct stat',
and failed to initialize it, but in practice the uninitialized memory
was in the exact same place on the stack as the struct stat from a
previous call to fstat, which meant all the tests worked :-)

Also, apparently gcc doesn't warn about uninitialised use of structure
fields.

23 years ago[project @ 2001-05-21 10:03:36 by simonpj]
simonpj [Mon, 21 May 2001 10:03:36 +0000 (10:03 +0000)]
[project @ 2001-05-21 10:03:36 by simonpj]
Documentation for scoped type variables

23 years ago[project @ 2001-05-21 09:19:14 by simonpj]
simonpj [Mon, 21 May 2001 09:19:15 +0000 (09:19 +0000)]
[project @ 2001-05-21 09:19:14 by simonpj]
-------------------------------
Improve pattern type-signatures
-------------------------------

The main effect of this commit is to implement the idea (originally
Marcin's suggestion) that type variables in pattern type signatures
are simply names for types; they don't have to name a type that is
itself a type variable.

For example

f :: Int -> Int
f (x::a) = let  y::a
y = x
   in x+y

is fine.  Here 'a' is a name for the type 'Int', and does not have
to be universally quantified.

I also took the opportunity to modularise the implementation of
pattern type-checking, mainly in TcMatches.  As a result pattern type
signatures should work in do-notation (which they didn't before).

ToDo: update documentation

23 years ago[project @ 2001-05-20 11:25:14 by qrczak]
qrczak [Sun, 20 May 2001 11:25:14 +0000 (11:25 +0000)]
[project @ 2001-05-20 11:25:14 by qrczak]
Compile and link *_hsc.c.

23 years ago[project @ 2001-05-19 20:20:56 by qrczak]
qrczak [Sat, 19 May 2001 20:20:56 +0000 (20:20 +0000)]
[project @ 2001-05-19 20:20:56 by qrczak]
Make ghc compilable with itself after the implementation of handle
IO changed, by changing an ugly mess of #ifdefs and low-level
ghc-internals-specific kludges into a yet uglier mess with more
#ifdefs and kludges.

Wouldn't Haskell 98 implementation of a lexer be fast enough? :-)

This won't compile with older versions of ghc-5.01. You may temporarily
change 501 to 502 in #ifdefs here, or use an older ghc.

The compiler still doesn't work at all when compiled with itself:
it writes complete nonsense into .hc files.

A remaining error: ghc/lib/std doesn't link PrelHandle_hsc.o into
libHSstd.a. Function read_wrap is inline but for some reason it's
needed for linking some programs (e.g. ghc itself).

23 years ago[project @ 2001-05-19 08:02:37 by qrczak]
qrczak [Sat, 19 May 2001 08:02:37 +0000 (08:02 +0000)]
[project @ 2001-05-19 08:02:37 by qrczak]
Implementation of locking in cbits is bogus. Disable it for now.

23 years ago[project @ 2001-05-18 22:40:52 by qrczak]
qrczak [Fri, 18 May 2001 22:40:52 +0000 (22:40 +0000)]
[project @ 2001-05-18 22:40:52 by qrczak]
I'm too young to remember times when ghc didn't use gmp...

23 years ago[project @ 2001-05-18 22:34:42 by qrczak]
qrczak [Fri, 18 May 2001 22:34:42 +0000 (22:34 +0000)]
[project @ 2001-05-18 22:34:42 by qrczak]
Install lockFile.h.

23 years ago[project @ 2001-05-18 22:13:28 by qrczak]
qrczak [Fri, 18 May 2001 22:13:28 +0000 (22:13 +0000)]
[project @ 2001-05-18 22:13:28 by qrczak]
Remove bogus comment.

23 years ago[project @ 2001-05-18 21:57:30 by qrczak]
qrczak [Fri, 18 May 2001 21:57:30 +0000 (21:57 +0000)]
[project @ 2001-05-18 21:57:30 by qrczak]
s'/n -> /r/n'\n -> \r\n' in a comment.

23 years ago[project @ 2001-05-18 21:46:58 by qrczak]
qrczak [Fri, 18 May 2001 21:46:58 +0000 (21:46 +0000)]
[project @ 2001-05-18 21:46:58 by qrczak]
Put back importing Monad, as it doesn't need Prelude anymore.

23 years ago[project @ 2001-05-18 21:45:43 by qrczak]
qrczak [Fri, 18 May 2001 21:45:43 +0000 (21:45 +0000)]
[project @ 2001-05-18 21:45:43 by qrczak]
Don't export throwErrnoIfRetry_ twice.

23 years ago[project @ 2001-05-18 21:19:11 by qrczak]
qrczak [Fri, 18 May 2001 21:19:11 +0000 (21:19 +0000)]
[project @ 2001-05-18 21:19:11 by qrczak]
Remove and don't install: stgio.h, stgerror.h, fileObject.h.

23 years ago[project @ 2001-05-18 21:18:17 by qrczak]
qrczak [Fri, 18 May 2001 21:18:17 +0000 (21:18 +0000)]
[project @ 2001-05-18 21:18:17 by qrczak]
Make stg_gc_unpt_r1 known to the linker.

23 years ago[project @ 2001-05-18 18:27:20 by qrczak]
qrczak [Fri, 18 May 2001 18:27:20 +0000 (18:27 +0000)]
[project @ 2001-05-18 18:27:20 by qrczak]
Prelude isn't available yet.

23 years ago[project @ 2001-05-18 16:54:04 by simonmar]
simonmar [Fri, 18 May 2001 16:54:11 +0000 (16:54 +0000)]
[project @ 2001-05-18 16:54:04 by simonmar]
I/O library rewrite
-------------------

This commit replaces the old C/Haskell I/O implementation with a new
Haskell-only one using the new FFI & hsc2hs.

main points:

   - lots of code deleted: we're about 3000 lines of C lighter,
     but the amount of Haskell code is about the same.

   - performance is ok: some operations are faster, others are
     slower.  There's still some tuning to do, though.

   - the new library is designed to handle read/write streams
     much better: a read/write stream gets a special kind of
     handle internally called a "DuplexHandle", which actually
     contains two separate handles, one for writing and one for
     reading.  The upshot is that you can do simultaneous reading
     and writing to/from a socket or FIFO without any locking
     problems.  The effect is similar to calling socketToHandle
     twice, except that finalization works properly (creating
     two separate Handles could lead to the socket being closed
     too early when one of the Handles is GC'd).

   - hConnectTo and withHandleFor are gone (no one responded to
     my mail on GHC users, but we can always bring 'em back if
     necessary).

   - I made a half-hearted attempt at keeping the system-specific
     code in one place: see PrelPosix.hsc.

   - I've rearranged the I/O tests and added lots more.
     ghc/tests/lib/IO now contains Haskell 98-only IO tests,
     ghc/test/lib/{IOExts, Directory, Time} now contain tests for
     the relevant libraries.  I haven't quite finished in here yet,
     the IO tests work but the others don't yet.

   - I haven't done anything about Unicode yet, but now we can
     start to discuss what needs doing here.  The new library
     is using MutableByteArrays for its buffers because that
     turned out to be a *lot* easier (and quicker) than malloc'd
     buffers - I hope this won't cause trouble for unicode
     translations though.

WARNING: Windows users refrain from updating until we've had a chance
to fix any issues that arise.

Testing: the basic H98 stuff has been pretty thoroughly tested, but
the new duplex handle stuff is still a little green.

23 years ago[project @ 2001-05-18 14:18:34 by simonmar]
simonmar [Fri, 18 May 2001 14:18:34 +0000 (14:18 +0000)]
[project @ 2001-05-18 14:18:34 by simonmar]
Allow unboxing strict fields through newtypes.

23 years ago[project @ 2001-05-18 09:18:05 by simonmar]
simonmar [Fri, 18 May 2001 09:18:05 +0000 (09:18 +0000)]
[project @ 2001-05-18 09:18:05 by simonmar]
Remove more ugen droppings.

23 years ago[project @ 2001-05-18 09:16:59 by simonmar]
simonmar [Fri, 18 May 2001 09:16:59 +0000 (09:16 +0000)]
[project @ 2001-05-18 09:16:59 by simonmar]
Remove lingering stains left by ugen.

23 years ago[project @ 2001-05-18 09:14:42 by simonmar]
simonmar [Fri, 18 May 2001 09:14:42 +0000 (09:14 +0000)]
[project @ 2001-05-18 09:14:42 by simonmar]
use HSC2HS_OPTS

23 years ago[project @ 2001-05-18 09:14:20 by simonmar]
simonmar [Fri, 18 May 2001 09:14:20 +0000 (09:14 +0000)]
[project @ 2001-05-18 09:14:20 by simonmar]
Add HSC2HS_OPTS

23 years ago[project @ 2001-05-18 08:49:27 by simonpj]
simonpj [Fri, 18 May 2001 08:49:27 +0000 (08:49 +0000)]
[project @ 2001-05-18 08:49:27 by simonpj]
Add a test for -funbox-strict-fields

23 years ago[project @ 2001-05-18 08:46:18 by simonpj]
simonpj [Fri, 18 May 2001 08:46:22 +0000 (08:46 +0000)]
[project @ 2001-05-18 08:46:18 by simonpj]
-----------------------------
Get unbox-strict-fields right
-----------------------------

The problem was that when a library was compiled *without* -funbox-strict-fields,
and the main program was compiled *with* that flag, we were wrongly treating
the fields of imported data types as unboxed.

To fix this I added an extra constructor to StrictnessMark to express whether
the "!" annotation came from an interface file (don't fiddle) or a source
file (decide whether to unbox).

On the way I tided things up:

* StrictnessMark moves to Demand.lhs, and doesn't have the extra DataCon
  fields that kept it in DataCon before.

* HsDecls.BangType has one constructor, not three, with a StrictnessMark field.

* DataCon keeps track of its strictness signature (dcRepStrictness), but not
  its "user strict marks" (which were never used)

* All the functions, like getUniquesDs, that used to take an Int saying how
  many uniques to allocate, now return an infinite list. This saves arguments
  and hassle.  But it involved touching quite a few files.

* rebuildConArgs takes a list of Uniques to use as its unique supply.  This
  means I could combine DsUtils.rebuildConArgs with MkId.rebuildConArgs
  (hooray; the main point of the previous change)

I also tidied up one or two error messages

23 years ago[project @ 2001-05-18 07:51:42 by simonpj]
simonpj [Fri, 18 May 2001 07:51:42 +0000 (07:51 +0000)]
[project @ 2001-05-18 07:51:42 by simonpj]
**** MERGE WITH 5.00.1 BRANCH *****

Fix an obscure core-to-stg bug.  Type arguments were
being counted as value arguments when computing whether
a function was saturated, with consequent confusion.

23 years ago[project @ 2001-05-16 12:49:59 by simonmar]
simonmar [Wed, 16 May 2001 12:49:59 +0000 (12:49 +0000)]
[project @ 2001-05-16 12:49:59 by simonmar]
Fix a bug in the unfolding for a record selector which caused problems
with -funbox-strict-fields.

MERGE with 5.00 (after testing etc. etc.)

23 years ago[project @ 2001-05-16 12:44:20 by simonpj]
simonpj [Wed, 16 May 2001 12:44:20 +0000 (12:44 +0000)]
[project @ 2001-05-16 12:44:20 by simonpj]
Import Double when necessary to make defaulting work

23 years ago[project @ 2001-05-16 11:36:05 by simonmar]
simonmar [Wed, 16 May 2001 11:36:05 +0000 (11:36 +0000)]
[project @ 2001-05-16 11:36:05 by simonmar]
Fix for a bug which affects record updates when the record has strict
unboxed fields (i.e. -funbox-strict-fields is on).

MERGE with 5.00 (after testing, and if it can be done before the release)

23 years ago[project @ 2001-05-16 09:57:02 by rrt]
rrt [Wed, 16 May 2001 09:57:02 +0000 (09:57 +0000)]
[project @ 2001-05-16 09:57:02 by rrt]
Filter -mwin32 from CC_OPTS.

23 years ago[project @ 2001-05-16 09:55:27 by rrt]
rrt [Wed, 16 May 2001 09:55:27 +0000 (09:55 +0000)]
[project @ 2001-05-16 09:55:27 by rrt]
Add -mwin32 to CFLAGS for win32.