sewardj [Wed, 7 Feb 2001 12:15:30 +0000 (12:15 +0000)]
[project @ 2001-02-07 12:15:30 by sewardj]
Make compatible with 4.08.2 (add [ ] in forall).
simonmar [Wed, 7 Feb 2001 11:53:00 +0000 (11:53 +0000)]
[project @ 2001-02-07 11:53:00 by simonmar]
Don't re-link interpreted modules if they haven't changed. Now :r is
almost instantaneous when nothing changes (as it should be).
simonmar [Wed, 7 Feb 2001 11:48:10 +0000 (11:48 +0000)]
[project @ 2001-02-07 11:48:10 by simonmar]
wibble
simonmar [Wed, 7 Feb 2001 11:45:19 +0000 (11:45 +0000)]
[project @ 2001-02-07 11:45:19 by simonmar]
don't re-summarise a module if its source hasn't changed.
simonmar [Wed, 7 Feb 2001 10:45:43 +0000 (10:45 +0000)]
[project @ 2001-02-07 10:45:43 by simonmar]
the interactive environment now reads commands from ./.ghci followed
by ~/.ghci.
simonmar [Tue, 6 Feb 2001 17:31:00 +0000 (17:31 +0000)]
[project @ 2001-02-06 17:31:00 by simonmar]
Qualified names on the command line may now refer to any exported
entity from any module, not just entities from the "original" defining
module.
eg. "IO.hFlush IO.stdout" now works.
There's still a problem in that home interfaces may be demand-loaded
if they're aren't already in memory, which is wrong (you can refer to
a module which isn't loaded, causing things to fall over at link
time).
simonmar [Tue, 6 Feb 2001 16:22:12 +0000 (16:22 +0000)]
[project @ 2001-02-06 16:22:12 by simonmar]
allow comments on the command line: convenient in scripts
simonmar [Tue, 6 Feb 2001 14:44:53 +0000 (14:44 +0000)]
[project @ 2001-02-06 14:44:53 by simonmar]
strdup(), and later free(), the filename passed in via loadObj.
Yet another bug bites the dust.
simonmar [Tue, 6 Feb 2001 14:01:22 +0000 (14:01 +0000)]
[project @ 2001-02-06 14:01:22 by simonmar]
oops, filterNameMap was the wrong way around (or I was using wrong).
It should *keep* the named modules, not throw them away.
simonmar [Tue, 6 Feb 2001 12:27:57 +0000 (12:27 +0000)]
[project @ 2001-02-06 12:27:57 by simonmar]
oops, forgot to remove the object from the linked list when we unload it.
sewardj [Tue, 6 Feb 2001 12:09:42 +0000 (12:09 +0000)]
[project @ 2001-02-06 12:09:42 by sewardj]
Check the context_switch flag and yield if set, so that interpreted
code behaves properly in a multi(haskell)threaded environment.
simonmar [Tue, 6 Feb 2001 12:03:10 +0000 (12:03 +0000)]
[project @ 2001-02-06 12:03:10 by simonmar]
Try to get the stable modules story right. Things now work much
better: objects aren't unloaded and reloaded unnecessarily, and
compiling modules from with GHCi works:
> :! ghc -c A.hs
> :r
Compiling A ... compilation IS NOT required (using ./A.o)
Compiling B ... compilation IS NOT required
Compiling C ... compilation IS NOT required
Compiling Main ... compilation IS NOT required
Compiled module must not depend on interpreted modules, but we
currently don't enforce this restriction properly.
sewardj [Tue, 6 Feb 2001 12:02:05 +0000 (12:02 +0000)]
[project @ 2001-02-06 12:02:05 by sewardj]
Implement implicit and explicit stack checks. For details, see recent
commit message for ghc/compiler/ghci/ByteCodeGen.lhs.
sewardj [Tue, 6 Feb 2001 12:01:00 +0000 (12:01 +0000)]
[project @ 2001-02-06 12:01:00 by sewardj]
Add bci_STKCHECK and INTERP_STACK_CHECK_THRESH.
sewardj [Tue, 6 Feb 2001 12:00:17 +0000 (12:00 +0000)]
[project @ 2001-02-06 12:00:17 by sewardj]
Support stack overflow checks in interpreted code. The deal is:
* If a BCO is reckoned to need less than iNTERP_STACK_CHECK_THRESH
words of stack, no stack check insn is added.
* If a BCO needs >= iNTERP_STACK_CHECK_THRESH words, an explicit
check insn is added.
The interpreter ensures at least iNTERP_STACK_CHECK_THRESH words of
stack are available before running each BCO, regardless of whether or
not the BCO contains an explicit check insn too.
By setting iNTERP_STACK_CHECK_THRESH to a suitably large level
(currently 50), most BCOs only require the implicit stack check, which
avoids the overhead of decoding one extra insn per BCO. BCOs which do
have a stack check insn then do 2 stack checks rather than 1
(implicit, then explicit), but this is rare enough that we don't care.
simonmar [Tue, 6 Feb 2001 11:57:30 +0000 (11:57 +0000)]
[project @ 2001-02-06 11:57:30 by simonmar]
- CAF reversion: CAFs are reverted on a load or reload. They can
optionally be reverted after every evaluation, with :set +r.
- we now compile the "hFlush stdout/stderr" expressions once and
for all at startup, and just run them after each evaluation. This
has the pleasant side effect of causing the Prelude to be read in
before any expressions are typed, causing GHCi to seem more
responsive.
simonmar [Tue, 6 Feb 2001 11:42:30 +0000 (11:42 +0000)]
[project @ 2001-02-06 11:42:30 by simonmar]
urk! when showing a handle, we don't replace the MVar. For example,
the following test causes a deadlock:
main = do
getContents
catch getChar (\e -> print e >> return 'x')
catch getChar (\e -> print e >> return 'x')
To be merged into 4.08.
rrt [Tue, 6 Feb 2001 11:41:04 +0000 (11:41 +0000)]
[project @ 2001-02-06 11:41:04 by rrt]
Corrected comment according to code.
sewardj [Tue, 6 Feb 2001 10:37:23 +0000 (10:37 +0000)]
[project @ 2001-02-06 10:37:23 by sewardj]
When linking a bytecode module, only add top-level (isGlobalName)
bindings into the returned augmented closure env.
qrczak [Mon, 5 Feb 2001 22:02:18 +0000 (22:02 +0000)]
[project @ 2001-02-05 22:02:18 by qrczak]
Works under Linux again - Posix was not needed.
rrt [Mon, 5 Feb 2001 18:01:39 +0000 (18:01 +0000)]
[project @ 2001-02-05 18:01:39 by rrt]
Make it work on Windows.
rrt [Mon, 5 Feb 2001 17:58:06 +0000 (17:58 +0000)]
[project @ 2001-02-05 17:58:06 by rrt]
Make sure config.h is included to garner vital symbols.
rrt [Mon, 5 Feb 2001 17:52:49 +0000 (17:52 +0000)]
[project @ 2001-02-05 17:52:49 by rrt]
Add machdep C flags to cpp command line (for benefit of Windows, so that
-mno-cygwin is passed to cpp and the right headers are obtained).
rrt [Mon, 5 Feb 2001 17:50:26 +0000 (17:50 +0000)]
[project @ 2001-02-05 17:50:26 by rrt]
Improved comment.
sewardj [Mon, 5 Feb 2001 17:29:41 +0000 (17:29 +0000)]
[project @ 2001-02-05 17:29:41 by sewardj]
Enable (& fix) peephole optimisation. Also a couple of unhandled cases
left over from running the Galois raytracer, I think.
sewardj [Mon, 5 Feb 2001 17:27:48 +0000 (17:27 +0000)]
[project @ 2001-02-05 17:27:48 by sewardj]
Major performance improvements for the bytecode interpreter.
chak [Mon, 5 Feb 2001 11:49:20 +0000 (11:49 +0000)]
[project @ 2001-02-05 11:49:20 by chak]
Somewhere we lost the Storable instances of CFloat, CDouble and CLDouble &
removed cruft from CTypes.h.
simonmar [Mon, 5 Feb 2001 11:20:12 +0000 (11:20 +0000)]
[project @ 2001-02-05 11:20:12 by simonmar]
add some _scc_s
simonmar [Mon, 5 Feb 2001 11:18:54 +0000 (11:18 +0000)]
[project @ 2001-02-05 11:18:54 by simonmar]
linking fixes
simonmar [Mon, 5 Feb 2001 11:14:28 +0000 (11:14 +0000)]
[project @ 2001-02-05 11:14:28 by simonmar]
Add a list of objects currently loaded to the persistent linker state.
simonpj [Mon, 5 Feb 2001 08:48:25 +0000 (08:48 +0000)]
[project @ 2001-02-05 08:48:25 by simonpj]
Add (still incomplete) comment
simonpj [Mon, 5 Feb 2001 08:43:47 +0000 (08:43 +0000)]
[project @ 2001-02-05 08:43:47 by simonpj]
Add restriction comment to generics
sewardj [Thu, 1 Feb 2001 13:35:10 +0000 (13:35 +0000)]
[project @ 2001-02-01 13:35:10 by sewardj]
Fix a long-standing roaring bogon in mangleIndexTree, to do with
not-necessarily-valid assumptions about PrimRep sizes. In future all
enquiries about PrimRep sizes should go via MachMisc.primRepToSize
and/or MachMisc.sizeOf. The Lord preserve us from random, unportable
hacks in the NCG.
simonmar [Thu, 1 Feb 2001 12:37:44 +0000 (12:37 +0000)]
[project @ 2001-02-01 12:37:44 by simonmar]
fix problems with unloadObj
simonmar [Thu, 1 Feb 2001 11:49:32 +0000 (11:49 +0000)]
[project @ 2001-02-01 11:49:32 by simonmar]
Fix two bugs:
- the typechecker wasn't attempting to resolve all the overloading when
forcing an expression to IO type. Now typing '1' at the prompt works
again.
- the typechecker was attempting to check for Main.main even when
we had avoided recompilation of Main.
simonmar [Thu, 1 Feb 2001 11:47:53 +0000 (11:47 +0000)]
[project @ 2001-02-01 11:47:53 by simonmar]
remove unused v_ProduceHi
sewardj [Wed, 31 Jan 2001 15:38:02 +0000 (15:38 +0000)]
[project @ 2001-01-31 15:38:02 by sewardj]
Give a clause for hPutFS on UnicodeStr. Apparently only needed so that
-ddump-stix doesn't bomb when printing unicode strings.
sewardj [Wed, 31 Jan 2001 15:36:42 +0000 (15:36 +0000)]
[project @ 2001-01-31 15:36:42 by sewardj]
Un-break the x86 world following sparc byte-extend (Word8Rep) fix. Duh.
simonmar [Wed, 31 Jan 2001 12:40:51 +0000 (12:40 +0000)]
[project @ 2001-01-31 12:40:51 by simonmar]
Throw away linkables in cmUnload, as well as interfaces.
sewardj [Wed, 31 Jan 2001 12:27:25 +0000 (12:27 +0000)]
[project @ 2001-01-31 12:27:24 by sewardj]
Create PrimReps: {Int|Word}{8|16|32}Rep, for use in the native code
generator. And change the rep for character ops from Int8Rep to
Word8Rep. This fixes a bug in the sparc NCG in which chars loaded from
memory were incorrectly sign-extended to 32 bits. This problem
appeared when CharRep was turned into a 32-bit quantity, and
previous uses of it were replaced with Int8Rep, incorrectly, since
Int8Rep is signed. Also undo the kludge in the x86 section which
had (unknown to all) kept it working despite the change to Int8Rep.
sparc NCG now appears to work; hope the x86 side isn't now broken.
simonmar [Wed, 31 Jan 2001 11:04:29 +0000 (11:04 +0000)]
[project @ 2001-01-31 11:04:29 by simonmar]
Remove now-unnecessary markCAFs().
simonmar [Wed, 31 Jan 2001 11:03:21 +0000 (11:03 +0000)]
[project @ 2001-01-31 11:03:21 by simonmar]
disable the gcCAFs debugging routine on GHCi - it conflicts with
GHCi's new CAF reversion mechanism.
simonmar [Wed, 31 Jan 2001 10:12:08 +0000 (10:12 +0000)]
[project @ 2001-01-31 10:12:08 by simonmar]
fix compilation errors in #ifdef TICKY_TICKY code
simonmar [Tue, 30 Jan 2001 15:28:25 +0000 (15:28 +0000)]
[project @ 2001-01-30 15:28:25 by simonmar]
remove -hi and -nohi which haven't worked for a while. -ohi /dev/null
works just as well as -nohi.
simonmar [Tue, 30 Jan 2001 13:39:09 +0000 (13:39 +0000)]
[project @ 2001-01-30 13:39:09 by simonmar]
back out accidental change
simonmar [Tue, 30 Jan 2001 13:38:22 +0000 (13:38 +0000)]
[project @ 2001-01-30 13:38:22 by simonmar]
oops, back out accidental change
rrt [Tue, 30 Jan 2001 12:30:37 +0000 (12:30 +0000)]
[project @ 2001-01-30 12:30:37 by rrt]
Modernise Perl paragraph.
simonmar [Tue, 30 Jan 2001 12:14:02 +0000 (12:14 +0000)]
[project @ 2001-01-30 12:14:02 by simonmar]
update documentation to reflect change from _scc_ to {-# SCC ".." #-}
simonmar [Tue, 30 Jan 2001 12:13:34 +0000 (12:13 +0000)]
[project @ 2001-01-30 12:13:34 by simonmar]
Allow {-# SCC "..." #-} to be used instead of _scc_ "...". The latter
will be phased out in a couple of versions.
simonmar [Tue, 30 Jan 2001 11:13:26 +0000 (11:13 +0000)]
[project @ 2001-01-30 11:13:26 by simonmar]
Add Sigbjorn's hack to fix the Happy version test.
simonmar [Tue, 30 Jan 2001 10:59:04 +0000 (10:59 +0000)]
[project @ 2001-01-30 10:59:04 by simonmar]
put sys/types.h and sys/timeb.h includes under their own #ifdefs,
instead of all under HAVE_WINDOWS_H.
simonmar [Tue, 30 Jan 2001 10:56:55 +0000 (10:56 +0000)]
[project @ 2001-01-30 10:56:55 by simonmar]
lang package needs an undefined symbol (for deprecated rts_mkAddr)
simonmar [Tue, 30 Jan 2001 10:55:35 +0000 (10:55 +0000)]
[project @ 2001-01-30 10:55:04 by simonmar]
slight reorganisation of the -ddump-hi-diffs output
simonmar [Tue, 30 Jan 2001 10:53:22 +0000 (10:53 +0000)]
[project @ 2001-01-30 10:53:22 by simonmar]
Don't discard top-level functions in interactive mode, even if they're
not exported. When typing expressions in the context of a module, the
entire top-level scope of the module should be available.
simonmar [Tue, 30 Jan 2001 10:52:14 +0000 (10:52 +0000)]
[project @ 2001-01-30 10:52:14 by simonmar]
remove unnecessary cases in static_flags
simonmar [Tue, 30 Jan 2001 10:50:48 +0000 (10:50 +0000)]
[project @ 2001-01-30 10:50:48 by simonmar]
remove CAF List hack; the RTS has support for CAF retension and reversion.
simonpj [Tue, 30 Jan 2001 10:32:45 +0000 (10:32 +0000)]
[project @ 2001-01-30 10:32:45 by simonpj]
Fix utter bogon in OccurAnal
simonpj [Tue, 30 Jan 2001 09:53:12 +0000 (09:53 +0000)]
[project @ 2001-01-30 09:53:11 by simonpj]
More on functional dependencies
My last commit allowed this:
instance C a b => C [a] [b] where ...
if we have
class C a b | a -> b
This commit completes the change, by making the
improvement stages improve only the 'shape' of the second
argument of C.
I also had to change the iteration in TcSimplify -- see
the comments in TcSimplify.inferLoop.
simonmar [Mon, 29 Jan 2001 17:43:16 +0000 (17:43 +0000)]
[project @ 2001-01-29 17:43:16 by simonmar]
track the changes in absCSyn/PprAbsC.lhs
simonmar [Mon, 29 Jan 2001 17:25:54 +0000 (17:25 +0000)]
[project @ 2001-01-29 17:25:54 by simonmar]
a static link field is required for CAFs, now
simonmar [Mon, 29 Jan 2001 17:23:41 +0000 (17:23 +0000)]
[project @ 2001-01-29 17:23:40 by simonmar]
Remove the old Hugs CAF code, install our own (minimal, somewhat
cryptic, but better commented) CAF reversion story. See
Storage.c:newCaf() for the details.
simonmar [Mon, 29 Jan 2001 16:42:59 +0000 (16:42 +0000)]
[project @ 2001-01-29 16:42:59 by simonmar]
fix infinite loop problem in mkRecordSelId
simonpj [Mon, 29 Jan 2001 15:09:34 +0000 (15:09 +0000)]
[project @ 2001-01-29 15:09:34 by simonpj]
Remove trace
simonpj [Mon, 29 Jan 2001 14:28:06 +0000 (14:28 +0000)]
[project @ 2001-01-29 14:28:06 by simonpj]
Fix superclass bug in context reduction (gave infinite loops before!)
simonpj [Mon, 29 Jan 2001 14:27:39 +0000 (14:27 +0000)]
[project @ 2001-01-29 14:27:39 by simonpj]
Improve occurs check for synonyms => better error messages
simonpj [Mon, 29 Jan 2001 08:42:54 +0000 (08:42 +0000)]
[project @ 2001-01-29 08:42:54 by simonpj]
Be a bit more liberal about allowing instance decls through.
In particular, allow this:
instance C a b => C [a] [b] where ...
if we have
class C a b | a -> b
This is an experimental feature. Furthermore it requires a
little more work (which I have not yet done) to make improvement
work properly.
simonpj [Mon, 29 Jan 2001 08:41:09 +0000 (08:41 +0000)]
[project @ 2001-01-29 08:41:09 by simonpj]
Check class decls for validity only for source-code, not iface decls
simonpj [Mon, 29 Jan 2001 08:40:18 +0000 (08:40 +0000)]
[project @ 2001-01-29 08:40:18 by simonpj]
BinderInfo --> OccInfo (a long-awaited tidy-up)
simonmar [Sun, 28 Jan 2001 23:55:34 +0000 (23:55 +0000)]
[project @ 2001-01-28 23:55:34 by simonmar]
fix typos in new print-wrapping code
qrczak [Sun, 28 Jan 2001 20:53:38 +0000 (20:53 +0000)]
[project @ 2001-01-28 20:53:38 by qrczak]
Added rts symbols to the list:
stg_sig_install, nocldstop, createAdjustor, rts_mkInt,
rts_mkStablePtr, rts_apply, rts_evalIO, rts_checkSchedStatus,
rts_getInt, stg_sel_13_upd_info, stg_sel_14_upd_info,
stg_sel_15_upd_info.
Could the list be somehow generated automatically?
simonmar [Sun, 28 Jan 2001 19:43:01 +0000 (19:43 +0000)]
[project @ 2001-01-28 19:43:01 by simonmar]
remove old PrelHugs slime trail
simonmar [Sun, 28 Jan 2001 19:40:17 +0000 (19:40 +0000)]
[project @ 2001-01-28 19:40:17 by simonmar]
-recomp is the default, so remove it here
simonmar [Sun, 28 Jan 2001 17:15:33 +0000 (17:15 +0000)]
[project @ 2001-01-28 17:15:33 by simonmar]
fill in the export list
simonmar [Sun, 28 Jan 2001 17:14:11 +0000 (17:14 +0000)]
[project @ 2001-01-28 17:14:11 by simonmar]
- make the #ifdefs in this file less arch-specific
- support FreeBSD
- add a missing symbol (__gmpz_cmp_ui)
qrczak [Sat, 27 Jan 2001 07:46:27 +0000 (07:46 +0000)]
[project @ 2001-01-27 07:46:27 by qrczak]
Rename errno.h to ghc_errno.h.
(We could as well use hsc2hs.)
rrt [Fri, 26 Jan 2001 17:51:54 +0000 (17:51 +0000)]
[project @ 2001-01-26 17:51:54 by rrt]
Windows fixes and tidying up.
rrt [Fri, 26 Jan 2001 17:51:40 +0000 (17:51 +0000)]
[project @ 2001-01-26 17:51:40 by rrt]
Windows fixes.
simonmar [Fri, 26 Jan 2001 17:37:27 +0000 (17:37 +0000)]
[project @ 2001-01-26 17:37:27 by simonmar]
merge PersistentCmState and CmState
simonmar [Fri, 26 Jan 2001 17:29:34 +0000 (17:29 +0000)]
[project @ 2001-01-26 17:29:34 by simonmar]
Ok, don't throw away interfaces and symbol tables as part of the
pre-upsweep. This seems to fix the recompilation problems (well, some
of them anyway...).
simonmar [Fri, 26 Jan 2001 17:21:51 +0000 (17:21 +0000)]
[project @ 2001-01-26 17:21:51 by simonmar]
Greatly simplify the story about linkables, source_unchanged, and the
pre-upsweep.
Now we pre-generate the list of valid linkables; that is, for each
module if a linkable exists and is newer than the source, we keep it.
If a module has a valid linkable, then it is "source unchanged", and
it is also possibly "stable" as far as the pre-upsweep is concerned
(as long as its imports are also stable).
The pre-upsweep is no longer dependent on the mode
(interactive/batch).
There's still a bug here, though: the pre-upsweep removes old
interfaces from the HIT, so we don't get an opportunity to avoid
compilation for non-stable modules. That's the next job.
simonmar [Fri, 26 Jan 2001 17:14:58 +0000 (17:14 +0000)]
[project @ 2001-01-26 17:14:58 by simonmar]
drop spaces around commands, and fix some compilation breakage
rrt [Fri, 26 Jan 2001 16:16:19 +0000 (16:16 +0000)]
[project @ 2001-01-26 16:16:19 by rrt]
Tidy up. timeb has a millitm field, not a millitime field.
qrczak [Fri, 26 Jan 2001 16:15:00 +0000 (16:15 +0000)]
[project @ 2001-01-26 16:15:00 by qrczak]
Fix typos in comments.
qrczak [Fri, 26 Jan 2001 16:13:54 +0000 (16:13 +0000)]
[project @ 2001-01-26 16:13:54 by qrczak]
Eta-expand to avoid monomorphism restriction.
simonpj [Fri, 26 Jan 2001 15:04:16 +0000 (15:04 +0000)]
[project @ 2001-01-26 15:04:16 by simonpj]
Fix a bug that meant functions mentioned only in orphan rules were discarded
qrczak [Fri, 26 Jan 2001 14:54:52 +0000 (14:54 +0000)]
[project @ 2001-01-26 14:54:52 by qrczak]
Fix generating HS*.o: don't confuse make by changing timestamps.
simonmar [Fri, 26 Jan 2001 14:42:51 +0000 (14:42 +0000)]
[project @ 2001-01-26 14:42:51 by simonmar]
add comments about enabling GHCi in the RTS.
simonmar [Fri, 26 Jan 2001 14:40:18 +0000 (14:40 +0000)]
[project @ 2001-01-26 14:40:18 by simonmar]
don't add -DGHCI when GhcWithInterpreter is on. This needs to be done
in the compiler we're booting *from*, not the current compiler.
simonpj [Fri, 26 Jan 2001 14:36:40 +0000 (14:36 +0000)]
[project @ 2001-01-26 14:36:40 by simonpj]
More comments
simonpj [Fri, 26 Jan 2001 14:17:31 +0000 (14:17 +0000)]
[project @ 2001-01-26 14:17:31 by simonpj]
Move TEXT_BEFORE_HEAP to rts/Storage.h
simonpj [Fri, 26 Jan 2001 14:17:01 +0000 (14:17 +0000)]
[project @ 2001-01-26 14:17:01 by simonpj]
Lots of comments
simonpj [Fri, 26 Jan 2001 11:50:40 +0000 (11:50 +0000)]
[project @ 2001-01-26 11:50:39 by simonpj]
Wibbles
simonpj [Fri, 26 Jan 2001 10:01:39 +0000 (10:01 +0000)]
[project @ 2001-01-26 10:01:39 by simonpj]
Add a few new tests
simonpj [Fri, 26 Jan 2001 09:58:05 +0000 (09:58 +0000)]
[project @ 2001-01-26 09:58:05 by simonpj]
Add dupChan test
simonpj [Thu, 25 Jan 2001 17:54:26 +0000 (17:54 +0000)]
[project @ 2001-01-25 17:54:24 by simonpj]
------------------------------------
Mainly FunDeps (23 Jan 01)
------------------------------------
This commit re-engineers the handling of functional dependencies.
A functional dependency is no longer an Inst; instead, the necessary
dependencies are snaffled out of their Class when necessary.
As part of this exercise I found that I had to re-work how to do generalisation
in a binding group. There is rather exhaustive documentation on the new Plan
at the top of TcSimplify.
******************
WARNING: I have compiled all the libraries with this new compiler
and all looks well, but I have not run many programs.
Things may break. Let me know if so.
******************
The main changes are these:
1. typecheck/TcBinds and TcSimplify have a lot of changes due to the
new generalisation and context reduction story. There are extensive
comments at the start of TcSimplify
2. typecheck/TcImprove is removed altogether. Instead, improvement is
interleaved with context reduction (until a fixpoint is reached).
All this is done in TcSimplify.
3. types/FunDeps has new exports
* 'improve' does improvement, returning a list of equations
* 'grow' and 'oclose' close a list of type variables wrt a set of
PredTypes, but in slightly different ways. Comments in file.
4. I improved the way in which we check that main::IO t. It's tidier now.
In addition
* typecheck/TcMatches:
a) Tidy up, introducing a common function tcCheckExistentialPat
b) Improve the typechecking of parallel list comprehensions,
which wasn't quite right before. (see comments with tcStmts)
WARNING: (b) is untested! Jeff, you might want to check.
* Numerous other incidental changes in the typechecker
* Manuel found that rules don't fire well when you have partial applications
from overloading. For example, we may get
f a (d::Ord a) = let m_g = g a d
in
\y :: a -> ...(m_g (h y))...
The 'method' m_g doesn't get inlined because (g a d) might be a redex.
Yet a rule that looks like
g a d (h y) = ...
won't fire because that doesn't show up. One way out would be to make
the rule matcher a bit less paranoid about duplicating work, but instead
I've added a flag
-fno-method-sharing
which controls whether we generate things like m_g in the first place.
It's not clear that they are a win in the first place.
The flag is actually consulted in Inst.tcInstId
simonpj [Thu, 25 Jan 2001 17:48:27 +0000 (17:48 +0000)]
[project @ 2001-01-25 17:48:27 by simonpj]
Import edits
simonpj [Thu, 25 Jan 2001 17:47:14 +0000 (17:47 +0000)]
[project @ 2001-01-25 17:47:12 by simonpj]
A big improvement to the way command-line expressions are typechecked.
Now we don't wrap in "print" and hope for the best (the wrong "print"
might be in scope). Instead we work on the renamed epxression and
do the Right Thing by using the correct "print".
Also do generalisation, so that we get the right type back from
the :t command.
WARNING: it's possible that these files overlap with my fortcoming
Big Commit of typechecker stuff, so you may need to hang on for
a few mins.
simonpj [Thu, 25 Jan 2001 17:41:33 +0000 (17:41 +0000)]
[project @ 2001-01-25 17:41:33 by simonpj]
Improve printing
simonpj [Thu, 25 Jan 2001 17:32:42 +0000 (17:32 +0000)]
[project @ 2001-01-25 17:32:42 by simonpj]
Add comments about CafRefs
simonpj [Thu, 25 Jan 2001 17:21:59 +0000 (17:21 +0000)]
[project @ 2001-01-25 17:21:59 by simonpj]
Formatting only