ghc-hetmet.git
22 years ago[project @ 2001-09-28 23:36:50 by sof]
sof [Fri, 28 Sep 2001 23:36:50 +0000 (23:36 +0000)]
[project @ 2001-09-28 23:36:50 by sof]
Provide finer-grained control for turning off mk/target.mk's
'all', 'boot' and 'install' rules. i.e., instead of having
the variable NO_ALL_TARGETS control the defnition of rules
for all three, NO_ALL_TARGET, NO_BOOT_TARGET, and NO_INSTALL_TARGET
lets you individually control which ones you don't want.

Sub-projects (GC and HDirect, for example) have the need
to turn off the 'boot' rule, which is what motivated this
change.

22 years ago[project @ 2001-09-28 10:59:50 by rrt]
rrt [Fri, 28 Sep 2001 10:59:50 +0000 (10:59 +0000)]
[project @ 2001-09-28 10:59:50 by rrt]
Tweaks to the 5.02 InstallShield to improve presentation and the range of
help files available.

22 years ago[project @ 2001-09-27 23:10:52 by sof]
sof [Thu, 27 Sep 2001 23:10:52 +0000 (23:10 +0000)]
[project @ 2001-09-27 23:10:52 by sof]
Inline BasicTypes.CompilerPhase tysyn to workaround
Outputable <--> BasicTypes module loop.

22 years ago[project @ 2001-09-27 09:49:46 by rrt]
rrt [Thu, 27 Sep 2001 09:49:46 +0000 (09:49 +0000)]
[project @ 2001-09-27 09:49:46 by rrt]
Add note that it's possible to move the Windows GHC tree around if you want
to (e.g. to get it on a path without spaces).

22 years ago[project @ 2001-09-26 16:27:04 by simonpj]
simonpj [Wed, 26 Sep 2001 16:27:04 +0000 (16:27 +0000)]
[project @ 2001-09-26 16:27:04 by simonpj]
Wibble

22 years ago[project @ 2001-09-26 16:22:04 by simonpj]
simonpj [Wed, 26 Sep 2001 16:22:04 +0000 (16:22 +0000)]
[project @ 2001-09-26 16:22:04 by simonpj]
Specialise reduce

22 years ago[project @ 2001-09-26 16:19:28 by simonpj]
simonpj [Wed, 26 Sep 2001 16:19:30 +0000 (16:19 +0000)]
[project @ 2001-09-26 16:19:28 by simonpj]
------------------
Simon's big commit
------------------
[ These files seem to have been left out for some reason ]

This commit, which I don't think I can sensibly do piecemeal, consists
of the things I've been doing recently, mainly directed at making
Manuel, George, and Marcin happier with RULES.

Reogranise the simplifier
~~~~~~~~~~~~~~~~~~~~~~~~~
1. The simplifier's environment is now an explicit parameter.  This
makes it a bit easier to figure out where it is going.

2. Constructor arguments can now be arbitrary expressions, except
when the application is the RHS of a let(rec).  This makes it much
easier to match rules like

RULES
    "foo"  f (h x, g y) = f' x y

In the simplifier, it's Simplify.mkAtomicArgs that ANF-ises a
constructor application where necessary.  In the occurrence analyser,
there's a new piece of context info (OccEncl) to say whether a
constructor app is in a place where it should be in ANF.  (Unless
it knows this it'll give occurrence info which will inline the
argument back into the constructor app.)

3. I'm experimenting with doing the "float-past big lambda" transformation
in the full laziness pass, rather than mixed in with the simplifier (was
tryRhsTyLam).

4.  Arrange that
case (coerce (S,T) (x,y)) of ...
will simplify.  Previous it didn't.
A local change to CoreUtils.exprIsConApp_maybe.

5. Do a better job in CoreUtils.exprEtaExpandArity when there's an
error function in one branch.

Phase numbers, RULES, and INLINE pragmas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.  Phase numbers decrease from N towards zero (instead of increasing).
This makes it easier to add new earlier phases, which is what users want
to do.

2.  RULES get their own phase number, N, and are disabled in phases before N.

