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

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

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

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

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

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

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

22 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

22 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

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

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

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

22 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

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

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

22 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

22 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

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

22 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

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

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

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

22 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

22 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

22 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

22 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

22 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

22 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

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

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

22 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

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

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

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

22 years ago[project @ 2001-05-16 09:46:43 by rrt]
rrt [Wed, 16 May 2001 09:46:43 +0000 (09:46 +0000)]
[project @ 2001-05-16 09:46:43 by rrt]
Move global options for utilities here.

22 years ago[project @ 2001-05-16 09:40:11 by sewardj]
sewardj [Wed, 16 May 2001 09:40:11 +0000 (09:40 +0000)]
[project @ 2001-05-16 09:40:11 by sewardj]
Add enough entries to RTS_MINGW_ONLY_SYMBOLS to make packages
{std lang concurrent util data text} work.  Also add a proper fix
to this using GetModuleHandle(NULL); unfortunately it doesn't
work for some unknown reason.

22 years ago[project @ 2001-05-15 19:57:08 by sof]
sof [Tue, 15 May 2001 19:57:08 +0000 (19:57 +0000)]
[project @ 2001-05-15 19:57:08 by sof]
-fglasgow-exts doesn't seem to imply -package data anymore -- add it to HC_OPTS

22 years ago[project @ 2001-05-15 19:54:46 by sof]
sof [Tue, 15 May 2001 19:54:46 +0000 (19:54 +0000)]
[project @ 2001-05-15 19:54:46 by sof]
Use LD_OPTS when linking the test binary

22 years ago[project @ 2001-05-15 15:29:03 by sewardj]
sewardj [Tue, 15 May 2001 15:29:03 +0000 (15:29 +0000)]
[project @ 2001-05-15 15:29:03 by sewardj]
Fix up the PEi386 linker well enough for ghci to start and function
on Win32.  Two potential problems still to be fixed properly:

* ocGetNames_PEi386 doesn't copy local syms into oc's local symtab,
  and it probably should (since the ELF one does).  Easy to fix.

* I can't figure out how to read syms in the executable itself
  on Win32.  This problem is solved properly for Unix-ELF by doing
  dlopen(NULL).  Here I have kludged it using RTS_MINGW_ONLY_SYMBOLS,
  but this is not a good long-term solution.

22 years ago[project @ 2001-05-15 15:01:48 by sewardj]
sewardj [Tue, 15 May 2001 15:01:48 +0000 (15:01 +0000)]
[project @ 2001-05-15 15:01:48 by sewardj]
Handle leading underscores correctly, for ghci on Win32.

22 years ago[project @ 2001-05-14 16:40:54 by sewardj]
sewardj [Mon, 14 May 2001 16:40:54 +0000 (16:40 +0000)]
[project @ 2001-05-14 16:40:54 by sewardj]
Record-selector unfolding fix #2

22 years ago[project @ 2001-05-14 12:55:31 by simonpj]
simonpj [Mon, 14 May 2001 12:55:31 +0000 (12:55 +0000)]
[project @ 2001-05-14 12:55:31 by simonpj]
comment wibble

22 years ago[project @ 2001-05-14 12:55:11 by simonpj]
simonpj [Mon, 14 May 2001 12:55:11 +0000 (12:55 +0000)]
[project @ 2001-05-14 12:55:11 by simonpj]
Add DEBUG code for CgInfo field of IdInfo

22 years ago[project @ 2001-05-14 12:03:41 by simonpj]
simonpj [Mon, 14 May 2001 12:03:41 +0000 (12:03 +0000)]
[project @ 2001-05-14 12:03:41 by simonpj]
**** MERGE WITH 5.00 BRANCH     ********

-----------------------------------------------
Expose record selectors with correct unfoldings
-----------------------------------------------

The problem was that there was that with "ghc --make" we were
passing on record selectors to importing modules in their un-tidied
form.  The idea was that they have very stylised bindings so they
don't need tidying.  But they do, because they may mention error
messages that get floated out.

Here's the comment from CoreTidy.lhs

