ghc-hetmet.git
22 years ago[project @ 2001-09-24 11:27:31 by simonmar]
simonmar [Mon, 24 Sep 2001 11:27:31 +0000 (11:27 +0000)]
[project @ 2001-09-24 11:27:31 by simonmar]
Remove the GHC-specific instructions from this file, and bring it up
to date in various ways.

22 years ago[project @ 2001-09-24 00:22:59 by ken]
ken [Mon, 24 Sep 2001 00:22:59 +0000 (00:22 +0000)]
[project @ 2001-09-24 00:22:59 by ken]
Fix a bug with arithmetic primops on platforms where StgInt is not int,
such as the 64-bit Alpha.  The bug is that, for example,

    1# `iShiftL#` 32#

returns zero rather than 2^32.  The reason is that we should cast the
macro arguments to I_ in the definition of iShiftL#, but did not.

MERGE TO STABLE

22 years ago[project @ 2001-09-23 21:29:35 by ken]
ken [Sun, 23 Sep 2001 21:29:35 +0000 (21:29 +0000)]
[project @ 2001-09-23 21:29:35 by ken]
We need to pass the -w flag to gcc when compilng *_stub.c files
in addition to when compilng *.hc files.

MERGE TO STABLE

22 years ago[project @ 2001-09-23 20:46:46 by ken]
ken [Sun, 23 Sep 2001 20:46:46 +0000 (20:46 +0000)]
[project @ 2001-09-23 20:46:46 by ken]
CLEAN_FILES += PrelPrimopWrappers.hs # MERGE TO STABLE

22 years ago[project @ 2001-09-23 20:45:55 by ken]
ken [Sun, 23 Sep 2001 20:45:55 +0000 (20:45 +0000)]
[project @ 2001-09-23 20:45:55 by ken]
Disable debugging message.  (Only affects Alpha.)  MERGE TO STABLE

22 years ago[project @ 2001-09-23 20:45:24 by ken]
ken [Sun, 23 Sep 2001 20:45:24 +0000 (20:45 +0000)]
[project @ 2001-09-23 20:45:24 by ken]
Fix the "find" commands we use to build a source distribution.
Previously, it said things like "-exec path/{}", which doesn't work
on many find's ({} really should only appear by itself in an argument).
Now we pipe the output of find -print to sed and then to sh.  I hope
the piping to sh doesn't break source distribution creation on Win32.

MERGE TO STABLE

22 years ago[project @ 2001-09-22 12:24:57 by ken]
ken [Sat, 22 Sep 2001 12:24:57 +0000 (12:24 +0000)]
[project @ 2001-09-22 12:24:57 by ken]
Alphas: The heroic Simon Marlow found a bug in the Digital UNIX
assembler (!) wherein .quad constants inside .text sections are
first narrowed to 32 bits then sign-extended back to 64 bits.
This obviously screws up our 64-bit bitmaps, so we work around
the bug by replacing .quad with .align 3 + .long + .long
MERGE TO STABLE

22 years ago[project @ 2001-09-22 12:22:37 by ken]
ken [Sat, 22 Sep 2001 12:22:37 +0000 (12:22 +0000)]
[project @ 2001-09-22 12:22:37 by ken]
Well, GHCi doesn't work on the Alpha now, so don't even bother building it. MERGE TO STABLE

22 years ago[project @ 2001-09-22 12:13:36 by simonmar]
simonmar [Sat, 22 Sep 2001 12:13:36 +0000 (12:13 +0000)]
[project @ 2001-09-22 12:13:36 by simonmar]
Remove some duplication I just noticed in the "How to get it" section,
and move the mention of GHC's license to the "background" section.

22 years ago[project @ 2001-09-22 10:53:03 by ken]
ken [Sat, 22 Sep 2001 10:53:03 +0000 (10:53 +0000)]
[project @ 2001-09-22 10:53:03 by ken]
wibble

22 years ago[project @ 2001-09-22 10:49:31 by ken]
ken [Sat, 22 Sep 2001 10:49:31 +0000 (10:49 +0000)]
[project @ 2001-09-22 10:49:31 by ken]
wibble

22 years ago[project @ 2001-09-21 16:32:02 by simonpj]
simonpj [Fri, 21 Sep 2001 16:32:02 +0000 (16:32 +0000)]
[project @ 2001-09-21 16:32:02 by simonpj]
Simon-5.02 mods

22 years ago[project @ 2001-09-21 14:51:26 by rrt]
rrt [Fri, 21 Sep 2001 14:51:26 +0000 (14:51 +0000)]
[project @ 2001-09-21 14:51:26 by rrt]
Updates for 5.02 release. (PLEASE MERGE)

22 years ago[project @ 2001-09-21 14:07:21 by rrt]
rrt [Fri, 21 Sep 2001 14:07:21 +0000 (14:07 +0000)]
[project @ 2001-09-21 14:07:21 by rrt]
This file is now generated from primops.txt.pp and shouldn't be in the
repository any more.

22 years ago[project @ 2001-09-21 14:07:20 by rje]
rje [Fri, 21 Sep 2001 14:07:20 +0000 (14:07 +0000)]
[project @ 2001-09-21 14:07:20 by rje]
Added documentation for HaskTags to the main documentation tree.