e.g.  {-# RULES "foo" [2] forall x y.  f (x,y) = f' x y #-}

Note the [2], which says "only active in phase 2 and later".

3.  INLINE and NOINLINE pragmas have a phase number to.  This is now treated
in just the same way as the phase number on RULE; that is, the Id is not inlined
in phases earlier than N.  In phase N and later the Id *may* be inlined, and
here is where INLINE and NOINLINE differ: INLNE makes the RHS look small, so
as soon as it *may* be inlined it probably *will* be inlined.

The syntax of the phase number on an INLINE/NOINLINE pragma has changed to be
like the RULES case (i.e. in square brackets).  This should also make sure
you examine all such phase numbers; many will need to change now the numbering
is reversed.

Inlining Ids is no longer affected at all by whether the Id appears on the
LHS of a rule.  Now it's up to the programmer to put a suitable INLINE/NOINLINE
pragma to stop it being inlined too early.

Implementation notes:

*  A new data type, BasicTypes.Activation says when a rule or inline pragma
is active.   Functions isAlwaysActive, isNeverActive, isActive, do the
obvious thing (all in BasicTypes).

* Slight change in the SimplifierSwitch data type, which led to a lot of
simplifier-specific code moving from CmdLineOpts to SimplMonad; a Good Thing.

* The InlinePragma in the IdInfo of an Id is now simply an Activation saying
when the Id can be inlined.  (It used to be a rather bizarre pair of a
Bool and a (Maybe Phase), so this is much much easier to understand.)

* The simplifier has a "mode" environment switch, replacing the old
black list.  Unfortunately the data type decl has to be in
CmdLineOpts, because it's an argument to the CoreDoSimplify switch

    data SimplifierMode = SimplGently | SimplPhase Int

Here "gently" means "no rules, no inlining".   All the crucial
inlining decisions are now collected together in SimplMonad
(preInlineUnconditionally, postInlineUnconditionally, activeInline,
activeRule).

Specialisation
~~~~~~~~~~~~~~
1.  Only dictionary *functions* are made INLINE, not dictionaries that
have no parameters.  (This inline-dictionary-function thing is Marcin's
idea and I'm still not sure whether it's a good idea.  But it's definitely
a Bad Idea when there are no arguments.)

2.  Be prepared to specialise an INLINE function: an easy fix in
Specialise.lhs

But there is still a problem, which is that the INLINE wins
at the call site, so we don't use the specialised version anyway.
I'm still unsure whether it makes sense to SPECIALISE something
you want to INLINE.

Random smaller things
~~~~~~~~~~~~~~~~~~~~~~

* builtinRules (there was only one, but may be more) in PrelRules are now
  incorporated.   They were being ignored before...

* OrdList.foldOL -->  OrdList.foldrOL, OrdList.foldlOL

* Some tidying up of the tidyOpenTyVar, tidyTyVar functions.  I've
  forgotten exactly what!

22 years ago[project @ 2001-09-26 15:12:33 by simonpj]
simonpj [Wed, 26 Sep 2001 15:12:37 +0000 (15:12 +0000)]
[project @ 2001-09-26 15:12:33 by simonpj]
------------------
Simon's big commit
------------------

This commit, which I don't think I can sensibly do piecemeal, consists
of the things I've been doing recently, mainly directed at making
Manuel, George, and Marcin happier with RULES.

Reogranise the simplifier
~~~~~~~~~~~~~~~~~~~~~~~~~
1. The simplifier's environment is now an explicit parameter.  This
makes it a bit easier to figure out where it is going.

2. Constructor arguments can now be arbitrary expressions, except
when the application is the RHS of a let(rec).  This makes it much
easier to match rules like

RULES
    "foo"  f (h x, g y) = f' x y

In the simplifier, it's Simplify.mkAtomicArgs that ANF-ises a
constructor application where necessary.  In the occurrence analyser,
there's a new piece of context info (OccEncl) to say whether a
constructor app is in a place where it should be in ANF.  (Unless
it knows this it'll give occurrence info which will inline the
argument back into the constructor app.)

3. I'm experimenting with doing the "float-past big lambda" transformation
in the full laziness pass, rather than mixed in with the simplifier (was
tryRhsTyLam).

4.  Arrange that
case (coerce (S,T) (x,y)) of ...
will simplify.  Previous it didn't.
A local change to CoreUtils.exprIsConApp_maybe.

5. Do a better job in CoreUtils.exprEtaExpandArity when there's an
error function in one branch.

Phase numbers, RULES, and INLINE pragmas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.  Phase numbers decrease from N towards zero (instead of increasing).
This makes it easier to add new earlier phases, which is what users want
to do.

2.  RULES get their own phase number, N, and are disabled in phases before N.

e.g.  {-# RULES "foo" [2] forall x y.  f (x,y) = f' x y #-}

Note the [2], which says "only active in phase 2 and later".

3.  INLINE and NOINLINE pragmas have a phase number to.  This is now treated
in just the same way as the phase number on RULE; that is, the Id is not inlined
in phases earlier than N.  In phase N and later the Id *may* be inlined, and
here is where INLINE and NOINLINE differ: INLNE makes the RHS look small, so
as soon as it *may* be inlined it probably *will* be inlined.

The syntax of the phase number on an INLINE/NOINLINE pragma has changed to be
like the RULES case (i.e. in square brackets).  This should also make sure
you examine all such phase numbers; many will need to change now the numbering
is reversed.

Inlining Ids is no longer affected at all by whether the Id appears on the
LHS of a rule.  Now it's up to the programmer to put a suitable INLINE/NOINLINE
pragma to stop it being inlined too early.

Implementation notes:

*  A new data type, BasicTypes.Activation says when a rule or inline pragma
is active.   Functions isAlwaysActive, isNeverActive, isActive, do the
obvious thing (all in BasicTypes).

* Slight change in the SimplifierSwitch data type, which led to a lot of
simplifier-specific code moving from CmdLineOpts to SimplMonad; a Good Thing.

* The InlinePragma in the IdInfo of an Id is now simply an Activation saying
when the Id can be inlined.  (It used to be a rather bizarre pair of a
Bool and a (Maybe Phase), so this is much much easier to understand.)

* The simplifier has a "mode" environment switch, replacing the old
black list.  Unfortunately the data type decl has to be in
CmdLineOpts, because it's an argument to the CoreDoSimplify switch

    data SimplifierMode = SimplGently | SimplPhase Int

Here "gently" means "no rules, no inlining".   All the crucial
inlining decisions are now collected together in SimplMonad
(preInlineUnconditionally, postInlineUnconditionally, activeInline,
activeRule).

Specialisation
~~~~~~~~~~~~~~
1.  Only dictionary *functions* are made INLINE, not dictionaries that
have no parameters.  (This inline-dictionary-function thing is Marcin's
idea and I'm still not sure whether it's a good idea.  But it's definitely
a Bad Idea when there are no arguments.)

2.  Be prepared to specialise an INLINE function: an easy fix in
Specialise.lhs

But there is still a problem, which is that the INLINE wins
at the call site, so we don't use the specialised version anyway.
I'm still unsure whether it makes sense to SPECIALISE something
you want to INLINE.

Random smaller things
~~~~~~~~~~~~~~~~~~~~~~

* builtinRules (there was only one, but may be more) in PrelRules are now
  incorporated.   They were being ignored before...

* OrdList.foldOL -->  OrdList.foldrOL, OrdList.foldlOL

* Some tidying up of the tidyOpenTyVar, tidyTyVar functions.  I've
  forgotten exactly what!

22 years ago[project @ 2001-09-26 15:11:50 by simonpj]
simonpj [Wed, 26 Sep 2001 15:11:51 +0000 (15:11 +0000)]
[project @ 2001-09-26 15:11:50 by simonpj]
-------------------------------
Code generation and SRT hygiene
-------------------------------

This is a big tidy up commit.  I don't think it breaks anything,
but it certainly makes the code clearer (to me).

I'm not certain that you can use it without sucking in my other
big commit... they come from the same tree.

Core-to-STG, live variables and Static Reference Tables (SRTs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did a big tidy-up of the live-variable computation in CoreToStg.
The key idea is that the live variables consist of two parts:
dynamic live vars
static live vars (CAFs)

These two always travel round together, but they were always
treated separately by the code until now. Now it's a new data type:

type LiveInfo = (StgLiveVars,  -- Dynamic live variables;
-- i.e. ones with a nested (non-top-level) binding
 CafSet) -- Static live variables;
-- i.e. top-level variables that are CAFs or refer to them

There's lots of documentation in CoreToStg.

Code generation
~~~~~~~~~~~~~~~
Arising from this, I found that SRT labels were stored in
a LambdaFormInfo during code generation, whereas they *ought*
to be in the ClosureInfo (which in turn contains a LambdaFormInfo).

This led to lots of changes in ClosureInfo, and I took the opportunity
to make it into a labelled record.

Similarly, I made the data type in AbstractC a bit more explicit:

  -- C_SRT is what StgSyn.SRT gets translated to...
  -- we add a label for the table, and expect only the 'offset/length' form

data C_SRT = NoC_SRT
   | C_SRT CLabel !Int{-offset-} !Int{-length-}

(Previously there were bottoms lying around.)

22 years ago[project @ 2001-09-26 13:42:50 by chak]
chak [Wed, 26 Sep 2001 13:42:50 +0000 (13:42 +0000)]
[project @ 2001-09-26 13:42:50 by chak]
- split documentation off into a separate package
- adapt to new docbook setup in RH7.1

22 years ago[project @ 2001-09-26 11:44:30 by rrt]
rrt [Wed, 26 Sep 2001 11:44:30 +0000 (11:44 +0000)]
[project @ 2001-09-26 11:44:30 by rrt]
Make the print stylesheet generate a TOC for sets (so the PDF manual
has a front TOC indicating that it contains both the user's guide and
libraries guide).

A simple question with a simple answer; how refreshing.

22 years ago[project @ 2001-09-26 10:38:02 by simonmar]
simonmar [Wed, 26 Sep 2001 10:38:02 +0000 (10:38 +0000)]
[project @ 2001-09-26 10:38:02 by simonmar]
ENODEV should really be an UnsupportedOperation, not NoSuchThing.

22 years ago[project @ 2001-09-26 10:35:41 by simonmar]
simonmar [Wed, 26 Sep 2001 10:35:41 +0000 (10:35 +0000)]
[project @ 2001-09-26 10:35:41 by simonmar]
A failure while trying to set O_NONBLOCK on a file descriptor should
be a non-fatal error.  It turns out that on FreeBSD it is an error
(ENODEV) to try to set O_NONBLOCK on /dev/null.

MERGE TO STABLE

22 years ago[project @ 2001-09-26 09:41:26 by simonmar]
simonmar [Wed, 26 Sep 2001 09:41:26 +0000 (09:41 +0000)]
[project @ 2001-09-26 09:41:26 by simonmar]
Let's try that last commit again, and get it right this time...

22 years ago[project @ 2001-09-26 09:16:00 by simonmar]
simonmar [Wed, 26 Sep 2001 09:16:00 +0000 (09:16 +0000)]
[project @ 2001-09-26 09:16:00 by simonmar]
When skipping a nested comment, keep track of the source location of
the comment opener, so that we can report it in an error message
rather than reporting the line at the end of the file.

Also noticed a couple of ineficiencies in the nested comment code, so
fixed those too.

22 years ago[project @ 2001-09-26 08:59:42 by simonmar]
simonmar [Wed, 26 Sep 2001 08:59:42 +0000 (08:59 +0000)]
[project @ 2001-09-26 08:59:42 by simonmar]
Add the text about ForeignPtr vs. Ptr

22 years ago[project @ 2001-09-25 20:16:19 by sof]
sof [Tue, 25 Sep 2001 20:16:19 +0000 (20:16 +0000)]
[project @ 2001-09-25 20:16:19 by sof]
Stick with trad. function syntax in prev commit; avoids unnecessary Perl versioning issues

22 years ago[project @ 2001-09-25 18:08:47 by ken]
ken [Tue, 25 Sep 2001 18:08:48 +0000 (18:08 +0000)]
[project @ 2001-09-25 18:08:47 by ken]
Pass the "-mieee" flag to gcc, so that we get IEEE floating-point.
MERGE TO STABLE

22 years ago[project @ 2001-09-25 15:24:14 by rrt]
rrt [Tue, 25 Sep 2001 15:24:14 +0000 (15:24 +0000)]
[project @ 2001-09-25 15:24:14 by rrt]
Remove mention of building guide (no longer shipped with binary dist
on Windows), and add set.html target (need to make HTML docs).

22 years ago[project @ 2001-09-25 13:00:41 by simonmar]
simonmar [Tue, 25 Sep 2001 13:00:41 +0000 (13:00 +0000)]
[project @ 2001-09-25 13:00:41 by simonmar]
Fix the mangle rule since the definition of GHC_MANGLER changed

MERGE TO STABLE

22 years ago[project @ 2001-09-25 11:46:33 by simonmar]
simonmar [Tue, 25 Sep 2001 11:46:33 +0000 (11:46 +0000)]
[project @ 2001-09-25 11:46:33 by simonmar]
Mention the use of the -no-hs-main flag when talking about linking
programs where main() is not provided by GHC.

22 years ago[project @ 2001-09-25 10:39:21 by simonmar]
simonmar [Tue, 25 Sep 2001 10:39:21 +0000 (10:39 +0000)]
[project @ 2001-09-25 10:39:21 by simonmar]
- don't omit "test" dirs from the source distribution
- remove some backslashes from the sed commands to make them work here

22 years ago[project @ 2001-09-24 22:29:02 by gla]
gla [Mon, 24 Sep 2001 22:29:02 +0000 (22:29 +0000)]
[project @ 2001-09-24 22:29:02 by gla]

22 years ago[project @ 2001-09-24 22:28:12 by gla]
gla [Mon, 24 Sep 2001 22:28:12 +0000 (22:28 +0000)]
[project @ 2001-09-24 22:28:12 by gla]
Added a diagram showing the biography of a closure.
Made minor changes to a few paragraphs and footnotes.

22 years ago[project @ 2001-09-24 16:25:29 by rrt]
rrt [Mon, 24 Sep 2001 16:25:29 +0000 (16:25 +0000)]
[project @ 2001-09-24 16:25:29 by rrt]
Updates and fixes for 5.02 release.

PLEASE MERGE.

22 years ago[project @ 2001-09-24 15:51:00 by rrt]
rrt [Mon, 24 Sep 2001 15:51:00 +0000 (15:51 +0000)]
[project @ 2001-09-24 15:51:00 by rrt]
Add extra notes.

22 years ago[project @ 2001-09-24 14:18:05 by rrt]
rrt [Mon, 24 Sep 2001 14:18:05 +0000 (14:18 +0000)]
[project @ 2001-09-24 14:18:05 by rrt]
Windows port can now handle spaces in filenames, so delete the bit saying it
can't. Also change URL of download page (it was pointing to the now defunct
download.html).

PLEASE MERGE PLEASE, GO ON, PRETTY PLEASE WITH SUGAR

(this also necessitates the site's copy of the docs being updated. Sorry)

22 years ago[project @ 2001-09-24 11:48:33 by simonmar]
simonmar [Mon, 24 Sep 2001 11:48:33 +0000 (11:48 +0000)]
[project @ 2001-09-24 11:48:33 by simonmar]
use $(LD) instead of hard-wired ld.

22 years ago[project @ 2001-09-24 11:46:01 by simonmar]
simonmar [Mon, 24 Sep 2001 11:46:01 +0000 (11:46 +0000)]
[project @ 2001-09-24 11:46:01 by simonmar]
Use $(LD) instead of hard-wired ld.

22 years ago[project @ 2001-09-24 11:45:44 by simonmar]
simonmar [Mon, 24 Sep 2001 11:45:44 +0000 (11:45 +0000)]
[project @ 2001-09-24 11:45:44 by simonmar]
Add  LD = ld

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.