-- MINOR-HACK ALERT: we *do* tidy record selectors.  Reason: they mention error
-- messages, which may be floated out:
-- x_field pt = case pt of
-- Rect x y -> y
-- Pol _ _  -> error "buggle wuggle"
-- The error message will be floated out so we'll get
-- lvl5 = error "buggle wuggle"
-- x_field pt = case pt of
-- Rect x y -> y
-- Pol _ _  -> lvl5
--
-- When this happens, it's vital that the Id exposed to importing modules
-- (by ghci) mentions lvl5 in its unfolding, not the un-tidied version.
--
-- What about the Id in the TyCon?  It probably shouldn't be in the TyCon at
-- all, but in any case it will have the error message inline so it won't matter.

22 years ago[project @ 2001-05-14 10:20:58 by sewardj]
sewardj [Mon, 14 May 2001 10:20:58 +0000 (10:20 +0000)]
[project @ 2001-05-14 10:20:58 by sewardj]
Change wording of panic message on encountering unboxed tuples to:

        Bytecode generator can't handle unboxed tuples.  Possibly due
        to foreign import/export decls in source.  Workaround:
        compile this module to a .o file, then restart session.

22 years ago[project @ 2001-05-10 22:55:27 by sof]
sof [Thu, 10 May 2001 22:55:27 +0000 (22:55 +0000)]
[project @ 2001-05-10 22:55:27 by sof]
Make lndir work with (current) cygwin impls + support the use of DOS-like paths (e.g, 'f:/oo')

22 years ago[project @ 2001-05-10 09:51:28 by rrt]
rrt [Thu, 10 May 2001 09:51:28 +0000 (09:51 +0000)]
[project @ 2001-05-10 09:51:28 by rrt]
Enhanced. Probably not to be used now, though.

22 years ago[project @ 2001-05-10 09:00:28 by simonmar]
simonmar [Thu, 10 May 2001 09:00:28 +0000 (09:00 +0000)]
[project @ 2001-05-10 09:00:28 by simonmar]
typo in error msg, pointed out by Alastair Reid.