22 years ago[project @ 2001-09-21 13:24:37 by simonmar]
simonmar [Fri, 21 Sep 2001 13:24:37 +0000 (13:24 +0000)]
[project @ 2001-09-21 13:24:37 by simonmar]
oops, it might help to commit the same version of the file that I
tested.

22 years ago[project @ 2001-09-21 11:55:56 by simonmar]
simonmar [Fri, 21 Sep 2001 11:55:56 +0000 (11:55 +0000)]
[project @ 2001-09-21 11:55:56 by simonmar]
Fix type of foreign import of getProgArgv: the first arg should be
Ptr CInt, not Ptr Int.  Fixes a bug on Alpha (not the bug I was
looking for, unfortunately).  MERGE TO STABLE.

22 years ago[project @ 2001-09-20 16:01:53 by rje]
rje [Thu, 20 Sep 2001 16:01:53 +0000 (16:01 +0000)]
[project @ 2001-09-20 16:01:53 by rje]
Now has better handling of comments.

Not a big deal, but means we don't get as many false definitions caused
by parsing comments.

22 years ago[project @ 2001-09-20 16:01:23 by simonpj]
simonpj [Thu, 20 Sep 2001 16:01:23 +0000 (16:01 +0000)]
[project @ 2001-09-20 16:01:23 by simonpj]
Argh!  Bogon in last fix!  Merge to stable!

22 years ago[project @ 2001-09-20 14:47:21 by rje]
rje [Thu, 20 Sep 2001 14:47:21 +0000 (14:47 +0000)]
[project @ 2001-09-20 14:47:21 by rje]
Now Hasktags generates Emacs etags format "TAGS" files as well as ctags format "tags" files.

It can thus be used with a wider range of editors than previously.
(specifically Emacs/XEmacs)

I don't think this change should affect anything other than hasktags itself, and it makes hasktags a lot more useful (given how many people use Emacs), so it might be good to merge this into STABLE.

22 years ago[project @ 2001-09-20 14:08:13 by sewardj]
sewardj [Thu, 20 Sep 2001 14:08:13 +0000 (14:08 +0000)]
[project @ 2001-09-20 14:08:13 by sewardj]
Detect and reject gcc versions >= 3.0 at both build-configure and
binary-dist configure time.

MERGE TO STABLE

22 years ago[project @ 2001-09-20 13:32:15 by simonmar]
simonmar [Thu, 20 Sep 2001 13:32:15 +0000 (13:32 +0000)]
[project @ 2001-09-20 13:32:15 by simonmar]
Ignore RULES pragmas when -fglasgow-exts is off.

22 years ago[project @ 2001-09-20 12:15:41 by simonpj]
simonpj [Thu, 20 Sep 2001 12:15:41 +0000 (12:15 +0000)]
[project @ 2001-09-20 12:15:41 by simonpj]
Remove dead code (no need to merge to stable branch)

22 years ago[project @ 2001-09-20 12:15:20 by simonpj]
simonpj [Thu, 20 Sep 2001 12:15:20 +0000 (12:15 +0000)]
[project @ 2001-09-20 12:15:20 by simonpj]
Add debug stuff (no need to merge to stable branch)

22 years ago[project @ 2001-09-20 12:14:31 by simonpj]
simonpj [Thu, 20 Sep 2001 12:14:31 +0000 (12:14 +0000)]
[project @ 2001-09-20 12:14:31 by simonpj]
------------------------------------------------
Make code generation ignore isLocalId/isGlobalId
------------------------------------------------

MERGE WITH STABLE BRANCH

CorePrep may introduce some new, top-level LocalIds.  This
breaks an invariant that the core2stg/code generator passes
occasionally used, namely that LocalIds are not top-level bound.

This commit fixes that problem.

