simonmar [Fri, 2 Mar 2001 16:12:18 +0000 (16:12 +0000)]
[project @ 2001-03-02 16:12:18 by simonmar]
Add a new closure flag, IND, to identify indirections.
simonmar [Fri, 2 Mar 2001 14:36:16 +0000 (14:36 +0000)]
[project @ 2001-03-02 14:36:16 by simonmar]
Add some ASSERT()s so we can catch updates where updatee==target.
simonmar [Fri, 2 Mar 2001 14:28:44 +0000 (14:28 +0000)]
[project @ 2001-03-02 14:28:44 by simonmar]
Yet another good bug (I'm on a roll today! :-)
When squeezing update frames, make sure the updatee pointers aren't
identical before updating one to point to the other. This is mostly
harmless, but in one example I have caused the program to go into an
infinite loop rather than fall down a black hole.
To be merged into the 4.08 branch.
simonmar [Fri, 2 Mar 2001 14:26:40 +0000 (14:26 +0000)]
[project @ 2001-03-02 14:26:40 by simonmar]
Another good bug: the stack check in the AP_UPD entry code was wrong.
This one is a definite source of crashes.
To be merged into the 4.08 branch.
simonmar [Fri, 2 Mar 2001 14:25:04 +0000 (14:25 +0000)]
[project @ 2001-03-02 14:25:04 by simonmar]
A good bug: detectBlackHoles wasn't checking for ThreadRelocated,
which is why we sometimes get "no threads to run: infinite loop or
deadlock?" when we should get a NonTermination exception.
To be merged into the 4.08 branch.
simonmar [Fri, 2 Mar 2001 10:52:15 +0000 (10:52 +0000)]
[project @ 2001-03-02 10:52:15 by simonmar]
Don't context switch on the timer if the flag +RTS -C0 is given. This
gives us reliable/repeatable runs with -C0 (I've been running with a
similar change for months now, debugging is virtually impossible
without it).
qrczak [Thu, 1 Mar 2001 21:39:36 +0000 (21:39 +0000)]
[project @ 2001-03-01 21:39:36 by qrczak]
Let ':t \x->x' work by putting a space before the expression.
qrczak [Thu, 1 Mar 2001 20:32:51 +0000 (20:32 +0000)]
[project @ 2001-03-01 20:32:51 by qrczak]
#{stuff} is equivalent to #stuff except that it's self-delimited and
thus needs not to be placed at the end of line or in some brackets.
qrczak [Thu, 1 Mar 2001 19:10:16 +0000 (19:10 +0000)]
[project @ 2001-03-01 19:10:16 by qrczak]
Mark fromInt and toInt as deprecated.
simonpj [Thu, 1 Mar 2001 17:10:07 +0000 (17:10 +0000)]
[project @ 2001-03-01 17:10:06 by simonpj]
Improve IdInfo substitution
To get rules to work nicely, we need to make rules for recursive functions
active in the RHS of the very recursive function itself. This can be
done nicely: the change is to move the calls to simplIdInfo in Simplify
to an earlier place.
The second thing is that when doing simple expression substitution
in a rule (which we do during simplification for rules attached to an Id)
we were zapping the occurrence info carefully pinned on the rule binders
when the rule was put into the Id's rules. This in turn meant that
the simplifer ran more iterations than necessary when rules were fired.
(Andrew Tolmach discovered this.)
So I tidied up the interface to Subst a little. The relevant functions
that have changed are
simplBndr, simplBndrs, simplLetId, simplIdInfo,
substAndCloneId, substAndCloneIds, substAndCloneRecIds,
There are consequential changes in other modules, but it compiles
at least the whole standard libraries happily, and the codegen tests,
so I'm reasonably confident in it. But watch out for new strange
happenings.
simonpj [Thu, 1 Mar 2001 17:09:54 +0000 (17:09 +0000)]
[project @ 2001-03-01 17:09:54 by simonpj]
Add comments
simonpj [Thu, 1 Mar 2001 17:08:31 +0000 (17:08 +0000)]
[project @ 2001-03-01 17:08:31 by simonpj]
Formatting only
simonpj [Thu, 1 Mar 2001 17:07:49 +0000 (17:07 +0000)]
[project @ 2001-03-01 17:07:49 by simonpj]
Simplify between LiberateCase and SpecConstr
simonpj [Thu, 1 Mar 2001 17:07:13 +0000 (17:07 +0000)]
[project @ 2001-03-01 17:06:53 by simonpj]
Add comment
simonpj [Thu, 1 Mar 2001 16:56:44 +0000 (16:56 +0000)]
[project @ 2001-03-01 16:56:44 by simonpj]
Move import
simonmar [Thu, 1 Mar 2001 16:07:46 +0000 (16:07 +0000)]
[project @ 2001-03-01 16:07:46 by simonmar]
don't get $! from Util
simonmar [Thu, 1 Mar 2001 15:59:51 +0000 (15:59 +0000)]
[project @ 2001-03-01 15:59:51 by simonmar]
use foldl' for addListToFM and delListFromFM
simonmar [Thu, 1 Mar 2001 15:58:28 +0000 (15:58 +0000)]
[project @ 2001-03-01 15:58:28 by simonmar]
add foldl', a strict foldl
simonpj [Thu, 1 Mar 2001 15:51:46 +0000 (15:51 +0000)]
[project @ 2001-03-01 15:51:46 by simonpj]
Sub-wibble 2 (sigh)
simonpj [Thu, 1 Mar 2001 15:42:31 +0000 (15:42 +0000)]
[project @ 2001-03-01 15:42:31 by simonpj]
Sub-wibble
simonmar [Thu, 1 Mar 2001 15:36:35 +0000 (15:36 +0000)]
[project @ 2001-03-01 15:36:35 by simonmar]
forgot one file.
simonmar [Thu, 1 Mar 2001 15:36:21 +0000 (15:36 +0000)]
[project @ 2001-03-01 15:36:20 by simonmar]
The beginnings of a GHCi test suite.
simonpj [Thu, 1 Mar 2001 15:35:29 +0000 (15:35 +0000)]
[project @ 2001-03-01 15:35:29 by simonpj]
Fix interface-file syntax wibble (when printing both rules and deprecations)
simonpj [Thu, 1 Mar 2001 15:06:52 +0000 (15:06 +0000)]
[project @ 2001-03-01 15:06:52 by simonpj]
Improve rule matching even more
Manuel discovered that given
{-# RULES "fst over sndSnd" forall v. fst (sndSnd v) = fst v #-}
sndSnd :: (a, (b, c)) -> (a, c)
sndSnd (x, (y, z)) = (x, z)
the rule gets a type, which is too specialised, namely
{-## __R "fst over sndSnd" __forall {@ a1 v :: (a1, ((), ()))}
fst @ a1 @ () (sndSnd @ a1 @ () @ () v) = fst @ a1 @ ((), ()) v ;
This was because TcRules wasn't quantifying over enough type variables.
This commit fixes the problem.
The test is in tests/simplCore/should_run/simplrun002
simonmar [Thu, 1 Mar 2001 14:27:22 +0000 (14:27 +0000)]
[project @ 2001-03-01 14:27:22 by simonmar]
don't needlessly duplicate a binder.
simonmar [Thu, 1 Mar 2001 14:26:44 +0000 (14:26 +0000)]
[project @ 2001-03-01 14:26:44 by simonmar]
define the "$Interactive" module.
simonmar [Thu, 1 Mar 2001 14:26:01 +0000 (14:26 +0000)]
[project @ 2001-03-01 14:26:00 by simonmar]
GHCi fixes:
- expressions are now compiled in a pseudo-module "$Interactive",
which avoids some problems with storage of demand-loaded declarations.
- compilation manager now detects when it needs to read the interace
for a module, even if it is already compiled. GHCi never demand-loads
interfaces now.
- (from Simon PJ) fix a problem with the recompilation checker, which
meant that modules were sometimes not recompiled when they should
have been.
- ByteCodeGen/Link: move linker related stuff into ByteCodeLink.
simonmar [Thu, 1 Mar 2001 13:44:33 +0000 (13:44 +0000)]
[project @ 2001-03-01 13:44:33 by simonmar]
fix an ASSERT: the isDeadBinder predicate can't be used here, because
all the Ids have been cloned with empty IdInfo.
simonmar [Thu, 1 Mar 2001 13:06:54 +0000 (13:06 +0000)]
[project @ 2001-03-01 13:06:54 by simonmar]
fix a couple of foreign imports
rrt [Thu, 1 Mar 2001 12:25:33 +0000 (12:25 +0000)]
[project @ 2001-03-01 12:25:32 by rrt]
Apply stat fix for mingw. It's ugly, it's implausible, but it seems to work.
Unlike Cygwin...(missing no. 3).
qrczak [Thu, 1 Mar 2001 09:23:40 +0000 (09:23 +0000)]
[project @ 2001-03-01 09:23:40 by qrczak]
Uncomment {-# SPECIALISE instance Eq [Char] #-}
{-# SPECIALISE instance Ord [Char] #-}
Remove explicit (<), (<=), (>), (>=) in instance Ord [a].
eqString is defined as (==) instead of vice versa.
ghc generates good specialized code for these automatically.
simonmar [Wed, 28 Feb 2001 17:57:52 +0000 (17:57 +0000)]
[project @ 2001-02-28 17:57:52 by simonmar]
Compiling a module outside of a running GHCi and expecting GHCi to
pick it up when you do ':r' ain't gonna work.
We thought it would, but there's a problem with module versions and
the recompilation machinery, namely that the outside compiler doesn't
know about the versions being used internally in the running GHCi.
The "right" solution is to implement a ':compile' command in GHCi, but
we aren't going to do that before the release.
This commit disables the picking up of newly compiled modules, until
you do a full load (i.e. :load).
simonpj [Wed, 28 Feb 2001 17:17:55 +0000 (17:17 +0000)]
[project @ 2001-02-28 17:17:55 by simonpj]
Improve rule matching
When doing constraint simplification on the LHS of a rule,
we *don't* want to do superclass commoning up. Consider
fromIntegral :: (Integral a, Num b) => a -> b
{-# RULES "foo" fromIntegral = id :: Int -> Int #-}
Here, a=b=Int, and Num Int is a superclass of Integral Int. But we *dont*
want to get
forall dIntegralInt.
fromIntegral Int Int dIntegralInt (scsel dIntegralInt) = id Int
because the scsel (super class selection) will mess up matching.
Instead we want
forall dIntegralInt, dNumInt.
fromIntegral Int Int dIntegralInt dNumInt = id Int
TcSimplify.tcSimplifyToDicts is the relevant function, but I had
to generalise the main simplification loop a little (adding the
type WantSCs).
sewardj [Wed, 28 Feb 2001 14:24:46 +0000 (14:24 +0000)]
[project @ 2001-02-28 14:24:46 by sewardj]
Don't do a prototype for tcSetAttr if !HAVE_TERMIOS_H.
sewardj [Wed, 28 Feb 2001 14:23:55 +0000 (14:23 +0000)]
[project @ 2001-02-28 14:23:55 by sewardj]
Correctly #include <windows.h>.
simonmar [Wed, 28 Feb 2001 12:12:43 +0000 (12:12 +0000)]
[project @ 2001-02-28 12:12:43 by simonmar]
oops, don't export cmTypeOfName when !GHCI.
simonpj [Wed, 28 Feb 2001 11:48:35 +0000 (11:48 +0000)]
[project @ 2001-02-28 11:48:34 by simonpj]
Add most of the code for constructor specialisation. The comment
below is reproduced from specialise/SpecConstr.lhs.
It doesn't quite work properly yet, because we need to have
rules in scope in a recursive function's own RHS, and that
entails a bit of fiddling I havn't yet completed. But SpecConstr
itself is a nice neat 250 lines of code.
-----------------------------------------------------
Game plan
-----------------------------------------------------
Consider
drop n [] = []
drop 0 xs = []
drop n (x:xs) = drop (n-1) xs
After the first time round, we could pass n unboxed. This happens in
numerical code too. Here's what it looks like in Core:
drop n xs = case xs of
[] -> []
(y:ys) -> case n of
I# n# -> case n# of
0 -> []
_ -> drop (I# (n# -# 1#)) xs
Notice that the recursive call has an explicit constructor as argument.
Noticing this, we can make a specialised version of drop
RULE: drop (I# n#) xs ==> drop' n# xs
drop' n# xs = let n = I# n# in ...orig RHS...
Now the simplifier will apply the specialisation in the rhs of drop', giving
drop' n# xs = case xs of
[] -> []
(y:ys) -> case n# of
0 -> []
_ -> drop (n# -# 1#) xs
Much better!
We'd also like to catch cases where a parameter is carried along unchanged,
but evaluated each time round the loop:
f i n = if i>0 || i>n then i else f (i*2) n
Here f isn't strict in n, but we'd like to avoid evaluating it each iteration.
In Core, by the time we've w/wd (f is strict in i) we get
f i# n = case i# ># 0 of
False -> I# i#
True -> case n of n' { I# n# ->
case i# ># n# of
False -> I# i#
True -> f (i# *# 2#) n'
At the call to f, we see that the argument, n is know to be (I# n#),
and n is evaluated elsewhere in the body of f, so we can play the same
trick as above. However we don't want to do that if the boxed version
of n is needed (else we'd avoid the eval but pay more for re-boxing n).
So in this case we want that the *only* uses of n are in case statements.
So we look for
* A self-recursive function. Ignore mutual recursion for now,
because it's less common, and the code is simpler for self-recursion.
* EITHER
a) At a recursive call, one or more parameters is an explicit
constructor application
AND
That same parameter is scrutinised by a case somewhere in
the RHS of the function
OR
b) At a recursive call, one or more parameters has an unfolding
that is an explicit constructor application
AND
That same parameter is scrutinised by a case somewhere in
the RHS of the function
AND
Those are the only uses of the parameter
simonpj [Wed, 28 Feb 2001 11:44:40 +0000 (11:44 +0000)]
[project @ 2001-02-28 11:44:39 by simonpj]
Import/formatting wibbles
simonpj [Wed, 28 Feb 2001 11:42:09 +0000 (11:42 +0000)]
[project @ 2001-02-28 11:42:09 by simonpj]
Tidy up in exprIsConApp_maybe
rrt [Wed, 28 Feb 2001 10:53:30 +0000 (10:53 +0000)]
[project @ 2001-02-28 10:53:30 by rrt]
Modernize
rrt [Wed, 28 Feb 2001 10:46:52 +0000 (10:46 +0000)]
[project @ 2001-02-28 10:46:52 by rrt]
The warning messages have changes, so the stderrs have to too.
rrt [Wed, 28 Feb 2001 10:45:40 +0000 (10:45 +0000)]
[project @ 2001-02-28 10:45:40 by rrt]
Various bits of modernisation; in particular, in cg026, do the Char test the
same way as all the others, rather than in a way that fails on Windows.
rrt [Wed, 28 Feb 2001 10:29:41 +0000 (10:29 +0000)]
[project @ 2001-02-28 10:29:41 by rrt]
Add extra results for mingw, and stop printing out the time taken in io012,
(this was debugging code which was accidentally committed earlier).
sewardj [Wed, 28 Feb 2001 10:03:42 +0000 (10:03 +0000)]
[project @ 2001-02-28 10:03:42 by sewardj]
Yesterday's changes to the runtime linker:
* Update the PEi386 stuff to compile in the new framework.
Note! Certainly will _not_ work properly as-is.
* A conceptual cleanup for all platforms: only record, in the
oc.symbols field, the names of symbols which have been put into the
global symbol table, rather than (name, addr) pairs -- the addr
is redundant.
qrczak [Wed, 28 Feb 2001 00:01:04 +0000 (00:01 +0000)]
[project @ 2001-02-28 00:01:01 by qrczak]
* Add {intToInt,wordToWord}{8,16,32}# primops. WARNING: Not implemented
in ncg for Alpha and Sparc. But -O -fasm is not going to go far anyway
because of other omissions.
* Have full repertoire of 8,16,32-bit signed and unsigned MachMisc.Size
values. Again only x86 is fully supported. They are used for
{index,read,write}{Int,Word}{8,16,32}{OffAddr,Array}# and
{intToInt,wordToWord}{8,16,32}# primops.
* Have full repertoire of
{index,read,write}\
{Char,WideChar,Int,Word,Addr,Float,Double,StablePtr,\
{Int,Word}{8,16,32,64}}\
{OffAddr,Array} primops and appropriate instances.
There were various omissions in various places.
* Add {plus,minus,times}Word# primops to avoid so many Word# <-> Int#
coercions.
* Rewrite modules PrelWord and PrelInt almost from scratch.
* Simplify fromInteger and realToFrac rules. For each of
{Int,Word}{8,16,32} there is just a pair of fromInteger rules
replacing the source or target type with Int or Word. For
{Int,Word,Int64,Word64} there are rules from any to any.
Don't include rules which are derivable from inlining anyway,
e.g. those mentioning Integer. Old explicit coercions are simply
defined as appropriately typed fromInteger.
* Various old coercion functions marked as deprecated.
* Add instance Bits Int, and
instance {Show,Num,Real,Enum,Integral,Bounded,Ix,Read,Bits} Word.
* Coercions to sized integer types consistently behave as cutting the
right amount of bits from the infinite two-complement representation.
For example (fromIntegral (-1 :: Int8) :: Word64) == maxBound.
* ghc/tests/numeric/should_run/arith011 tests {Int,Word}64 and instance
Bits Int, and does not try to use overflowing toEnum. arith011.stdout
is not updated yet because of a problem I will tell about soon.
* Move fromInteger and realToFrac from Prelude to PrelReal.
Move fromInt from PrelNum to PrelReal and define as fromInteger.
Define toInt as fromInteger. fromInteger is the place to write
integer conversion rules for.
* Remove ArrayBase.newInitialisedArray, use default definition of
newArray instead.
* Bugs fixed:
- {quot,rem}Word# primop attributes.
- integerToInt64# for small negative values.
- {min,max}Bound::Int on 64-bit platforms.
- iShiftRL64#.
- Various Bits instances.
* Polishing:
- Use 'ppr' instead of 'pprPrimOp' and 'text . showPrimRep'.
- PrimRep.{primRepString,showPrimRepToUser} removed.
- MachMisc.sizeOf returns Int instead of Integer.
- Some eta reduction, parens, spacing, and reordering cleanups -
sorry, couldn't resist.
* Questions:
- Should iShiftRL and iShiftRL64 be removed? IMHO they should,
s/iShiftRA/iShiftR/, s/shiftRL/shiftR/. The behaviour on shifting
is a property of the signedness of the type, not the operation!
I haven't done this change.
simonmar [Tue, 27 Feb 2001 17:15:53 +0000 (17:15 +0000)]
[project @ 2001-02-27 17:15:53 by simonmar]
Don't blacklist everything in simplifyExpr. Allow simple inlining to
happen (actually, this is what exposed the bug I just fixed in
HscMain.lhs).
simonmar [Tue, 27 Feb 2001 17:14:44 +0000 (17:14 +0000)]
[project @ 2001-02-27 17:14:44 by simonmar]
Need to tidy the expression before compiling it, purely in order to
clone the ids in case of clashes.
simonmar [Tue, 27 Feb 2001 15:26:05 +0000 (15:26 +0000)]
[project @ 2001-02-27 15:26:04 by simonmar]
- make flushing and :def work again in the interpreter
simonmar [Tue, 27 Feb 2001 15:25:18 +0000 (15:25 +0000)]
[project @ 2001-02-27 15:25:18 by simonmar]
- clean up recognising of objects on the ghci command line
- recognise objects on the ghc --make command line, and link them in (untested)
rrt [Tue, 27 Feb 2001 14:37:17 +0000 (14:37 +0000)]
[project @ 2001-02-27 14:37:17 by rrt]
Update ffi001.stdout (was simply wrong) and change fed001.hs in line with
library changes.
rrt [Tue, 27 Feb 2001 14:34:46 +0000 (14:34 +0000)]
[project @ 2001-02-27 14:34:46 by rrt]
Merge changes from 4.08 branch.
simonmar [Tue, 27 Feb 2001 13:38:58 +0000 (13:38 +0000)]
[project @ 2001-02-27 13:38:58 by simonmar]
changes for commandline do-bindings: define failIO.
simonmar [Tue, 27 Feb 2001 13:38:15 +0000 (13:38 +0000)]
[project @ 2001-02-27 13:38:15 by simonmar]
remove PutFullMVar
rrt [Tue, 27 Feb 2001 12:43:45 +0000 (12:43 +0000)]
[project @ 2001-02-27 12:43:45 by rrt]
mingwin "fixes": getourtimeofday now returns the right units, and awaitEvent
fudged to use WinSock select(), so that although it doesn't work for file
handles, at least it doesn't cause nasty crashes; instead it just blocks.
rrt [Tue, 27 Feb 2001 12:36:37 +0000 (12:36 +0000)]
[project @ 2001-02-27 12:36:36 by rrt]
Add ILX support (all #ifdefed on ILX for now) and tidied up some
indentation. We now support --mk-dll, so remove the comment about adding
that.
simonpj [Tue, 27 Feb 2001 11:50:05 +0000 (11:50 +0000)]
[project @ 2001-02-27 11:50:05 by simonpj]
Temporary fix for a nasty black hole
The problem is that the type checker has a big knot for "unf_env".
This means that we can't look at unfoldings inside the loop, which
is fair enough. But setting an unfolding in the IdInfo is strict
in the unfolding, so we can't look at the IdInfo either.
But isLocalId looks at the IdInfo, and it was being used in an
assert in TcHsSyn, and in setting the in_scope_vars in TcIfaceSig.
I think the right solution is to take the "flavour" out of IdInfo,
and put it into VarDetails, but I've done a quick fix for now.
(Remove the assert, and use a different way in TcIfaceSig.)
rrt [Tue, 27 Feb 2001 10:03:22 +0000 (10:03 +0000)]
[project @ 2001-02-27 10:03:22 by rrt]
Avoid types that lickle Windows doesn't understand aaahhhh. Why not just
avoid this whole file? Well, some of the types are widely used.
simonmar [Mon, 26 Feb 2001 17:42:15 +0000 (17:42 +0000)]
[project @ 2001-02-26 17:42:15 by simonmar]
only collect free type variable info if -fkeep-stg-types is on.
simonpj [Mon, 26 Feb 2001 17:10:16 +0000 (17:10 +0000)]
[project @ 2001-02-26 17:10:16 by simonpj]
Make CoreToStg generate correct free-var info for type variables
rrt [Mon, 26 Feb 2001 17:09:17 +0000 (17:09 +0000)]
[project @ 2001-02-26 17:09:17 by rrt]
Compile lndir for Cygwin even under mingwin, because mingwin doesn't have
symlinks (or sys/param.h).
simonmar [Mon, 26 Feb 2001 16:59:17 +0000 (16:59 +0000)]
[project @ 2001-02-26 16:59:17 by simonmar]
lookupClosure not used.
simonmar [Mon, 26 Feb 2001 16:50:30 +0000 (16:50 +0000)]
[project @ 2001-02-26 16:50:30 by simonmar]
make ghci-inplace work
simonmar [Mon, 26 Feb 2001 16:43:32 +0000 (16:43 +0000)]
[project @ 2001-02-26 16:43:31 by simonmar]
Update the interactive context in cmRunStmt rather than hscMain.
simonmar [Mon, 26 Feb 2001 16:42:48 +0000 (16:42 +0000)]
[project @ 2001-02-26 16:42:48 by simonmar]
Unload temporary bindings from the ClosureEnv properly at cmLoadModule time.
simonmar [Mon, 26 Feb 2001 16:27:46 +0000 (16:27 +0000)]
[project @ 2001-02-26 16:27:46 by simonmar]
fix dumping in desugarExpr
simonmar [Mon, 26 Feb 2001 15:50:21 +0000 (15:50 +0000)]
[project @ 2001-02-26 15:50:21 by simonmar]
- message wibbles
- in one-shot mode, make sure the interface file follows the module rather
than the filename of the source.
rrt [Mon, 26 Feb 2001 15:44:59 +0000 (15:44 +0000)]
[project @ 2001-02-26 15:44:59 by rrt]
ILX back-end. WARNING: this is code copied in that was previously added to
4.06. It's not remotely sane to try to compile it at the moment; that's what
I've got to do next. Don't worry, it's all #ifdefed at the moment.
simonpj [Mon, 26 Feb 2001 15:42:24 +0000 (15:42 +0000)]
[project @ 2001-02-26 15:42:24 by simonpj]
Move seq/par munging from CoreToStg to CoreSat
simonpj [Mon, 26 Feb 2001 15:42:00 +0000 (15:42 +0000)]
[project @ 2001-02-26 15:42:00 by simonpj]
Move findDefault, findAlt from SimplUtils to CoreUtils
simonpj [Mon, 26 Feb 2001 15:41:18 +0000 (15:41 +0000)]
[project @ 2001-02-26 15:41:18 by simonpj]
Dont print generic insts if there arent any
simonpj [Mon, 26 Feb 2001 15:40:54 +0000 (15:40 +0000)]
[project @ 2001-02-26 15:40:54 by simonpj]
Make it build without GHCI
simonmar [Mon, 26 Feb 2001 15:07:02 +0000 (15:07 +0000)]
[project @ 2001-02-26 15:06:57 by simonmar]
Implement do-style bindings on the GHCi command line.
The syntax for a command-line is exactly that of a do statement, with
the following meanings:
- `pat <- expr'
performs expr, and binds each of the variables in pat.
- `let pat = expr; ...'
binds each of the variables in pat, doesn't do any evaluation
- `expr'
behaves as `it <- expr' if expr is IO-typed, or `let it = expr'
followed by `print it' otherwise.
simonpj [Mon, 26 Feb 2001 09:29:32 +0000 (09:29 +0000)]
[project @ 2001-02-26 09:29:32 by simonpj]
Make foldl more efficient; see comments with foldl
simonpj [Fri, 23 Feb 2001 14:59:26 +0000 (14:59 +0000)]
[project @ 2001-02-23 14:59:26 by simonpj]
Fix a core-lint problem with -hi-boot files
simonmar [Fri, 23 Feb 2001 14:44:43 +0000 (14:44 +0000)]
[project @ 2001-02-23 14:44:43 by simonmar]
- Move compareInt# to PrelBase (where it was duplicated)
- remove some unnecessary truncations in the Int8/Int16 code
simonmar [Fri, 23 Feb 2001 12:25:05 +0000 (12:25 +0000)]
[project @ 2001-02-23 12:25:05 by simonmar]
print GHC's version in the panic message
simonmar [Fri, 23 Feb 2001 12:24:11 +0000 (12:24 +0000)]
[project @ 2001-02-23 12:24:10 by simonmar]
Fix a problem with duplicate instances appearing in the interpreter
after reloading modules.
simonmar [Fri, 23 Feb 2001 10:21:29 +0000 (10:21 +0000)]
[project @ 2001-02-23 10:21:29 by simonmar]
merge rev. 1.49.2.1 from ghc-4-07-branch
simonmar [Fri, 23 Feb 2001 09:48:14 +0000 (09:48 +0000)]
[project @ 2001-02-23 09:48:14 by simonmar]
don't need to derive Show on the Package datatype now.
chak [Fri, 23 Feb 2001 01:28:12 +0000 (01:28 +0000)]
[project @ 2001-02-23 01:28:12 by chak]
Added description for -fno-method-sharing.
Shouldn't that flag be under the heading `Individual optimisations'?
qrczak [Thu, 22 Feb 2001 22:39:56 +0000 (22:39 +0000)]
[project @ 2001-02-22 22:39:56 by qrczak]
Add --keep option to not delete *.hs_make.c.
Add -c -l -C -L -i as synonyms for --cc --ld --cflag --lflag --include.
rrt [Thu, 22 Feb 2001 17:25:27 +0000 (17:25 +0000)]
[project @ 2001-02-22 17:25:27 by rrt]
Add -mno-cygwin to CPP rather than CPPFLAGS, so that it gets into mkdependC
and the like.
qrczak [Thu, 22 Feb 2001 16:48:25 +0000 (16:48 +0000)]
[project @ 2001-02-22 16:48:24 by qrczak]
Since fromInt was degraded to a function, do the same with toInt.
rrt [Thu, 22 Feb 2001 16:44:29 +0000 (16:44 +0000)]
[project @ 2001-02-22 16:44:29 by rrt]
Add -mno-cygwin to CC_OPTS on mingwin (we were building all our auxiliary
programs Cygwinised before...).
rrt [Thu, 22 Feb 2001 16:10:12 +0000 (16:10 +0000)]
[project @ 2001-02-22 16:10:12 by rrt]
-hisuf is now done by fptools/mk/target.mk
simonpj [Thu, 22 Feb 2001 13:17:59 +0000 (13:17 +0000)]
[project @ 2001-02-22 13:17:57 by simonpj]
fromInt
Remove fromInt from class Num, though it is retained
as an overloaded operation (with unchanged type) in PrelNum.
There are quite a few consequential changes in the Prelude.
I hope I got them all correct!
Also fix a bug that meant Integer (and its instances)
wasn't getting slurped in by the renamer, even though it
was needed for defaulting.
simonpj [Thu, 22 Feb 2001 13:16:48 +0000 (13:16 +0000)]
[project @ 2001-02-22 13:16:48 by simonpj]
Add more tests
rrt [Wed, 21 Feb 2001 17:35:01 +0000 (17:35 +0000)]
[project @ 2001-02-21 17:35:01 by rrt]
Move rules to tag .hi files with the way from hslibs/mk/target.mk to
fptools/mk/target.mk.
rrt [Wed, 21 Feb 2001 17:23:59 +0000 (17:23 +0000)]
[project @ 2001-02-21 17:23:59 by rrt]
Tidied up and removed discussion of solved mingw package problem.
simonpj [Wed, 21 Feb 2001 17:15:45 +0000 (17:15 +0000)]
[project @ 2001-02-21 17:15:45 by simonpj]
Add integerTyCon to the ubiquitous types
simonmar [Wed, 21 Feb 2001 16:24:34 +0000 (16:24 +0000)]
[project @ 2001-02-21 16:24:34 by simonmar]
Make this work with GHC 4.08, and remove duplicate (old) copy of Andy
Gill's HTML combinator package.
simonpj [Wed, 21 Feb 2001 12:55:48 +0000 (12:55 +0000)]
[project @ 2001-02-21 12:55:48 by simonpj]
Improve the identity-case transform in strange Coerce situations
simonpj [Wed, 21 Feb 2001 12:14:45 +0000 (12:14 +0000)]
[project @ 2001-02-21 12:14:45 by simonpj]
More wibbles
simonmar [Wed, 21 Feb 2001 11:36:01 +0000 (11:36 +0000)]
[project @ 2001-02-21 11:36:01 by simonmar]
-O turns on -fignore-asserts.
simonpj [Wed, 21 Feb 2001 11:04:17 +0000 (11:04 +0000)]
[project @ 2001-02-21 11:04:17 by simonpj]
Be a bit more careful in CoreSat.deLam
qrczak [Tue, 20 Feb 2001 18:40:54 +0000 (18:40 +0000)]
[project @ 2001-02-20 18:40:54 by qrczak]
Apply tweaks needed to let this compile: remove syn_map argument from
typecheckExpr in HscMain, import PrelNum.fromInt to modules which
use integer literals with -fno-implicit-prelude flag.
It crashes later, on Directory.hs:
ghc: panic! (the `impossible' happened):
srtExpr
I'm not sure if resolving numeric literals to top-level definitions
of fromInt/fromInteger with -fno-implicit-prelude is a good idea.
Using names from whatever module is called Prelude would be IMHO
better, probably when -fglasgow-exts is given. Prel* modules themselves
would import PrelNum as Prelude.
Both schemes break for fromInt, which is non-standard and by default
it's visible neither at the top level nor in the Prelude module. My
proposal for dealing with it is as follows (assuming that fromInteger
is taken from the module locally called Prelude instead of the top
level): when the standard Prelude is used, take fromInt from PrelNum;
when a Prelude replacement is used, use fromInt from it if available,
otherwise use its fromInteger instead. That way Prelude replacements
can ignore this non-standard extension and get the expected behavior,
or they can also choose to use this extension (in a way compatible
with Haskell implementations which allow to replace Prelude but don't
have fromInt).
simonmar [Tue, 20 Feb 2001 18:05:23 +0000 (18:05 +0000)]
[project @ 2001-02-20 18:05:23 by simonmar]
More doc hacking.
Call for Release Notes (CFRN): the 5-00-notes.sgml file is currently a
skeleton only; PLEASE add or expand entries for things you've done.
simonpj [Tue, 20 Feb 2001 15:44:26 +0000 (15:44 +0000)]
[project @ 2001-02-20 15:44:26 by simonpj]
Eta expansion wibbles
~~~~~~~~~~~~~~~~~~~~~
* Don't eta reduce, and do eta expand,
data con workers and primops
Reason: they don't have bindings, so they aren't really
ordinary variables.
This is a bit of a swamp, provoked by moving CoreSat later,
something I'm beginning to wonder about...
Not are things settled yet -- I think some rules may
not fire that should because of constructor worker/wrapper
issues. E.g when you have foldr (:) [] xs = xs
simonpj [Tue, 20 Feb 2001 15:38:45 +0000 (15:38 +0000)]
[project @ 2001-02-20 15:38:45 by simonpj]
Import wibble
simonpj [Tue, 20 Feb 2001 15:38:27 +0000 (15:38 +0000)]
[project @ 2001-02-20 15:38:27 by simonpj]
Layout wibble