simonmar [Mon, 21 Oct 2002 11:38:54 +0000 (11:38 +0000)]
[project @ 2002-10-21 11:38:53 by simonmar]
Bite the bullet and generalise the central memory allocation scheme.
Previously we tried to allocate memory starting from a fixed address,
which was set for each architecture (0x5000000 was a common one), and
to decide whether a particular address was in the heap or not we would
do a simple comparison against this address.
This doesn't work too well, because:
- if we dynamically-load some objects above the boundary, the
heap-allocated test becomes invalid
- on windows we have less control, and the heap might be
split into multiple sections
- it turns out that on some Linux kernels we don't get memory where
we asked for it. This might be a bug in those kernels, but it
exposes the fragility of our allocation scheme.
The solution is to bite the bullet and maintain a table mapping
addresses to a value indicating whether that address is in the heap or
not. Since we normally allocate heap in chunks of 1Mb, the table is
quite small: 4k on a 32-bit machine, using one byte for each 1Mb
block. Testing an address for heap residency now involves a memory
access, but the table is normally cache-resident. I didn't manage to
measure any slowdown after making the change.
On a 64-bit machine, we'll need to use a 2-level table; I haven't
implemented that yet.
Now we can generalise the procedure used to grab memory from the OS.
In the general case, we allocate one megablock more than we need to,
and trim off the slop around the allocation to leave an aligned chunk.
The next time around, however, we try to allocate memory right after
the last chunk allocated, on the grounds that it is aligned and
probably free: if this doesn't work, we have to back off to the
general mechanism (it seems to work most of the time).
This cleans up the Windows story too: is_heap_alloced() has gone, and
we should be able to handle more than 256M of memory (or whatever the
arbitrary limit was before).
MERGE TO STABLE (after lots of testing)
stolz [Sat, 19 Oct 2002 10:42:24 +0000 (10:42 +0000)]
[project @ 2002-10-19 10:42:23 by stolz]
Retro Police: There are hosts w/o in_addr_t (e.g. SuSE 7.0)
simonpj [Fri, 18 Oct 2002 13:41:55 +0000 (13:41 +0000)]
[project @ 2002-10-18 13:41:50 by simonpj]
--------------------------------
Fix a serious error in the "newtype deriving" feature
--------------------------------
The "newtype deriving" feature lets you derive arbitrary classes for
a newtype, not just the built-in ones (Read, Show, Ix etc). It's very
cool, but Hal Duame discovered that it did utterly the Wrong Thing
for superclasses. E.g.
newtype Foo = MkFoo Int deriving( Show, Num, Eq )
You'd get a Num instance for Foo that was *identical* to the
Num instance for Int, *including* the Show superclass. So the
superclass in the Num dictionary would show a Foo just like an
Int, which is wrong... it should show as "Foo n".
This commit fixes the problem, by building a new dictionary every time,
but using the methods from the dictionary for the representation type.
I also fixed a bug that prevented it working altogether when the
representation type was not the application of a type constructor.
For example, this now works
newtype Foo a = MkFoo a deriving( Num, Eq, Show )
I also made it a bit more efficient in the case where the type is
not parameterised. Then the "dfun" doesn't need to be a function.
simonpj [Fri, 18 Oct 2002 13:36:17 +0000 (13:36 +0000)]
[project @ 2002-10-18 13:36:17 by simonpj]
Add a trace
simonpj [Fri, 18 Oct 2002 13:35:47 +0000 (13:35 +0000)]
[project @ 2002-10-18 13:35:46 by simonpj]
Import wibbles
simonmar [Fri, 18 Oct 2002 10:16:04 +0000 (10:16 +0000)]
[project @ 2002-10-18 10:16:04 by simonmar]
Add the Haskell Web Server to the fptools repository so I can give it
a proper license.
simonmar [Fri, 18 Oct 2002 09:51:04 +0000 (09:51 +0000)]
[project @ 2002-10-18 09:51:03 by simonmar]
Add atomicModifyIORef, as discussed on the FFI list.
simonmar [Fri, 18 Oct 2002 09:36:21 +0000 (09:36 +0000)]
[project @ 2002-10-18 09:36:21 by simonmar]
Add a note about the profiling versions of the interface files in a package.
simonmar [Thu, 17 Oct 2002 14:49:52 +0000 (14:49 +0000)]
[project @ 2002-10-17 14:49:52 by simonmar]
- Don't flush the finder cache after adding a new package. We'll
assume that packages don't overlap.
- Add the extra command-line flags specified by a package when we
add a package from the GHCi prompt.
simonmar [Thu, 17 Oct 2002 14:26:19 +0000 (14:26 +0000)]
[project @ 2002-10-17 14:26:16 by simonmar]
Finder overhaul.
The finder had got pretty complicated; this commit is mainly a
cleanup, with one new feature:
- the finder has a cache (again). The cache may be flushed by
calling flushFinderCache, which actually only flushes home modules
from the cache, because package modules are assumed not to move.
This change is apropos of some other changes which will result in
the finder being called more often, so we think a cache is going
to be worthwhile.
Also a couple of bugs were fixed:
- the field ml_hi_file in a ModLocation is now *always* the name
of the .hi file. If you need a .hi-boot file, you have to make
it up by changing the suffix of ml_hi_file. (DriverMkDepend and
RnHiFiles do this). This was the cause of a bug, but I can't
remember the details.
- The -odir flag now works in a more reasonable way: hierarchical
modules get put in subdirectories of the -odir directory. eg.
if your module is A.B.C, and -odir D is specified, then the object
will be D/A/B/C.o; previously it would have been D/C.o.
simonmar [Tue, 15 Oct 2002 13:20:18 +0000 (13:20 +0000)]
[project @ 2002-10-15 13:20:18 by simonmar]
beginMake: separate out compilation-manager inputs from linkable
objects in a way that is more consistent with the one-shot compilation
mode. Specifically, we now pass anything that looks like a module
name or a Haskell source filename to the compilation manager, and
everything else to the linker.
MERGE TO STABLE
simonmar [Tue, 15 Oct 2002 13:18:51 +0000 (13:18 +0000)]
[project @ 2002-10-15 13:18:51 by simonmar]
Remove looksLikeModuleName, it is defined in Util now.
simonmar [Tue, 15 Oct 2002 13:17:40 +0000 (13:17 +0000)]
[project @ 2002-10-15 13:17:40 by simonmar]
Move looksLikeModuleName here from InterativeUI, so we can use it elsewhere.
simonmar [Tue, 15 Oct 2002 12:56:03 +0000 (12:56 +0000)]
[project @ 2002-10-15 12:56:03 by simonmar]
wibble
simonmar [Tue, 15 Oct 2002 12:38:30 +0000 (12:38 +0000)]
[project @ 2002-10-15 12:38:30 by simonmar]
wibble
simonmar [Tue, 15 Oct 2002 12:04:05 +0000 (12:04 +0000)]
[project @ 2002-10-15 12:04:05 by simonmar]
Don't use stdPackage (it has gone)
simonpj [Tue, 15 Oct 2002 11:52:32 +0000 (11:52 +0000)]
[project @ 2002-10-15 11:52:31 by simonpj]
------------------------------------------------
Fix exports for a module with no local bindings
------------------------------------------------
Fix the export-list generation for a module with no local bindings.
This one bug was breaking a bunch of modxxx tests, plus some renamer
test, plus a desugarer test.
simonmar [Tue, 15 Oct 2002 11:02:32 +0000 (11:02 +0000)]
[project @ 2002-10-15 11:02:32 by simonmar]
Slight fix to the allocated memory calculation
simonmar [Tue, 15 Oct 2002 11:01:29 +0000 (11:01 +0000)]
[project @ 2002-10-15 11:01:29 by simonmar]
Don't need to export Exception.try or Exception.throwDyn here.
simonmar [Tue, 15 Oct 2002 11:00:37 +0000 (11:00 +0000)]
[project @ 2002-10-15 11:00:37 by simonmar]
Use Panic.tryMost rather than Exception.try, since we don't want to
catch ^C and panic exceptions.
simonmar [Tue, 15 Oct 2002 10:59:38 +0000 (10:59 +0000)]
[project @ 2002-10-15 10:59:38 by simonmar]
Remove unused 'stdPackage'
simonmar [Tue, 15 Oct 2002 10:53:21 +0000 (10:53 +0000)]
[project @ 2002-10-15 10:53:21 by simonmar]
Remove the "contributors" section herein an point the interested
reader to the contributors list on the web site which is much more
up-to-date.
simonpj [Tue, 15 Oct 2002 08:56:55 +0000 (08:56 +0000)]
[project @ 2002-10-15 08:56:50 by simonpj]
Some reorganising. Simon and I agreed to leave out most of the (inaccurate) section
on primitive operations, pointing people instead to the Real Truth in primops.txt
and the External Core document.
Also: bugs section added
sof [Mon, 14 Oct 2002 15:50:14 +0000 (15:50 +0000)]
[project @ 2002-10-14 15:50:14 by sof]
make it compile again (x86)
simonmar [Mon, 14 Oct 2002 14:54:16 +0000 (14:54 +0000)]
[project @ 2002-10-14 14:54:16 by simonmar]
Put stdin back into non-blocking mode after calling readline, because
readline sometimes clears the O_NONBLOCK flag (done using the
GHC.Posix interface, so it shouldn't break Win32).
sof [Mon, 14 Oct 2002 14:44:06 +0000 (14:44 +0000)]
[project @ 2002-10-14 14:44:06 by sof]
make it compile again with 4.08.x
wolfgang [Sun, 13 Oct 2002 10:55:06 +0000 (10:55 +0000)]
[project @ 2002-10-13 10:55:06 by wolfgang]
Darwin/PowerPC: Don't generate PIC code by default
Non-PIC-code is slightly smaller and faster.
This means that GHC now requires GCC3 (Mac OS X 10.2 Jaguar).
MERGE TO STABLE
wolfgang [Sat, 12 Oct 2002 23:28:51 +0000 (23:28 +0000)]
[project @ 2002-10-12 23:28:48 by wolfgang]
The Native Code Generator for PowerPC.
Still to be done:
*) Proper support of Floats and Doubles
currently it seems to work, but it's just guesswork.
*) Some missing operations, only needed for -O, AFAICT.
*) Mach-O dynamic linker stub generation.
(can't import foreign functions from dynamic libraries,
and it might fail for big programs)
wolfgang [Sat, 12 Oct 2002 23:19:54 +0000 (23:19 +0000)]
[project @ 2002-10-12 23:19:54 by wolfgang]
Object Splitting for Mac OS X.
MERGE TO STABLE (... but not today, I have to test it first)
wolfgang [Sat, 12 Oct 2002 23:12:12 +0000 (23:12 +0000)]
[project @ 2002-10-12 23:12:08 by wolfgang]
Make the Mac OS X build use the HaskellSupport.framework (a MacOS-style "framework" that includes the required libraries libgmp and dlcompat) if it is present. The HaskellSupport.framework is not yet in CVS, but is available from me.
erkok [Sat, 12 Oct 2002 18:16:11 +0000 (18:16 +0000)]
[project @ 2002-10-12 18:16:11 by erkok]
mdo wibbles
simonpj [Fri, 11 Oct 2002 16:56:09 +0000 (16:56 +0000)]
[project @ 2002-10-11 16:56:09 by simonpj]
Document infix type constructors
simonpj [Fri, 11 Oct 2002 16:49:56 +0000 (16:49 +0000)]
[project @ 2002-10-11 16:49:56 by simonpj]
title wibble
simonpj [Fri, 11 Oct 2002 16:45:20 +0000 (16:45 +0000)]
[project @ 2002-10-11 16:45:16 by simonpj]
More reification wibbling; and -ddump-splices
simonpj [Fri, 11 Oct 2002 16:42:44 +0000 (16:42 +0000)]
[project @ 2002-10-11 16:42:44 by simonpj]
Docs for Template Haskell
simonpj [Fri, 11 Oct 2002 15:45:05 +0000 (15:45 +0000)]
[project @ 2002-10-11 15:45:05 by simonpj]
Wibble
simonpj [Fri, 11 Oct 2002 14:46:09 +0000 (14:46 +0000)]
[project @ 2002-10-11 14:46:02 by simonpj]
------------------------------------------
Implement reification for Template Haskell
------------------------------------------
This is entirely un-tested, but I don't think it'll break non-TH stuff.
Implements
reifyDecl T :: Dec -- Data type T
reifyDecl C :: Dec -- Class C
reifyType f :: Typ -- Function f
I hope.
stolz [Fri, 11 Oct 2002 14:25:25 +0000 (14:25 +0000)]
[project @ 2002-10-11 14:25:24 by stolz]
'usleep' nightmare: Sometimes return type is void, sometimes int.
simonpj [Fri, 11 Oct 2002 08:48:13 +0000 (08:48 +0000)]
[project @ 2002-10-11 08:48:13 by simonpj]
wibbles
simonpj [Fri, 11 Oct 2002 08:47:13 +0000 (08:47 +0000)]
[project @ 2002-10-11 08:47:12 by simonpj]
Fix mdo so that it works with polymorphic functions
simonpj [Fri, 11 Oct 2002 08:46:26 +0000 (08:46 +0000)]
[project @ 2002-10-11 08:46:26 by simonpj]
Remove usage-analysis guff in applyTys
simonpj [Fri, 11 Oct 2002 08:45:44 +0000 (08:45 +0000)]
[project @ 2002-10-11 08:45:43 by simonpj]
Compatibility fixes for Exception.try
simonpj [Fri, 11 Oct 2002 08:04:55 +0000 (08:04 +0000)]
[project @ 2002-10-11 08:04:55 by simonpj]
Add an example about -osuf etc
simonpj [Fri, 11 Oct 2002 08:04:29 +0000 (08:04 +0000)]
[project @ 2002-10-11 08:04:29 by simonpj]
Add a note about existential data constructors
simonpj [Fri, 11 Oct 2002 07:22:05 +0000 (07:22 +0000)]
[project @ 2002-10-11 07:22:05 by simonpj]
Fix two separate egregious errors in RdrHsSyn, which I
heavily modified when re-doing the top level plumbing.
One had the effect of throwing away fixity decls if there
was also a class decl
The other threw away all but the first and last equation of
a function definition.
Sorry about having so utterly broken the head, guys.
sof [Thu, 10 Oct 2002 15:14:37 +0000 (15:14 +0000)]
[project @ 2002-10-10 15:14:37 by sof]
rules: permit trailing semi-colon(s) again (inserted by the lexer & needed when compiling Base.lhs)
sof [Thu, 10 Oct 2002 14:35:55 +0000 (14:35 +0000)]
[project @ 2002-10-10 14:35:55 by sof]
make it compile with 4.08 (module author may very reasonably want to abstract away the ifdef this commit intros.)
sof [Thu, 10 Oct 2002 14:20:54 +0000 (14:20 +0000)]
[project @ 2002-10-10 14:20:54 by sof]
make it compile in non-DEBUG mode
sof [Thu, 10 Oct 2002 13:58:18 +0000 (13:58 +0000)]
[project @ 2002-10-10 13:58:18 by sof]
partial undo of prev commit (AC_CHECK_HEADERS([foo],..) isn't equal to AC_CHECK_HEADER([foo],..). Fixes HEAD breakage (cf. _SC_CLK_TCK undefinedness)
simonpj [Wed, 9 Oct 2002 16:53:13 +0000 (16:53 +0000)]
[project @ 2002-10-09 16:53:10 by simonpj]
Fix to mdo, plus SrcLocs on splices and brackets
simonpj [Wed, 9 Oct 2002 16:35:56 +0000 (16:35 +0000)]
[project @ 2002-10-09 16:35:56 by simonpj]
Import Exception.Try via HsVersions
simonpj [Wed, 9 Oct 2002 16:28:57 +0000 (16:28 +0000)]
[project @ 2002-10-09 16:28:56 by simonpj]
Fix and simplify renamer warnings about export lists
simonpj [Wed, 9 Oct 2002 15:51:43 +0000 (15:51 +0000)]
[project @ 2002-10-09 15:51:43 by simonpj]
Dont try to splice if compiler isnt bootstrapped
simonpj [Wed, 9 Oct 2002 15:37:57 +0000 (15:37 +0000)]
[project @ 2002-10-09 15:37:57 by simonpj]
Missing eqn in getMonoBind
simonpj [Wed, 9 Oct 2002 15:36:48 +0000 (15:36 +0000)]
[project @ 2002-10-09 15:36:47 by simonpj]
Remove circular dependencies
simonpj [Wed, 9 Oct 2002 15:16:53 +0000 (15:16 +0000)]
[project @ 2002-10-09 15:16:53 by simonpj]
Dont complain about unused things bound by deriving clause
simonpj [Wed, 9 Oct 2002 15:15:59 +0000 (15:15 +0000)]
[project @ 2002-10-09 15:15:59 by simonpj]
Bale out if duplicate binders
simonpj [Wed, 9 Oct 2002 15:05:05 +0000 (15:05 +0000)]
[project @ 2002-10-09 15:05:05 by simonpj]
---------------------
PS: remove ParseUtils
---------------------
I've combined ParseUtils into RdrHsSyn. I could never
figure out which thing was defined in which module, and
they were both short.
simonpj [Wed, 9 Oct 2002 15:04:01 +0000 (15:04 +0000)]
[project @ 2002-10-09 15:03:48 by simonpj]
-----------------------------------
Lots more Template Haskell stuff
-----------------------------------
At last! Top-level declaration splices work!
Syntax is
$(f x)
not "splice (f x)" as in the paper.
Lots jiggling around, particularly with the top-level plumbining.
Note the new data type HsDecls.HsGroup.
wolfgang [Tue, 8 Oct 2002 08:03:02 +0000 (08:03 +0000)]
[project @ 2002-10-08 08:03:01 by wolfgang]
Make the new Posix bindings compile on Mac OS X.
Most notable, Mac OS X lacks
*) lchown
*) SIGPOLL
I don't know of a replacement of either, so they are just left out when
they are not detected by configure.
wolfgang [Sun, 6 Oct 2002 12:45:41 +0000 (12:45 +0000)]
[project @ 2002-10-06 12:45:41 by wolfgang]
Make it compile for Mac OS X again.
panne [Sat, 5 Oct 2002 23:54:54 +0000 (23:54 +0000)]
[project @ 2002-10-05 23:54:53 by panne]
The never-ending docbook tragedy: Adapt the catalogs once more... >:-P
NOTE: I don't really have a clue what I'm doing here, but at least it
works with the current SuSE Linux distribution 8.1.
panne [Sat, 5 Oct 2002 22:31:04 +0000 (22:31 +0000)]
[project @ 2002-10-05 22:31:04 by panne]
Warning police #13: Sync fprintf format strings with args in an
architecture-neutral way.
panne [Sat, 5 Oct 2002 22:18:46 +0000 (22:18 +0000)]
[project @ 2002-10-05 22:18:45 by panne]
Warning police #12: Multi-line string literals are uncool.
wolfgang [Wed, 2 Oct 2002 09:36:00 +0000 (09:36 +0000)]
[project @ 2002-10-02 09:36:00 by wolfgang]
PowerPC Mach-O:
Handle more kinds of relocations, so that non-PIC-code can be loaded
wolfgang [Wed, 2 Oct 2002 09:08:44 +0000 (09:08 +0000)]
[project @ 2002-10-02 09:08:44 by wolfgang]
PowerPC-related changes:
Use proper register names for floating-point registers
Define SpillTmp registers for NCG
erkok [Wed, 2 Oct 2002 02:04:44 +0000 (02:04 +0000)]
[project @ 2002-10-02 02:04:44 by erkok]
typos never end.
erkok [Tue, 1 Oct 2002 18:10:00 +0000 (18:10 +0000)]
[project @ 2002-10-01 18:10:00 by erkok]
typo
erkok [Tue, 1 Oct 2002 17:48:37 +0000 (17:48 +0000)]
[project @ 2002-10-01 17:48:37 by erkok]
wibbles on mdo-documentation
simonpj [Tue, 1 Oct 2002 16:28:20 +0000 (16:28 +0000)]
[project @ 2002-10-01 16:28:20 by simonpj]
Wibble in loading of boot interfaces
erkok [Tue, 1 Oct 2002 15:59:03 +0000 (15:59 +0000)]
[project @ 2002-10-01 15:59:03 by erkok]
MonadRec => MonadFix changes
erkok [Tue, 1 Oct 2002 15:58:42 +0000 (15:58 +0000)]
[project @ 2002-10-01 15:58:42 by erkok]
get mfix from Control.Monad.Fix
simonpj [Tue, 1 Oct 2002 09:55:38 +0000 (09:55 +0000)]
[project @ 2002-10-01 09:55:38 by simonpj]
Better derived Ord code
simonpj [Tue, 1 Oct 2002 08:59:43 +0000 (08:59 +0000)]
[project @ 2002-10-01 08:59:43 by simonpj]
Use the ModSummary fields in record construction
simonmar [Tue, 1 Oct 2002 08:53:14 +0000 (08:53 +0000)]
[project @ 2002-10-01 08:53:14 by simonmar]
The help text for the -i profiling option was wrong: it claimed the
argument was in milliseconds rather than seconds.
MERGE TO STABLE
simonpj [Mon, 30 Sep 2002 13:42:01 +0000 (13:42 +0000)]
[project @ 2002-09-30 13:42:01 by simonpj]
Move mdo section
simonpj [Mon, 30 Sep 2002 13:38:30 +0000 (13:38 +0000)]
[project @ 2002-09-30 13:38:30 by simonpj]
Minor wibble
simonmar [Mon, 30 Sep 2002 10:53:21 +0000 (10:53 +0000)]
[project @ 2002-09-30 10:53:21 by simonmar]
.PHONY: package-way-dist
simonmar [Mon, 30 Sep 2002 10:34:04 +0000 (10:34 +0000)]
[project @ 2002-09-30 10:34:04 by simonmar]
wibble in dist-manifest rule (writing to MANIFEST.tmp isn't necessary
and may hide errors)
simonmar [Mon, 30 Sep 2002 10:32:41 +0000 (10:32 +0000)]
[project @ 2002-09-30 10:32:41 by simonmar]
Don't bother with the $@.tmp hack in the rule for building libraries,
.DELETE_ON_ERROR (in suffix.mk) should do the job for us.
simonmar [Mon, 30 Sep 2002 10:26:58 +0000 (10:26 +0000)]
[project @ 2002-09-30 10:26:58 by simonmar]
s/rm -f/$(RM)
simonmar [Mon, 30 Sep 2002 10:23:56 +0000 (10:23 +0000)]
[project @ 2002-09-30 10:23:56 by simonmar]
Use $(RM) rather than explicit 'rm -f'
simonmar [Mon, 30 Sep 2002 10:22:37 +0000 (10:22 +0000)]
[project @ 2002-09-30 10:22:37 by simonmar]
Set .DELETE_ON_ERROR rather than using the strange construction
<command> || ($(RM) $@; exit 1)
in a few places.
simonmar [Mon, 30 Sep 2002 10:17:38 +0000 (10:17 +0000)]
[project @ 2002-09-30 10:17:38 by simonmar]
Replace
.PRECIOUS: %.hs
with
.SECONDARY: %.hs
.PRECIOUS is the wrong thing: it keeps the file when 'make' is
killed, as well as preventing automatic deletion. .SECONDARY just
prevents the automatic deletion.
Spotted by: Ian Lynagh.
simonmar [Mon, 30 Sep 2002 10:14:02 +0000 (10:14 +0000)]
[project @ 2002-09-30 10:14:02 by simonmar]
Fix cut-n-pasto
simonmar [Mon, 30 Sep 2002 10:13:23 +0000 (10:13 +0000)]
[project @ 2002-09-30 10:13:23 by simonmar]
$(EXE_SUFFIX) duplicates $(exeext), and the latter seems to be more
widely used, so nuke the former.
simonmar [Mon, 30 Sep 2002 10:09:38 +0000 (10:09 +0000)]
[project @ 2002-09-30 10:09:38 by simonmar]
Remove unused $(PRINTER)
erkok [Sat, 28 Sep 2002 07:12:55 +0000 (07:12 +0000)]
[project @ 2002-09-28 07:12:55 by erkok]
clarifications on the mdo documentation.
erkok [Sat, 28 Sep 2002 00:29:32 +0000 (00:29 +0000)]
[project @ 2002-09-28 00:29:32 by erkok]
documentation for the mdo-notation.
(I've run this through jade, no syntax errors, but couldn't get
any html output as my docbook installation is a bit weird: couldn't
find style-files etc. it'll be great if someone can run it through
to make sure what I added looks acceptable..)
erkok [Fri, 27 Sep 2002 23:10:59 +0000 (23:10 +0000)]
[project @ 2002-09-27 23:10:59 by erkok]
get mfix from MonadRec
erkok [Fri, 27 Sep 2002 17:12:23 +0000 (17:12 +0000)]
[project @ 2002-09-27 17:12:23 by erkok]
make sure we get the name right when we call doStmtListErr
simonpj [Fri, 27 Sep 2002 12:42:45 +0000 (12:42 +0000)]
[project @ 2002-09-27 12:42:42 by simonpj]
Wibbles to improve error reporting
simonpj [Fri, 27 Sep 2002 08:20:50 +0000 (08:20 +0000)]
[project @ 2002-09-27 08:20:43 by simonpj]
--------------------------------
Implement recursive do-notation
--------------------------------
This commit adds recursive do-notation, which Hugs has had for some time.
mdo { x <- foo y ;
y <- baz x ;
return (y,x) }
turns into
do { (x,y) <- mfix (\~(x,y) -> do { x <- foo y;
y <- baz x }) ;
return (y,x) }
This is all based on work by Levent Erkok and John Lanuchbury.
The really tricky bit is in the renamer (RnExpr.rnMDoStmts) where
we break things up into minimal segments. The rest is easy, including
the type checker.
Levent laid the groundwork, and Simon finished it off. Needless to say,
I couldn't resist tidying up other stuff, so there's no guaranteed I
have not broken something.
simonpj [Fri, 27 Sep 2002 08:16:25 +0000 (08:16 +0000)]
[project @ 2002-09-27 08:16:24 by simonpj]
--------------------------------
Do type-checking of external-core input
--------------------------------
When we read in an External Core file, we should really type-check it.
We weren't, because we treated it as if it were trusted, interface-file
material.
This commit fixes the problem, albeit in a bit of a hacky way. The
typechecking is done by Lint, which does not give as friendly error
messages as does the normal typechecker. But it's much better than nothing.
I also removed the entirely-unused 'warnings' from the Lint monad.
simonpj [Fri, 27 Sep 2002 07:51:57 +0000 (07:51 +0000)]
[project @ 2002-09-27 07:51:57 by simonpj]
typo
simonpj [Thu, 26 Sep 2002 16:29:10 +0000 (16:29 +0000)]
[project @ 2002-09-26 16:29:10 by simonpj]
Fix case of C {} for non-record constructor C, but with strict fields
simonpj [Thu, 26 Sep 2002 16:28:35 +0000 (16:28 +0000)]
[project @ 2002-09-26 16:28:35 by simonpj]
Fix egregious loop error
simonmar [Thu, 26 Sep 2002 09:07:50 +0000 (09:07 +0000)]
[project @ 2002-09-26 09:07:50 by simonmar]
In 'make html', bale out with a useful message if Haddock is not installed.
simonpj [Thu, 26 Sep 2002 09:01:34 +0000 (09:01 +0000)]
[project @ 2002-09-26 09:01:34 by simonpj]
Notes on .exe files
simonpj [Thu, 26 Sep 2002 08:44:48 +0000 (08:44 +0000)]
[project @ 2002-09-26 08:44:48 by simonpj]
Bale out a little earlier on renamer errors