22 years ago[project @ 2001-05-09 13:48:18 by simonmar]
simonmar [Wed, 9 May 2001 13:48:18 +0000 (13:48 +0000)]
[project @ 2001-05-09 13:48:18 by simonmar]
Add test for pattern parse errors, in particular getting the line
number right (4.08.2 didn't).

22 years ago[project @ 2001-05-09 13:46:29 by simonpj]
simonpj [Wed, 9 May 2001 13:46:29 +0000 (13:46 +0000)]
[project @ 2001-05-09 13:46:29 by simonpj]
Fix bug in spec-constr rule generation [Sergei2]

22 years ago[project @ 2001-05-09 13:28:11 by simonpj]
simonpj [Wed, 9 May 2001 13:28:11 +0000 (13:28 +0000)]
[project @ 2001-05-09 13:28:11 by simonpj]
**** MERGE WITH 5.00 BRANCH     ********

-------------------------------
Fix a rather obscure rule bogon
-------------------------------

The problem was that there was

class Foo a where
  op :: a -> a

{-# RULES "op" op x = x #-}

or something like that.  We attach locally defined rules, like this one,
to the local binding, in SimplCore.prepareRules.  Alas op doesn't reply
"True" to isLocalId, because it's a class selector (so it's a GlobalId
throughout).   Result: we treated the rule as an imported rule, and
therefore gave 'op' a fresh unique (becuase it looked as if it was
already in scope).  This only blew up in ghc --make or --interactive.

The handling of local vs global rules is rather unsatisfactory.
Something to muse on.

22 years ago[project @ 2001-05-09 13:05:07 by simonpj]
simonpj [Wed, 9 May 2001 13:05:07 +0000 (13:05 +0000)]
[project @ 2001-05-09 13:05:07 by simonpj]
Fix yesterdays bogons in parsing do-expressions; MERGE IN BRANCH

22 years ago[project @ 2001-05-09 13:04:30 by simonpj]
simonpj [Wed, 9 May 2001 13:04:30 +0000 (13:04 +0000)]
[project @ 2001-05-09 13:04:30 by simonpj]
Remove unused fn getContext

22 years ago[project @ 2001-05-09 09:55:41 by simonmar]
simonmar [Wed, 9 May 2001 09:55:41 +0000 (09:55 +0000)]
[project @ 2001-05-09 09:55:41 by simonmar]
Use -hcsuf to avoid clobbering .hc files when building several ways,
and clean up the -osuf usage (put all the suffix-changing options in
one place).

22 years ago[project @ 2001-05-09 09:43:44 by simonmar]
simonmar [Wed, 9 May 2001 09:43:44 +0000 (09:43 +0000)]
[project @ 2001-05-09 09:43:44 by simonmar]
Document -hcsuf option

22 years ago[project @ 2001-05-09 09:38:18 by simonmar]
simonmar [Wed, 9 May 2001 09:38:18 +0000 (09:38 +0000)]
[project @ 2001-05-09 09:38:18 by simonmar]
Add a new option: -hcsuf <suffix> which renames the .hc suffix to
<suffix> for this compilation, in the same way as -osuf and -hisuf.

To even things up, remove partial support for '-ohi -', which
allegedly dumped the .hi file to stdout but in reality never worked.
It's a strange thing to want to do anyway, but in any case you could
always say '-ohi /dev/stdout', or even 'ghc Foo.hs && cat Foo.hi'.

23 years ago[project @ 2001-05-08 17:33:57 by qrczak]
qrczak [Tue, 8 May 2001 17:33:57 +0000 (17:33 +0000)]
[project @ 2001-05-08 17:33:57 by qrczak]
Fix typo when times() is used.
Move foreign imports inside appropriate #ifdefs.

A small problem remained (besides Win32): For hpux getrusage is defined
here as a macro, and foreign importing a macro relies on compilation
via C. Should be wrapped in a function, but I'm not sure if it's safe
to call it getrusage.

23 years ago[project @ 2001-05-08 16:47:25 by sewardj]
sewardj [Tue, 8 May 2001 16:47:25 +0000 (16:47 +0000)]
[project @ 2001-05-08 16:47:25 by sewardj]
Insert interim fix in the bytecode gen to ignore polymorphic case
for the time being.  I can't see any way to fix it right in the
timescale before 5.00.1 goes out.  This works well enough to
make Sergei's DoCon thing run on the interpreter without segfaults.

   -- Nasty hack; treat
   --     case scrut::suspect of bndr { DEFAULT -> rhs }
   --     as
   --     let bndr = scrut in rhs
   --     when suspect is polymorphic or arrowtyped
   -- So the required strictness properties are not observed.
   -- At some point, must fix this properly.

23 years ago[project @ 2001-05-08 16:25:30 by simonpj]
simonpj [Tue, 8 May 2001 16:25:30 +0000 (16:25 +0000)]
[project @ 2001-05-08 16:25:30 by simonpj]
Fix braino

23 years ago[project @ 2001-05-08 14:54:58 by rrt]
rrt [Tue, 8 May 2001 14:54:58 +0000 (14:54 +0000)]
[project @ 2001-05-08 14:54:58 by rrt]
fixdll.pl renamed decyg.pl, for greater justice.
runexe.c added: it's a little Windows program which takes a command line and
runs it, without any connection to the parent process. This allows cygwin
binaries to be run against our patched cygwin1.dll (under a pseudonym),
without any connection being made if the parent process is also Cygwinised.

23 years ago[project @ 2001-05-08 14:44:37 by simonpj]
simonpj [Tue, 8 May 2001 14:44:38 +0000 (14:44 +0000)]
[project @ 2001-05-08 14:44:37 by simonpj]
**** MERGE WITH 5.00 BRANCH     ********

--------------------------------------
Make parallel list comprehensions work
--------------------------------------

There were two bugs

1.  The desugaring in DsListComp was generating code that failed Lint.
    I've restructured it quite a lot.

2.  More seriously, in a ParStmt, the last 'stmt' may be a guard;
    but previously both guards and the result of a list comprehension
    were encoded as an ExprStmt (see HsExpr.Stmt), using the fact that
    the stmt was last in the list to make the difference between a guard
    and a result.  But in parallel list comp this isn't right:

[ e | x <- xs, guard | y <- ys ]

    Here 'guard' is last in its list, but isn't an overall result.

    The sensible fix is to properly distinguish
"here's the answer"   (ResultStmt)
"here's a guard or an imperative action" (ExprStmt)

    The fix is rather easy, but touched quite a lot of files.  On the
    way I tidied up the parser a little.

23 years ago[project @ 2001-05-08 14:39:27 by simonpj]
simonpj [Tue, 8 May 2001 14:39:27 +0000 (14:39 +0000)]
[project @ 2001-05-08 14:39:27 by simonpj]
Add parallel list comp test

23 years ago[project @ 2001-05-08 14:33:01 by simonmar]
simonmar [Tue, 8 May 2001 14:33:01 +0000 (14:33 +0000)]
[project @ 2001-05-08 14:33:01 by simonmar]
oops, backout accidentally committed changes

23 years ago[project @ 2001-05-08 11:55:24 by simonmar]
simonmar [Tue, 8 May 2001 11:55:24 +0000 (11:55 +0000)]
[project @ 2001-05-08 11:55:24 by simonmar]
Fix setSrcLocP

23 years ago[project @ 2001-05-08 11:07:30 by simonmar]
simonmar [Tue, 8 May 2001 11:07:30 +0000 (11:07 +0000)]
[project @ 2001-05-08 11:07:30 by simonmar]
oops, remove debugging output

23 years ago[project @ 2001-05-08 10:58:48 by simonmar]
simonmar [Tue, 8 May 2001 10:58:48 +0000 (10:58 +0000)]
[project @ 2001-05-08 10:58:48 by simonmar]
Add

DriverPhases.haskellish_src_suffix :: String -> Bool
DriverPhases.haskellish_src_file   :: String -> Bool

which return True for suffixes of Haskell source files only.  The
existing haskellish_suffix and haskellish_file return True also for
.raw_s and .hc files.

We use these instead of haskellish_file in Main.main when deciding
whether to preprocess a file.

Fixes: compilation of .raw_s files, and potential bugs with
compilation of .hc files.

23 years ago[project @ 2001-05-08 08:55:17 by simonmar]
simonmar [Tue, 8 May 2001 08:55:18 +0000 (08:55 +0000)]
[project @ 2001-05-08 08:55:17 by simonmar]
Drop in CPUTime library replacement.  Still needs to be ported to
Win32.

23 years ago[project @ 2001-05-07 20:23:24 by sof]
sof [Mon, 7 May 2001 20:23:24 +0000 (20:23 +0000)]
[project @ 2001-05-07 20:23:24 by sof]
Extraneous -O

23 years ago[project @ 2001-05-07 16:19:36 by sof]
sof [Mon, 7 May 2001 16:19:36 +0000 (16:19 +0000)]
[project @ 2001-05-07 16:19:36 by sof]
couple of bugfixes to make the script do its thing

23 years ago[project @ 2001-05-07 16:18:49 by sof]
sof [Mon, 7 May 2001 16:18:49 +0000 (16:18 +0000)]
[project @ 2001-05-07 16:18:49 by sof]
support for building .pdf docs

23 years ago[project @ 2001-05-07 14:38:15 by simonmar]
simonmar [Mon, 7 May 2001 14:38:15 +0000 (14:38 +0000)]
[project @ 2001-05-07 14:38:15 by simonmar]
Give slightly more accurate line numbers for certain pattern parse errors.

23 years ago[project @ 2001-05-07 14:37:00 by simonmar]
simonmar [Mon, 7 May 2001 14:37:00 +0000 (14:37 +0000)]
[project @ 2001-05-07 14:37:00 by simonmar]
add
setSrcLocP :: SrcLoc -> P a -> P a

23 years ago[project @ 2001-05-07 11:42:31 by simonmar]
simonmar [Mon, 7 May 2001 11:42:31 +0000 (11:42 +0000)]
[project @ 2001-05-07 11:42:31 by simonmar]
typo in Word64 code pointed out by Alastair Reid.

23 years ago[project @ 2001-05-04 16:36:38 by simonmar]
simonmar [Fri, 4 May 2001 16:36:38 +0000 (16:36 +0000)]
[project @ 2001-05-04 16:36:38 by simonmar]
comment explaining why we check the perms on . before reading ./.ghci.

23 years ago[project @ 2001-05-04 15:18:00 by simonmar]
simonmar [Fri, 4 May 2001 15:18:00 +0000 (15:18 +0000)]
[project @ 2001-05-04 15:18:00 by simonmar]
.raw_s is a haskellish_suffix.

23 years ago[project @ 2001-05-04 15:12:16 by simonmar]
simonmar [Fri, 4 May 2001 15:12:16 +0000 (15:12 +0000)]
[project @ 2001-05-04 15:12:16 by simonmar]
document :set -package

23 years ago[project @ 2001-05-04 14:56:53 by simonmar]
simonmar [Fri, 4 May 2001 14:56:53 +0000 (14:56 +0000)]
[project @ 2001-05-04 14:56:53 by simonmar]
- only read ~/.ghci if it is owned by the current user and isn't
  writable by anyone else.

- Only read ./.ghci if both . and ./.ghci are owned by the current
  user and aren't writable by anyone else.  I think this is
  sufficient: we don't need to check .. and ../.. etc. because "."
  always refers to the same directory while a process is running.

- Don't load .so libraries in a package if that package is already
  linked with GHCi.  This stops us re-linking libm, libreadline etc.

- Allow packages to be loaded from within GHCi using
:set -package <name>
  NOTE: this will unload all modules currently loaded into the
  interpreter.  I did this to be on the safe side - I think perhaps
  it isn't necessary, but I haven't thought it through fully yet.

- fix CompManager.cmUnload in the process.  It was wrong in several
  ways.

MERGE WITH 5.00

23 years ago[project @ 2001-05-04 14:53:44 by simonpj]
simonpj [Fri, 4 May 2001 14:53:44 +0000 (14:53 +0000)]
[project @ 2001-05-04 14:53:44 by simonpj]
Add mutual recursion between types test

23 years ago[project @ 2001-05-04 14:44:07 by simonpj]
simonpj [Fri, 4 May 2001 14:44:07 +0000 (14:44 +0000)]
[project @ 2001-05-04 14:44:07 by simonpj]
Add more TC tracing

23 years ago[project @ 2001-05-04 14:43:49 by simonmar]
simonmar [Fri, 4 May 2001 14:43:49 +0000 (14:43 +0000)]
[project @ 2001-05-04 14:43:49 by simonmar]
touch# should be declared to have_side_effects.  This fixes the
remaining problem with safe foreign imports and ForeignPtrs.

23 years ago[project @ 2001-05-04 14:43:26 by simonpj]
simonpj [Fri, 4 May 2001 14:43:26 +0000 (14:43 +0000)]
[project @ 2001-05-04 14:43:26 by simonpj]
**** MERGE WITH 5.00 BRANCH     ********

--------------------------------
Fix a black hole when type checking type decls
--------------------------------

GHC was falling into a black hole when type checking a recursive
group of type declarations including a chain of type synonyms.

  type PhraseFun = PMap -> Float
  type PMap      = () -> Player
  data Player    = P.MkT P.PhraseFun

Reason: too much consistency checking in TcMonoType.
Easily fixed using the existing wimp_out hack, but it's a mess.
This commit fixes it for the 5.00 branch but I'll do something
better in the head shortly.

23 years ago[project @ 2001-05-04 14:40:42 by simonpj]
simonpj [Fri, 4 May 2001 14:40:42 +0000 (14:40 +0000)]
[project @ 2001-05-04 14:40:42 by simonpj]
Comments only

23 years ago[project @ 2001-05-04 14:23:52 by rrt]
rrt [Fri, 4 May 2001 14:23:52 +0000 (14:23 +0000)]
[project @ 2001-05-04 14:23:52 by rrt]
Script to change "cygwin1.dll" to something else, so that we can have our
own version of the cygwin DLL that doesn't clash with any installed DLLs,
for great justice.

23 years ago[project @ 2001-05-04 13:21:05 by simonmar]
simonmar [Fri, 4 May 2001 13:21:05 +0000 (13:21 +0000)]
[project @ 2001-05-04 13:21:05 by simonmar]
add
flushPackageCache :: [PackageConfig] -> IO ()

for modifying the list of available packages.