ghc-hetmet.git
22 years ago[project @ 2001-05-31 11:32:25 by simonmar]
simonmar [Thu, 31 May 2001 11:32:25 +0000 (11:32 +0000)]
[project @ 2001-05-31 11:32:25 by simonmar]
- add -hidir flag to control the destination for .hi files when doing
  multiple compilations (matches -odir).

- change the ml_hi_file component of ModuleLocation from Maybe FilePath to
  FilePath.  We never made use of its Maybeness.

- clear out some unused code from the Hsc phase of run_phase and clean up
  a bit.  Fix a bug with the -ohi option at the same time (I don't think
  it works in 5.xx.x before this patch).

22 years ago[project @ 2001-05-31 11:25:51 by simonmar]
simonmar [Thu, 31 May 2001 11:25:51 +0000 (11:25 +0000)]
[project @ 2001-05-31 11:25:51 by simonmar]
If we can't read the old interface file for some reason (eg. it isn't
there, or it has the wrong version), then output the error if
-ddump-hi-diffs is on.  It used to be part of -ddump-rn-trace, but
-ddump-hi-diffs seems more logical, since it covers all the other
information about why a module is being recompiled.

22 years ago[project @ 2001-05-31 11:10:30 by simonpj]
simonpj [Thu, 31 May 2001 11:10:30 +0000 (11:10 +0000)]
[project @ 2001-05-31 11:10:30 by simonpj]
More echoes; I have no idea why we get stuck, but sometimes we do

22 years ago[project @ 2001-05-31 10:59:14 by simonmar]
simonmar [Thu, 31 May 2001 10:59:14 +0000 (10:59 +0000)]
[project @ 2001-05-31 10:59:14 by simonmar]
Fix bug in the GC info for an stg_ap_1_upd closure (it was one word too short).

22 years ago[project @ 2001-05-31 10:32:28 by sewardj]
sewardj [Thu, 31 May 2001 10:32:28 +0000 (10:32 +0000)]
[project @ 2001-05-31 10:32:28 by sewardj]
Various mingw fixes.

22 years ago[project @ 2001-05-31 10:19:49 by simonpj]
simonpj [Thu, 31 May 2001 10:19:49 +0000 (10:19 +0000)]
[project @ 2001-05-31 10:19:49 by simonpj]
Add a few more echos, to avoid anxiety in the long pause when looking for files

22 years ago[project @ 2001-05-31 10:03:35 by simonmar]
simonmar [Thu, 31 May 2001 10:03:35 +0000 (10:03 +0000)]
[project @ 2001-05-31 10:03:35 by simonmar]
- don't put a TTY into RAW mode if the handle is an output-only handle (so
  if you set stdout to NoBuffering and leave stdin as it is, you don't
  lose TTY processing on stdin).

- some cleanups.

22 years ago[project @ 2001-05-31 10:01:57 by simonmar]
simonmar [Thu, 31 May 2001 10:01:57 +0000 (10:01 +0000)]
[project @ 2001-05-31 10:01:57 by simonmar]
update expected output

22 years ago[project @ 2001-05-31 09:48:54 by sewardj]
sewardj [Thu, 31 May 2001 09:48:54 +0000 (09:48 +0000)]
[project @ 2001-05-31 09:48:54 by sewardj]
Avoid use of /dev/null on mingw.

22 years ago[project @ 2001-05-31 09:46:21 by simonpj]
simonpj [Thu, 31 May 2001 09:46:21 +0000 (09:46 +0000)]
[project @ 2001-05-31 09:46:21 by simonpj]
----------------------------------
Fix an existential-constructor bug
----------------------------------

DON'T MERGE!

This fixes a bug I introduced in my
tidying up for scoped type variables.

You'll get bizarre behaviour from the HEAD if
you use existentials, until you add this fix!

22 years ago[project @ 2001-05-31 09:37:23 by simonmar]
simonmar [Thu, 31 May 2001 09:37:23 +0000 (09:37 +0000)]
[project @ 2001-05-31 09:37:23 by simonmar]
Clarify the situation with GHCi object files, and add instructions for
building one from a .a file.

22 years ago[project @ 2001-05-31 09:28:41 by simonmar]
simonmar [Thu, 31 May 2001 09:28:41 +0000 (09:28 +0000)]
[project @ 2001-05-31 09:28:41 by simonmar]
markup wibble

22 years ago[project @ 2001-05-31 09:28:22 by simonmar]
simonmar [Thu, 31 May 2001 09:28:22 +0000 (09:28 +0000)]
[project @ 2001-05-31 09:28:22 by simonmar]
markup fixes

22 years ago[project @ 2001-05-31 09:18:34 by simonmar]
simonmar [Thu, 31 May 2001 09:18:34 +0000 (09:18 +0000)]
[project @ 2001-05-31 09:18:34 by simonmar]
Clarify where we look for libraries named on the command line (-lfoo),
and mention LD_LIBRARY_PATH.

The implementation is still wrong, however.

22 years ago[project @ 2001-05-31 09:00:28 by rrt]
rrt [Thu, 31 May 2001 09:00:28 +0000 (09:00 +0000)]
[project @ 2001-05-31 09:00:28 by rrt]
Add -mwin32 -mno-cygwin to CPPFLAGS.

22 years ago[project @ 2001-05-30 16:39:48 by sewardj]
sewardj [Wed, 30 May 2001 16:39:48 +0000 (16:39 +0000)]
[project @ 2001-05-30 16:39:48 by sewardj]
Give correct output for mingw.

22 years ago[project @ 2001-05-30 16:39:22 by sewardj]
sewardj [Wed, 30 May 2001 16:39:22 +0000 (16:39 +0000)]
[project @ 2001-05-30 16:39:22 by sewardj]
Initial mods to make the Glorious New IO Library (tm) work on mingw.
Not everything works, but is compilable, and off to a good start.

22 years ago[project @ 2001-05-30 13:20:11 by simonmar]
simonmar [Wed, 30 May 2001 13:20:11 +0000 (13:20 +0000)]
[project @ 2001-05-30 13:20:11 by simonmar]
Fix a difference between the NCG implementation of the UPD_CAF() macro
and the C version.  I think the C version was changed recently but the
NCG version never caught up.  Fixes a crash in GHCi with NCG compiled
code.

22 years ago[project @ 2001-05-30 11:09:12 by simonmar]
simonmar [Wed, 30 May 2001 11:09:12 +0000 (11:09 +0000)]
[project @ 2001-05-30 11:09:12 by simonmar]
Correct the instructions for compiling a debugging RTS (-optc isn't
needed before options in GhcRtsCcOpts any more).

22 years ago[project @ 2001-05-29 17:53:59 by sof]
sof [Tue, 29 May 2001 17:53:59 +0000 (17:53 +0000)]
[project @ 2001-05-29 17:53:59 by sof]
missing whitespaces caused touch/rm to fail

22 years ago[project @ 2001-05-29 15:37:16 by simonpj]
simonpj [Tue, 29 May 2001 15:37:16 +0000 (15:37 +0000)]
[project @ 2001-05-29 15:37:16 by simonpj]
Stuff about scoped type variables

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

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

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

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

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

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

22 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

22 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

22 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

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

22 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

22 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

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

22 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

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