It also removes an assert from CodeGen.cgTopRhs that asks
for the CgInfo of such new LocalIds -- but they may (legitimately)
not have any, so it was a bad ASSERT.  [Showed up in George
Russel's system.]

22 years ago[project @ 2001-09-20 08:47:13 by simonpj]
simonpj [Thu, 20 Sep 2001 08:47:13 +0000 (08:47 +0000)]
[project @ 2001-09-20 08:47:13 by simonpj]
------------------------------
Fix a scoped-type-variable bug
------------------------------

MERGE WITH STABLE BRANCH

The bug caused an incorrect failure when the same type
variable was used more than once in a collection of patterns:

f (x :: t) (y :: t) = e

On the way, I eliminated bindNakedTyVarsFVRn, which was only
called once.

22 years ago[project @ 2001-09-19 14:06:03 by simonmar]
simonmar [Wed, 19 Sep 2001 14:06:03 +0000 (14:06 +0000)]
[project @ 2001-09-19 14:06:03 by simonmar]
on second thoughts, don't specialise if it isn't worth it

22 years ago[project @ 2001-09-19 14:05:01 by simonmar]
simonmar [Wed, 19 Sep 2001 14:05:01 +0000 (14:05 +0000)]
[project @ 2001-09-19 14:05:01 by simonmar]
Add some specialisations for Complex Double.

(are SPECIALISE instance pragmas now ignored?)

22 years ago[project @ 2001-09-18 14:42:33 by simonmar]
simonmar [Tue, 18 Sep 2001 14:42:33 +0000 (14:42 +0000)]
[project @ 2001-09-18 14:42:33 by simonmar]
Rearrange some code in order to make printing of Ints go a little faster.

22 years ago[project @ 2001-09-18 11:33:58 by simonmar]
simonmar [Tue, 18 Sep 2001 11:33:58 +0000 (11:33 +0000)]
[project @ 2001-09-18 11:33:58 by simonmar]
document new --auto-ghci-libs option.

22 years ago[project @ 2001-09-18 11:07:58 by simonmar]
simonmar [Tue, 18 Sep 2001 11:07:58 +0000 (11:07 +0000)]
[project @ 2001-09-18 11:07:58 by simonmar]
- Add some sanity checking to --add-package: it won't accept a package
  config that refers to directories that don't exist, and it will
  check for the existence of the Haskell libraries.

- Automatically generate the GHCi .o versions of the .a libs, if the
  --auto-ghci-libs option is given (otherwise, just warn about their
  non-existence).

22 years ago[project @ 2001-09-18 08:53:01 by simonmar]
simonmar [Tue, 18 Sep 2001 08:53:01 +0000 (08:53 +0000)]
[project @ 2001-09-18 08:53:01 by simonmar]
Don't check for an installed GHC if the user said --with-ghc=... or
GHC=... ./configure.

22 years ago[project @ 2001-09-18 08:32:11 by simonmar]
simonmar [Tue, 18 Sep 2001 08:32:11 +0000 (08:32 +0000)]
[project @ 2001-09-18 08:32:11 by simonmar]
- export hGetcBuffered, which is used by the compiler (StringBuffer)
- don't export commitBuffer.

22 years ago[project @ 2001-09-17 22:46:59 by ken]
ken [Mon, 17 Sep 2001 22:46:59 +0000 (22:46 +0000)]
[project @ 2001-09-17 22:46:59 by ken]
The size of a large bitmap is in number of (32- or 64-bit) words,
not 32-bit words. MERGE TO STABLE

22 years ago[project @ 2001-09-17 17:40:10 by rrt]
rrt [Mon, 17 Sep 2001 17:40:10 +0000 (17:40 +0000)]
[project @ 2001-09-17 17:40:10 by rrt]
Update License not to have a blank line at the start and announce to look
tidier (but it's still not v5.02).

PLEASE MERGE

22 years ago[project @ 2001-09-17 17:23:32 by sewardj]
sewardj [Mon, 17 Sep 2001 17:23:32 +0000 (17:23 +0000)]
[project @ 2001-09-17 17:23:32 by sewardj]
Fix utterly bogus implementation of system on Windoze.

22 years ago[project @ 2001-09-17 16:51:55 by simonmar]
simonmar [Mon, 17 Sep 2001 16:51:55 +0000 (16:51 +0000)]
[project @ 2001-09-17 16:51:55 by simonmar]
More small performance improvements

22 years ago[project @ 2001-09-17 16:21:41 by simonmar]
simonmar [Mon, 17 Sep 2001 16:21:41 +0000 (16:21 +0000)]
[project @ 2001-09-17 16:21:41 by simonmar]
Subvert GHC's full-laziness optimisation by explicitly lambda-lifting
a local lambda expression to the top level, and exporting it to ensure
it doesn't get inlined.  Without this hack, full-laziness will float
out several subexpressions, which turns out to be a pessimisation in
this case.

This is worth about 20% in hPutStr performance, so we now beat the old
I/O library on 'cat' ;-)

I'd like to MERGE TO STABLE this, but 5.02 is imminent so it might
have to wait until 5.02.1.

22 years ago[project @ 2001-09-17 14:58:09 by simonmar]
simonmar [Mon, 17 Sep 2001 14:58:09 +0000 (14:58 +0000)]
[project @ 2001-09-17 14:58:09 by simonmar]
Fix a couple more cut-n-pastos in the line-buffered version of
hPutStr.  Also fill in the export list while I'm here.

MERGE TO STABLE

22 years ago[project @ 2001-09-17 13:46:26 by sewardj]
sewardj [Mon, 17 Sep 2001 13:46:26 +0000 (13:46 +0000)]
[project @ 2001-09-17 13:46:26 by sewardj]
Give a fixity declaration for seq.

22 years ago[project @ 2001-09-17 12:12:31 by sewardj]
sewardj [Mon, 17 Sep 2001 12:12:31 +0000 (12:12 +0000)]
[project @ 2001-09-17 12:12:31 by sewardj]
Update for 5.02.

MERGE TO STABLE

22 years ago[project @ 2001-09-17 10:35:46 by simonpj]
simonpj [Mon, 17 Sep 2001 10:35:46 +0000 (10:35 +0000)]
[project @ 2001-09-17 10:35:46 by simonpj]
Bogon in defn of seq (caused lint error in PrelIO)

22 years ago[project @ 2001-09-17 09:52:21 by rrt]
rrt [Mon, 17 Sep 2001 09:52:21 +0000 (09:52 +0000)]
[project @ 2001-09-17 09:52:21 by rrt]
The list of steps to go through when making an InstallShield. This
forms the basis of what needs to be automated in make install after
the 5.02 release.

22 years ago[project @ 2001-09-17 09:51:23 by simonmar]
simonmar [Mon, 17 Sep 2001 09:51:23 +0000 (09:51 +0000)]
[project @ 2001-09-17 09:51:23 by simonmar]
Knock the FFI documentation into some sort of shape for the release:

- The blurb about "the FFI is in two/three parts..." was repeated in
  three places.  We also at some point seem to have lost the property
  that the FFI spec is a self-contained document; I don't try to fix
  that here, since we're going to replace it with the new spec at some
  point.

- Replace references to Addr and ForeignObj with Ptr and ForeignPtr.

- Remove mentions of GHC's ByteArray and MutableByteArray types, as
  these are deprecated and will be removed in a couple of versions.
  (mostly subsumed by allocaBytes and friends).

- Catch up with GHC's removal of the library specification from foreign
  import.  Mention that libraries are specified in a compiler-dependent
  way now, and that GHC uses either packages or command-line opts for
  this.

- Fix up some markup.

22 years ago[project @ 2001-09-17 09:28:01 by sewardj]
sewardj [Mon, 17 Sep 2001 09:28:01 +0000 (09:28 +0000)]
[project @ 2001-09-17 09:28:01 by sewardj]
primRepToSize: for PrimReps which we don't know how to handle,
abort compilation and advise user to use -fvia-C, rather than
continuing with a bogus Size which may silently cause incorrect
code to be generated.

MERGE TO STABLE

22 years ago[project @ 2001-09-15 04:29:58 by ken]
ken [Sat, 15 Sep 2001 04:29:58 +0000 (04:29 +0000)]
[project @ 2001-09-15 04:29:58 by ken]
Make the binary distribution Makefile work with non-GNU make when
installing in-place. MERGE TO STABLE

22 years ago[project @ 2001-09-14 16:54:13 by qrczak]
qrczak [Fri, 14 Sep 2001 16:54:13 +0000 (16:54 +0000)]
[project @ 2001-09-14 16:54:13 by qrczak]
Make -c actually working (as --cc).

22 years ago[project @ 2001-09-14 16:01:20 by sewardj]
sewardj [Fri, 14 Sep 2001 16:01:20 +0000 (16:01 +0000)]
[project @ 2001-09-14 16:01:20 by sewardj]
Update version to 5.02.

MERGE TO STABLE

22 years ago[project @ 2001-09-14 15:56:40 by simonmar]
simonmar [Fri, 14 Sep 2001 15:56:40 +0000 (15:56 +0000)]
[project @ 2001-09-14 15:56:40 by simonmar]
Document how to use "foreign export" with GHC, including how to call
startupHaskell()/shutdownHaskell() when providing your own main().

22 years ago[project @ 2001-09-14 15:53:41 by sewardj]
sewardj [Fri, 14 Sep 2001 15:53:41 +0000 (15:53 +0000)]
[project @ 2001-09-14 15:53:41 by sewardj]
merge rev 1.47.2.1:

* typo ('-help' -> '--help')

22 years ago[project @ 2001-09-14 15:51:41 by simonpj]
simonpj [Fri, 14 Sep 2001 15:51:43 +0000 (15:51 +0000)]
[project @ 2001-09-14 15:51:41 by simonpj]
--------------------------
Add a rule-check pass
(special request by Manuel)
--------------------------

DO NOT merge with stable

The flag

-frule-check foo

will report all sites at which RULES whose name starts with "foo.."
might apply, but in fact the arguments don't match so the rule
doesn't apply.

The pass is run right after all the core-to-core passes.  (Next thing
to do: make the core-to-core script external, so you can fiddle with
it.  Meanwhile, the core-to-core script is in
DriverState.builCoreToDo
so you can move the CoreDoRuleCheck line around if you want.

The format of the report is experimental: Manuel, feel free to fiddle
with it.

Most of the code is in specialise/Rules.lhs

Incidental changes
~~~~~~~~~~~~~~~~~~
Change BuiltinRule so that the rule name is accessible
without actually successfully applying the rule.  This
change affects quite a few files in a trivial way.

22 years ago[project @ 2001-09-14 15:49:56 by simonpj]
simonpj [Fri, 14 Sep 2001 15:49:56 +0000 (15:49 +0000)]
[project @ 2001-09-14 15:49:56 by simonpj]
-----------------
Make seq built in
-----------------

DO NOT merge with stable

Until this commit 'seq' used a cunning hack so that it
seems to be *non-strict* in its second argument:

  seq x y = case seq# x of { 0 -> y; other -> error "urk" }

The reason for this is to make sure that x is evaluated before y,
which is what you want in a parallel setting.

But in a *sequential* settting, this simply destroys strictness
information about y.  Now that people are starting to use seq more,
this is becoming painful.  People sometimes use seq to make their
function strict, and are surprised when it becomes non-strict in other
arguments!

So this commit changes seq so that it does what you would naively
expect:

seq x y = case x of { any -> y }

This is done by making seq built-in, defined along with
unsafeCoerce
getTag

in MkId.lhs.  (I considered giving their unfoldings in
PrelGHC.hi-boot.pp, but then there is the matter of making sure they
are unfolded, since these fns don't have top-level curried defns,
so I held off and did seq the same way as the other two.)

I renamed PrelConc.seq as PrelConc.pseq; maybe its name will change
to `then` or `before` or something else.  That's up to the GPH
folk.

22 years ago[project @ 2001-09-14 15:45:53 by simonpj]
simonpj [Fri, 14 Sep 2001 15:45:53 +0000 (15:45 +0000)]
[project @ 2001-09-14 15:45:53 by simonpj]
Add comments

22 years ago[project @ 2001-09-14 15:44:13 by simonpj]
simonpj [Fri, 14 Sep 2001 15:44:13 +0000 (15:44 +0000)]
[project @ 2001-09-14 15:44:13 by simonpj]
--------------------------
Cleanup in DataCon
--------------------------

DO NOT merge with stable

The dataConRepStrictness call used to reuturn a [Demand],
but that's a bit misleading.  In particular, consider a  strict
constructor

data Foo = MkFoo ![Int]

Then the wrapper MkFoo is strict, but the worker $wMkFoo is not.

MkFoo x = case x of { DEFAULT -> $wMkFoo x }

Nevertheless, when we pattern-match on $wMkFoo we will surely
find an evaluated component to the data structure, and that is
what dataConRepStrictness reports, and that's how it is used
in Simplify.

Solution: make dataConRepStrictness return [StrictnessMark]
not [Demand]. A small matter really.

22 years ago[project @ 2001-09-14 14:51:06 by simonmar]
simonmar [Fri, 14 Sep 2001 14:51:06 +0000 (14:51 +0000)]
[project @ 2001-09-14 14:51:06 by simonmar]
oops: hPutStr wasn't flushing a line-buffered handle properly at the
end of a line.

MERGE TO STABLE

22 years ago[project @ 2001-09-14 13:52:21 by sewardj]
sewardj [Fri, 14 Sep 2001 13:52:21 +0000 (13:52 +0000)]
[project @ 2001-09-14 13:52:21 by sewardj]
Make rotate fns work properly when rotate count is a multiple of the
word size.  This fixes sparc failures in
ghc-regress/numeric/should_run/arith011.  Also fix some
copy-and-paste-o-s.Killed by signal 2.

MERGE TO STABLE

22 years ago[project @ 2001-09-13 15:54:43 by simonmar]
simonmar [Thu, 13 Sep 2001 15:54:43 +0000 (15:54 +0000)]
[project @ 2001-09-13 15:54:43 by simonmar]
Back out the change to remove Ord as a superclass of Ix; the revised
Haskell 98 report will no longer have this change.

22 years ago[project @ 2001-09-13 14:44:24 by simonpj]
simonpj [Thu, 13 Sep 2001 14:44:24 +0000 (14:44 +0000)]
[project @ 2001-09-13 14:44:24 by simonpj]
More error-message grammar

22 years ago[project @ 2001-09-12 15:52:40 by sewardj]
sewardj [Wed, 12 Sep 2001 15:52:40 +0000 (15:52 +0000)]
[project @ 2001-09-12 15:52:40 by sewardj]
merge (ghc-5-02-branch --> HEAD):

Bugfix: there was an implicit assumption that the list of slots passed
to freeStackSlots was already sorted, whereas in fact this wasn't the
case for at least one call.  Now we explicitly sort the list in
freeStackSlots, removing the hidden assumption.

The symptoms of this bug include crashes (perhaps the "AsmCodeGen"
crash), and a tendency to grow the stack a lot when let-no-escapes are
involved (because the bug caused fragmentation of the stack free list,
so we weren't re-using free slots properly).
  1.17.2.1  +3 -2      fptools/ghc/compiler/codeGen/CgStackery.lhs

ASSERT that the list of stack slots we calculate in buildLivenessMask
is sorted, because we rely on that property later.
  1.38.2.1  +5 -6      fptools/ghc/compiler/codeGen/CgBindery.lhs

22 years ago[project @ 2001-09-12 14:53:39 by sewardj]
sewardj [Wed, 12 Sep 2001 14:53:39 +0000 (14:53 +0000)]
[project @ 2001-09-12 14:53:39 by sewardj]
Redo half-arsed hacks to do with BSS symbols on ELF.  Hopefully get it
right this time.

MERGE TO STABLE

22 years ago[project @ 2001-09-12 11:52:58 by rrt]
rrt [Wed, 12 Sep 2001 11:52:58 +0000 (11:52 +0000)]
[project @ 2001-09-12 11:52:58 by rrt]
Do the ifdefery properly so it works on Unix.

22 years ago[project @ 2001-09-12 11:24:18 by rrt]
rrt [Wed, 12 Sep 2001 11:24:18 +0000 (11:24 +0000)]
[project @ 2001-09-12 11:24:18 by rrt]
Updated to new directory structure (no extra-bin), and with all the right
binaries in bin.

22 years ago[project @ 2001-09-12 11:16:05 by rrt]
rrt [Wed, 12 Sep 2001 11:16:05 +0000 (11:16 +0000)]
[project @ 2001-09-12 11:16:05 by rrt]
Make hsc2hs find template-hsc.h on Windows. This involves putting Main.hs
through cpp; to avoid the string gap problem preprocessing
__GLASGOW_HASKELL__ into its value inside strings, make judicious use of ++
(hope that's OK, Marcin; there seemed very little point in putting it all in
KludgedSystem this time).

22 years ago[project @ 2001-09-12 11:05:34 by qrczak]
qrczak [Wed, 12 Sep 2001 11:05:34 +0000 (11:05 +0000)]
[project @ 2001-09-12 11:05:34 by qrczak]
Fix comment.

22 years ago[project @ 2001-09-12 10:22:19 by qrczak]
qrczak [Wed, 12 Sep 2001 10:22:19 +0000 (10:22 +0000)]
[project @ 2001-09-12 10:22:19 by qrczak]
Fix creating HSstd.o.

22 years ago[project @ 2001-09-12 05:52:13 by qrczak]
qrczak [Wed, 12 Sep 2001 05:52:13 +0000 (05:52 +0000)]
[project @ 2001-09-12 05:52:13 by qrczak]
Don't exclude PrelMain.o from libHSstd.a.

22 years ago[project @ 2001-09-11 11:13:22 by rje]
rje [Tue, 11 Sep 2001 11:13:22 +0000 (11:13 +0000)]
[project @ 2001-09-11 11:13:22 by rje]
hasktags is now built as part of the standard build process.

22 years ago[project @ 2001-09-11 09:02:43 by simonpj]
simonpj [Tue, 11 Sep 2001 09:02:43 +0000 (09:02 +0000)]
[project @ 2001-09-11 09:02:43 by simonpj]
--------------------------
Strictness of blockAsynch
--------------------------

MERGE WITH STABLE BRANCH

If we're going to supply strictness info for blockAsynchExceptions#,
it should match its arity (as other State# transformers do).

22 years ago[project @ 2001-09-11 08:18:16 by simonpj]
simonpj [Tue, 11 Sep 2001 08:18:16 +0000 (08:18 +0000)]
[project @ 2001-09-11 08:18:16 by simonpj]
-----------------------
More demand-info fixes
-----------------------

MERGE WITH STABLE BRANCH

There are a handful of functions in IdInfo that zap the
demand-info stored in an Id.  Alas, they were zapping the
*old* demand-info not the new one.  (The old one is still
there for comparison purposes.)  So we were getting some
spurious warnings and (more seriously) potentially some
incorrect strictness.  Easily fixed though.

22 years ago[project @ 2001-09-10 16:48:10 by simonmar]
simonmar [Mon, 10 Sep 2001 16:48:10 +0000 (16:48 +0000)]
[project @ 2001-09-10 16:48:10 by simonmar]
Sync the documentation with the extra-bin removal.

22 years ago[project @ 2001-09-10 12:57:59 by simonmar]
simonmar [Mon, 10 Sep 2001 12:57:59 +0000 (12:57 +0000)]
[project @ 2001-09-10 12:57:59 by simonmar]
oops, revert accidental commit

22 years ago[project @ 2001-09-10 12:57:25 by simonmar]
simonmar [Mon, 10 Sep 2001 12:57:25 +0000 (12:57 +0000)]
[project @ 2001-09-10 12:57:25 by simonmar]
good riddance

22 years ago[project @ 2001-09-10 12:53:21 by simonmar]
simonmar [Mon, 10 Sep 2001 12:53:21 +0000 (12:53 +0000)]
[project @ 2001-09-10 12:53:21 by simonmar]
Remove the "extra-bin" subdirectory from $(libexecdir), since there
are too many assumptions in the tree that $(libexecdir) == $(libdir)
(at the moment, binary dists are fairly well broken).

Reuben has promised to track the change in the Windows distribution.

22 years ago[project @ 2001-09-10 10:07:21 by rje]
rje [Mon, 10 Sep 2001 10:07:21 +0000 (10:07 +0000)]
[project @ 2001-09-10 10:07:21 by rje]
Fixed a bug in TICKY_TICKY profiling.

Previously, the TICK_ENT_DIRECT event was logged before the heap/stack
check was done. As a result, if the check failed, the TICK_ENT_DIRECT
event would be logged a second time, causing TICKY_TICKY to give innacurate
numbers.

This patch shouldn't have any affect on non-ticky compilation.

Also changed the modified bit of code to use "do" notation, and so look a bit
neater.

22 years ago[project @ 2001-09-10 07:25:17 by simonpj]
simonpj [Mon, 10 Sep 2001 07:25:17 +0000 (07:25 +0000)]
[project @ 2001-09-10 07:25:17 by simonpj]
Fix ungramatical error message

22 years ago[project @ 2001-09-10 07:24:09 by simonpj]
simonpj [Mon, 10 Sep 2001 07:24:09 +0000 (07:24 +0000)]
[project @ 2001-09-10 07:24:09 by simonpj]
-----------------------------------
Fix a strictness bug in the simplifier
-----------------------------------

This one has been there a long time, but hasn't bitten till
now.  We should never float a let that is marked "sure to be
evaluated" out of a let.  It shouldn't happen, and there was
a warning to check, but the warning cried 'wolf' too often, so
we have generally ignored it. But the wolf called for supper,
when compiling spectral/expert with profiling on.

The fix is simple too:
* use exprIsValue not exprIsCheap as the test
* move the warning, so it doesn't cry wolf

Documentation with Simplify.simplRhs.

On the way, I'm going to conmmit a change in the same module,
which keeps unfolding info on lambda-bound variables.  This
improves the elimination of cases when the wrapper does the
'seq' -- then the worker gets to know that the arg is evaluated.

22 years ago[project @ 2001-09-08 22:40:38 by ken]
ken [Sat, 8 Sep 2001 22:40:38 +0000 (22:40 +0000)]
[project @ 2001-09-08 22:40:38 by ken]
Make the binary distribution configure recognize alphaev56-dec-osf5.
MERGE TO STABLE.

22 years ago[project @ 2001-09-08 21:42:07 by sof]
sof [Sat, 8 Sep 2001 21:42:07 +0000 (21:42 +0000)]
[project @ 2001-09-08 21:42:07 by sof]
Remove ugly special casing - if you want to turn off the
default rule for GHCI_LIBRARY, set DONT_WANT_STD_GHCI_LIB_RULE
to YES in your Makefile prior to including $(TOP)/mk/target.mk

ghc/lib/std and hslibs/win32 both do this now on mingw32.

22 years ago[project @ 2001-09-07 16:52:53 by simonpj]
simonpj [Fri, 7 Sep 2001 16:52:53 +0000 (16:52 +0000)]
[project @ 2001-09-07 16:52:53 by simonpj]
Make isStrictDmd give the right answer

22 years ago[project @ 2001-09-07 16:46:21 by simonpj]
simonpj [Fri, 7 Sep 2001 16:46:21 +0000 (16:46 +0000)]
[project @ 2001-09-07 16:46:21 by simonpj]
Make dmdFix not loop forever

22 years ago[project @ 2001-09-07 16:08:31 by sewardj]
sewardj [Fri, 7 Sep 2001 16:08:31 +0000 (16:08 +0000)]
[project @ 2001-09-07 16:08:31 by sewardj]
Fix compilation with -DDEBUG.

MERGE TO STABLE

22 years ago[project @ 2001-09-07 13:38:55 by simonpj]
simonpj [Fri, 7 Sep 2001 13:38:55 +0000 (13:38 +0000)]
[project @ 2001-09-07 13:38:55 by simonpj]
Improve the error message for duplicate or invalid binders
in a binding group.

[Consequence: rnfail034 should not be an expected failure
      any more]

MERGE WITH STABLE BRANCH

22 years ago[project @ 2001-09-07 12:44:30 by simonpj]
simonpj [Fri, 7 Sep 2001 12:44:30 +0000 (12:44 +0000)]
[project @ 2001-09-07 12:44:30 by simonpj]
----------------------------------------
Make dict funs and default methods
into LocalIds only at their binding site
----------------------------------------
        [part of 3 related commits]

There's a long comment about this with MkId.mkDefaultMethodId,
which I reproduce below.

While I was at it, I renamed setIdNoDiscard to setIdLocalExported.
Which is hardly an improvement, I'm afraid.  This renaming touches
Var.lhs, Id.lhs, SimplCore.lhs
in a trivial way.

---------------------

Dict funs and default methods are *not* ImplicitIds.  Their definition
involves user-written code, so we can't figure out their strictness etc
based on fixed info, as we can for constructors and record selectors (say).

We build them as GlobalIds, but when in the module where they are
bound, we turn the Id at the *binding site* into an exported LocalId.
This ensures that they are taken to account by free-variable finding
and dependency analysis (e.g. CoreFVs.exprFreeVars).   The simplifier
will propagate the LocalId to all occurrence sites.

Why shouldn't they be bound as GlobalIds?  Because, in particular, if
they are globals, the specialiser floats dict uses above their defns,
which prevents good simplifications happening.  Also the strictness
analyser treats a occurrence of a GlobalId as imported and assumes it
contains strictness in its IdInfo, which isn't true if the thing is
bound in the same module as the occurrence.

It's OK for dfuns to be LocalIds, because we form the instance-env to
pass on to the next module (md_insts) in CoreTidy, afer tidying
and globalising the top-level Ids.

BUT make sure they are *exported* LocalIds (setIdLocalExported) so
that they aren't discarded by the occurrence analyser.

22 years ago[project @ 2001-09-07 12:43:28 by simonpj]
simonpj [Fri, 7 Sep 2001 12:43:28 +0000 (12:43 +0000)]
[project @ 2001-09-07 12:43:28 by simonpj]
-----------------------------------
Pin on accurate strictness info for
record and dictionary selectors
-----------------------------------
        [part of 3 related commits]

This fixes a long-standing infelicity.  Sometimes selectors aren't
inlined until after strictness analysis, so if we don't have decent
strictness info on them we get bad strictness results.

For record selectors, the unboxing-strict-fields stuff makes it hard
to figurwe out the correct strictness, so we just invoke the demand
analyser to work it out.

22 years ago[project @ 2001-09-07 12:42:46 by simonpj]
simonpj [Fri, 7 Sep 2001 12:42:47 +0000 (12:42 +0000)]
[project @ 2001-09-07 12:42:46 by simonpj]
------------------------
Fix the demand analyser
------------------------

A spiffy new domain for demands, and definitions for lub/both
which are actually monotonic.   Quite a bit of related jiggling
around.

One of the original motivations was to do with functions like:

sum n []     = n
sum n (x:xs) = sum (n+x) xs

Even though n is returned boxed from the first case, we don't want
to get strictness
S(L)V -> T
because that means we pass the box for n, and that is TERRIBLE.
So the new version errs on the side of unboxing, more like the forwards
analyser, and only passes the box if it is *definitely* needed, rather
than if it *may* be needed.

22 years ago[project @ 2001-09-07 12:34:54 by simonpj]
simonpj [Fri, 7 Sep 2001 12:34:54 +0000 (12:34 +0000)]
[project @ 2001-09-07 12:34:54 by simonpj]
Omit unnecessary import

22 years ago[project @ 2001-09-07 12:34:03 by simonpj]
simonpj [Fri, 7 Sep 2001 12:34:04 +0000 (12:34 +0000)]
[project @ 2001-09-07 12:34:03 by simonpj]
-------------------
Newtypes and ccalls
     [addendum]
-------------------

MERGE WITH STABLE BRANCH

I accidentally omitted these two wibbles from my previous commit.
I've added PrelNames.unitTyConKey, and used it in TcType and DsCCall.

22 years ago[project @ 2001-09-07 12:30:15 by simonpj]
simonpj [Fri, 7 Sep 2001 12:30:15 +0000 (12:30 +0000)]
[project @ 2001-09-07 12:30:15 by simonpj]
-------------------
Newtypes and ccalls
-------------------

MERGE WITH STABLE BRANCH

Yet another bit of newtype-squashing that hadn't been
synced with reality.  In desugaring ccalls, we can still
see newtypes, if they are recursive, and we must generate
appropriate coerces.

Fixes a bug in cg011.

22 years ago[project @ 2001-09-06 21:08:16 by ken]
ken [Thu, 6 Sep 2001 21:08:16 +0000 (21:08 +0000)]
[project @ 2001-09-06 21:08:16 by ken]
Fix the code to *really* do the following:

On the Alpha we can only handle <= 4 integer arguments with foreign export
dynamic.  Following the example of the corresponding Sparc hack, we detect
when we're being asked to do something we can't and refuse.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-09-06 15:54:48 by apt]
apt [Thu, 6 Sep 2001 15:54:48 +0000 (15:54 +0000)]
[project @ 2001-09-06 15:54:48 by apt]
document -fext-core flag and set pointers to ext-core docs/tools (MERGE to STABLE pleeeeeease.)

22 years ago[project @ 2001-09-06 15:43:35 by simonpj]
simonpj [Thu, 6 Sep 2001 15:43:35 +0000 (15:43 +0000)]
[project @ 2001-09-06 15:43:35 by simonpj]
Import wibbles

22 years ago[project @ 2001-09-06 15:38:16 by sewardj]
sewardj [Thu, 6 Sep 2001 15:38:16 +0000 (15:38 +0000)]
[project @ 2001-09-06 15:38:16 by sewardj]
Change a couple more Int32s into CTimes, which they are really.

22 years ago[project @ 2001-09-06 15:15:23 by sewardj]
sewardj [Thu, 6 Sep 2001 15:15:23 +0000 (15:15 +0000)]
[project @ 2001-09-06 15:15:23 by sewardj]
Convert some CInts into CTimes.

MERGE TO STABLE.

22 years ago[project @ 2001-09-06 14:41:21 by apt]
apt [Thu, 6 Sep 2001 14:41:21 +0000 (14:41 +0000)]
[project @ 2001-09-06 14:41:21 by apt]
add pointer to primops.txt documentation feature

22 years ago[project @ 2001-09-06 14:26:14 by apt]
apt [Thu, 6 Sep 2001 14:26:14 +0000 (14:26 +0000)]
[project @ 2001-09-06 14:26:14 by apt]
change ext-core output file suffix from .core (too easy to delete accidentally) to .hcr (MERGE TO STABLE)

22 years ago[project @ 2001-09-06 10:03:32 by sewardj]
sewardj [Thu, 6 Sep 2001 10:03:32 +0000 (10:03 +0000)]
[project @ 2001-09-06 10:03:32 by sewardj]
Fix cpp-inspired sparc breakage.  Sigh.

22 years ago[project @ 2001-09-05 15:15:33 by sewardj]
sewardj [Wed, 5 Sep 2001 15:15:33 +0000 (15:15 +0000)]
[project @ 2001-09-05 15:15:33 by sewardj]
Fix 32-bit breakage.  Int32 is the wrong thing; CInt is probably
right.  I assume that Alpha is LP64, so that on Alpha
   sizeof(int) = 32, sizeof(long) = 64
and that these are both sized at 32 for 32-bit platforms.

22 years ago[project @ 2001-09-05 04:03:15 by ken]
ken [Wed, 5 Sep 2001 04:03:15 +0000 (04:03 +0000)]
[project @ 2001-09-05 04:03:15 by ken]
Replace CLong with CInt32 to fix 32-bit assumption. MERGE TO STABLE BRANCH

22 years ago[project @ 2001-09-04 18:29:20 by ken]
ken [Tue, 4 Sep 2001 18:29:22 +0000 (18:29 +0000)]
[project @ 2001-09-04 18:29:20 by ken]
THIS CHANGE AFFECTS ALL OBJECT FILES COMPILED FROM HASKELL.
Please say "make -C ghc/lib/std clean; make -C hslibs clean".

This commit eliminates spurious warning messages when compiling on
the Alpha.  There are two kinds of spurious warning messages:

(1) gcc: -noprefix_recognition: linker input file unused since linking not done

    This warning is because we pass the flag "-Xlinker -noprefix_recognition"
    to gcc.  We remove this warning by no longer passing the flag to gcc,
    and by removing the reason we were passing the flag in the first place:
    __init_* is now renamed to __stginit_*.

(2) .../includes/Regs.h: warning: call-clobbered register used for global
    register variable

    This warning and all other warnings except (1), we eliminate by
    passing the -w flag to gcc.

MERGE TO STABLE BRANCH

22 years ago[project @ 2001-09-04 18:22:34 by ken]
ken [Tue, 4 Sep 2001 18:22:34 +0000 (18:22 +0000)]
[project @ 2001-09-04 18:22:34 by ken]
On the Alpha we can only handle <= 4 integer arguments with foreign export
dynamic.  Following the example of the corresponding Sparc hack, we detect
when we're being asked to do something we can't and refuse.

MERGE TO STABLE BRANCH