ghc-hetmet.git
21 years ago[project @ 2002-12-12 14:35:57 by simonmar]
simonmar [Thu, 12 Dec 2002 14:35:57 +0000 (14:35 +0000)]
[project @ 2002-12-12 14:35:57 by simonmar]
- Don't use non-portable autoconfery (this configure script was broken
  with newer autoconfs)

- Use FPTOOLS_SHEBANG_PERL from aclocal.m4 rather than local copy.

21 years ago[project @ 2002-12-12 13:28:35 by simonmar]
simonmar [Thu, 12 Dec 2002 13:28:35 +0000 (13:28 +0000)]
[project @ 2002-12-12 13:28:35 by simonmar]
Also install <package>.haddock when we install the docs.

21 years ago[project @ 2002-12-12 13:21:46 by ross]
ross [Thu, 12 Dec 2002 13:21:47 +0000 (13:21 +0000)]
[project @ 2002-12-12 13:21:46 by ross]
Use ioError instead of throw for IOErrors, in anticipation of
a change from IOError = Exception to IOError = IOException.

21 years ago[project @ 2002-12-12 11:53:11 by simonmar]
simonmar [Thu, 12 Dec 2002 11:53:11 +0000 (11:53 +0000)]
[project @ 2002-12-12 11:53:11 by simonmar]
Make the new info-table construction code word without instance Bits
Int (i.e. GHC 4.08.x).  This probably makes it more correct, too.

21 years ago[project @ 2002-12-12 03:19:12 by mthomas]
mthomas [Thu, 12 Dec 2002 03:19:12 +0000 (03:19 +0000)]
[project @ 2002-12-12 03:19:12 by mthomas]
Towards a complete binary package.

21 years ago[project @ 2002-12-12 03:15:41 by mthomas]
mthomas [Thu, 12 Dec 2002 03:15:41 +0000 (03:15 +0000)]
[project @ 2002-12-12 03:15:41 by mthomas]
Towards a MinGW32 binary distribution with all accessories + compiler.

21 years ago[project @ 2002-12-11 17:09:08 by simonpj]
simonpj [Wed, 11 Dec 2002 17:09:08 +0000 (17:09 +0000)]
[project @ 2002-12-11 17:09:08 by simonpj]
Back out the function tycon kind change (big comment to explain why)

21 years ago[project @ 2002-12-11 16:55:04 by simonpj]
simonpj [Wed, 11 Dec 2002 16:55:06 +0000 (16:55 +0000)]
[project @ 2002-12-11 16:55:04 by simonpj]
Tidy up info table generation

21 years ago[project @ 2002-12-11 16:37:44 by simonmar]
simonmar [Wed, 11 Dec 2002 16:37:44 +0000 (16:37 +0000)]
[project @ 2002-12-11 16:37:44 by simonmar]
Remove tests for text/data boundary symbols.

21 years ago[project @ 2002-12-11 16:37:16 by simonmar]
simonmar [Wed, 11 Dec 2002 16:37:17 +0000 (16:37 +0000)]
[project @ 2002-12-11 16:37:16 by simonmar]
Remove tests for text/data section boundary symbols.

21 years ago[project @ 2002-12-11 15:36:20 by simonmar]
simonmar [Wed, 11 Dec 2002 15:36:58 +0000 (15:36 +0000)]
[project @ 2002-12-11 15:36:20 by simonmar]
Merge the eval-apply-branch on to the HEAD
------------------------------------------

This is a change to GHC's evaluation model in order to ultimately make
GHC more portable and to reduce complexity in some areas.

At some point we'll update the commentary to describe the new state of
the RTS.  Pending that, the highlights of this change are:

  - No more Su.  The Su register is gone, update frames are one
    word smaller.

  - Slow-entry points and arg checks are gone.  Unknown function calls
    are handled by automatically-generated RTS entry points (AutoApply.hc,
    generated by the program in utils/genapply).

  - The stack layout is stricter: there are no "pending arguments" on
    the stack any more, the stack is always strictly a sequence of
    stack frames.

    This means that there's no need for LOOKS_LIKE_GHC_INFO() or
    LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
    how to find the boundary between the text and data segments (BIG WIN!).

  - A couple of nasty hacks in the mangler caused by the neet to
    identify closure ptrs vs. info tables have gone away.

  - Info tables are a bit more complicated.  See InfoTables.h for the
    details.

  - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
    in GHCi which affected primitives and unboxed tuples are now
    fixed.

  - Binary sizes are reduced by about 7% on x86.  Performance is roughly
    similar, some programs get faster while some get slower.  I've seen
    GHCi perform worse on some examples, but haven't investigated
    further yet (GHCi performance *should* be about the same or better
    in theory).

  - Internally the code generator is rather better organised.  I've moved
    info-table generation from the NCG into the main codeGen where it is
    shared with the C back-end; info tables are now emitted as arrays
    of words in both back-ends.  The NCG is one step closer to being able
    to support profiling.

This has all been fairly thoroughly tested, but no doubt I've messed
up the commit in some way.

21 years ago[project @ 2002-12-11 14:02:28 by igloo]
igloo [Wed, 11 Dec 2002 14:02:28 +0000 (14:02 +0000)]
[project @ 2002-12-11 14:02:28 by igloo]
Handle bindings to just a pattern variable in cvtd.

21 years ago[project @ 2002-12-11 14:01:22 by simonmar]
simonmar [Wed, 11 Dec 2002 14:01:23 +0000 (14:01 +0000)]
[project @ 2002-12-11 14:01:22 by simonmar]
Update config.guess and config.sub from GNU; a bug was reported in the
previous versions.

21 years ago[project @ 2002-12-11 12:35:57 by igloo]
igloo [Wed, 11 Dec 2002 12:35:58 +0000 (12:35 +0000)]
[project @ 2002-12-11 12:35:57 by igloo]
Improved foreign import conversion.

21 years ago[project @ 2002-12-11 12:04:05 by simonpj]
simonpj [Wed, 11 Dec 2002 12:04:05 +0000 (12:04 +0000)]
[project @ 2002-12-11 12:04:05 by simonpj]
wibbles to External Core

21 years ago[project @ 2002-12-11 12:02:15 by simonpj]
simonpj [Wed, 11 Dec 2002 12:02:15 +0000 (12:02 +0000)]
[project @ 2002-12-11 12:02:15 by simonpj]
Behave decently if there are NoStubs in ForeignStubs

21 years ago[project @ 2002-12-11 12:01:20 by simonpj]
simonpj [Wed, 11 Dec 2002 12:01:20 +0000 (12:01 +0000)]
[project @ 2002-12-11 12:01:20 by simonpj]
Change interface to mkIfaceOrig

21 years ago[project @ 2002-12-11 12:00:50 by simonpj]
simonpj [Wed, 11 Dec 2002 12:00:50 +0000 (12:00 +0000)]
[project @ 2002-12-11 12:00:50 by simonpj]
Better comparision for Exact RdrNames

21 years ago[project @ 2002-12-11 11:59:59 by simonpj]
simonpj [Wed, 11 Dec 2002 11:59:59 +0000 (11:59 +0000)]
[project @ 2002-12-11 11:59:59 by simonpj]
Original names can occur in binding positions in External Core

21 years ago[project @ 2002-12-11 11:59:26 by simonpj]
simonpj [Wed, 11 Dec 2002 11:59:26 +0000 (11:59 +0000)]
[project @ 2002-12-11 11:59:26 by simonpj]
Give -> the correct kind!

21 years ago[project @ 2002-12-10 21:25:07 by igloo]
igloo [Tue, 10 Dec 2002 21:25:08 +0000 (21:25 +0000)]
[project @ 2002-12-10 21:25:07 by igloo]
Use real datatypes for TH Clause and Match

21 years ago[project @ 2002-12-10 17:34:34 by simonpj]
simonpj [Tue, 10 Dec 2002 17:34:35 +0000 (17:34 +0000)]
[project @ 2002-12-10 17:34:34 by simonpj]
Check for qualified names in binding positions in the parser instead
of the rename.  In External Core it's OK to have qualified names in
these places.

21 years ago[project @ 2002-12-10 17:34:14 by simonpj]
simonpj [Tue, 10 Dec 2002 17:34:14 +0000 (17:34 +0000)]
[project @ 2002-12-10 17:34:14 by simonpj]
Parse Word literals

21 years ago[project @ 2002-12-10 17:31:59 by simonpj]
simonpj [Tue, 10 Dec 2002 17:31:59 +0000 (17:31 +0000)]
[project @ 2002-12-10 17:31:59 by simonpj]
Remove checkGHCI

21 years ago[project @ 2002-12-10 16:28:48 by igloo]
igloo [Tue, 10 Dec 2002 16:28:48 +0000 (16:28 +0000)]
[project @ 2002-12-10 16:28:48 by igloo]
Use layout inside declarations quasi-quotes [d| ... |]

21 years ago[project @ 2002-12-10 15:42:19 by simonpj]
simonpj [Tue, 10 Dec 2002 15:42:19 +0000 (15:42 +0000)]
[project @ 2002-12-10 15:42:19 by simonpj]
Wibble

21 years ago[project @ 2002-12-10 15:27:58 by simonpj]
simonpj [Tue, 10 Dec 2002 15:27:59 +0000 (15:27 +0000)]
[project @ 2002-12-10 15:27:58 by simonpj]
Report TH errors better in stage 1

21 years ago[project @ 2002-12-10 13:38:40 by wolfgang]
wolfgang [Tue, 10 Dec 2002 13:38:40 +0000 (13:38 +0000)]
[project @ 2002-12-10 13:38:40 by wolfgang]
Fix a race condition/possible deadlock in the threaded rts:

If a callback into haskell finished before waitThread_() was called,
the signal was lost  ans waitThread_() waited indefinitely.

Solution: Don't release the sched_mutex between calls to scheduleThread_
and waitThread_.

Please note that the scheduler API function waitThread is still possibly
affected by this race condition. It's used in rts_mainEvalIO (I think that's
safe) and in finishAllThreads (this looks dangerous, but finishAllThreads is
never used).

21 years ago[project @ 2002-12-10 02:34:21 by igloo]
igloo [Tue, 10 Dec 2002 02:34:22 +0000 (02:34 +0000)]
[project @ 2002-12-10 02:34:21 by igloo]
Correctly convert expressions from TH datastructures to the internel Hs*
datastructures containing right infix operators left-parenthesised.

21 years ago[project @ 2002-12-08 14:28:15 by wolfgang]
wolfgang [Sun, 8 Dec 2002 14:28:15 +0000 (14:28 +0000)]
[project @ 2002-12-08 14:28:15 by wolfgang]
Mac OS X: fix a small bug that caused trouble with object splitting

21 years ago[project @ 2002-12-08 09:28:07 by dons]
dons [Sun, 8 Dec 2002 09:28:07 +0000 (09:28 +0000)]
[project @ 2002-12-08 09:28:07 by dons]
config.guess says "m68k-apple-netbsd1.6", and that's fine.

21 years ago[project @ 2002-12-06 09:50:22 by simonmar]
simonmar [Fri, 6 Dec 2002 09:50:22 +0000 (09:50 +0000)]
[project @ 2002-12-06 09:50:22 by simonmar]
Stub objects are called foo_stub.o, not foo.stub_o.  In other words,
findLinkable (aka maybe_getFileLinkable in the 5.04 branch) has never
worked.

21 years ago[project @ 2002-12-05 23:49:43 by mthomas]
mthomas [Thu, 5 Dec 2002 23:49:43 +0000 (23:49 +0000)]
[project @ 2002-12-05 23:49:43 by mthomas]
A new rejig script which takes arguments rather than hardwired locations.

21 years ago[project @ 2002-12-05 14:20:55 by stolz]
stolz [Thu, 5 Dec 2002 14:20:56 +0000 (14:20 +0000)]
[project @ 2002-12-05 14:20:55 by stolz]
Add SA_RESETHAND (aka SA_ONESHOT) support.
Requested by: John Meacham

> module Main where

> import System.Posix.Signals

> main = do
>   installHandler sigUSR1 (Catch (print "usr1")) Nothing
>   installHandler sigUSR2 (CatchOnce (print "usr2")) Nothing
>   _ <- getLine
>   return ()

21 years ago[project @ 2002-12-05 13:51:56 by simonmar]
simonmar [Thu, 5 Dec 2002 13:51:56 +0000 (13:51 +0000)]
[project @ 2002-12-05 13:51:56 by simonmar]
- remove old code for GHC < 3.03 (we don't support building GHC with
  less than 4.08).

- remove ErrorHdrHook and PatError, we now catch all exceptions at
  the top level and report panics (this will fix some test
  discrepancies with GHCi).

21 years ago[project @ 2002-12-05 12:36:54 by simonmar]
simonmar [Thu, 5 Dec 2002 12:36:54 +0000 (12:36 +0000)]
[project @ 2002-12-05 12:36:54 by simonmar]
Don't put a recursive exception handler around the flushing of
stdout/stderr after running a command.  If the user closes stdout or
stderr, we now fail rather than going into an infinite loop.

21 years ago[project @ 2002-12-04 23:41:15 by dons]
dons [Wed, 4 Dec 2002 23:41:15 +0000 (23:41 +0000)]
[project @ 2002-12-04 23:41:15 by dons]
Let configure know about perl v5.8

21 years ago[project @ 2002-12-04 12:06:28 by simonmar]
simonmar [Wed, 4 Dec 2002 12:06:28 +0000 (12:06 +0000)]
[project @ 2002-12-04 12:06:28 by simonmar]
Fix SPECIALISE documentation to not mention outdated syntax, and fix
the RULES syntax in one place

21 years ago[project @ 2002-12-04 11:10:17 by simonmar]
simonmar [Wed, 4 Dec 2002 11:10:17 +0000 (11:10 +0000)]
[project @ 2002-12-04 11:10:17 by simonmar]
Add an extra <P>..</P> around the list of packages under "hierarchical
libraries", to fix ugly spacing in IE.  I have no idea if this is
valid HTML or not.

21 years ago[project @ 2002-12-02 17:10:13 by simonpj]
simonpj [Mon, 2 Dec 2002 17:10:13 +0000 (17:10 +0000)]
[project @ 2002-12-02 17:10:13 by simonpj]
Use the right PackageIfaceTable in cmInfoThing

21 years ago[project @ 2002-12-02 16:58:33 by simonpj]
simonpj [Mon, 2 Dec 2002 16:58:33 +0000 (16:58 +0000)]
[project @ 2002-12-02 16:58:33 by simonpj]
Remember to zapToType in tcSpliceExpr

21 years ago[project @ 2002-12-02 14:33:10 by simonmar]
simonmar [Mon, 2 Dec 2002 14:33:10 +0000 (14:33 +0000)]
[project @ 2002-12-02 14:33:10 by simonmar]
Fix a bug and clean up some cruft in here:

 - In each function in the rts_getXXXX() family, there was a test that
   the object is actually of the desired type by examining its info
   table.  Some of these tests were disabled, but there was no comment
   explaining why.  I've just (re-)discovered the reason: the
   info table might be dynamically-loaded in the GHCi case.

   Not all the tests were disabled, which lead to bugs using the FFI
   in GHCi (in particular with functions that return Float or Double).

 - I've added consistent, but commented out, assertions to each of
   the rts_getXXXX() functions, and left a comment explaining why
   these reasonable-looking assertions are disabled.

MERGE TO STABLE

21 years ago[project @ 2002-12-02 10:44:10 by simonmar]
simonmar [Mon, 2 Dec 2002 10:44:10 +0000 (10:44 +0000)]
[project @ 2002-12-02 10:44:10 by simonmar]
Add a FAQ item about long link times.

21 years ago[project @ 2002-11-28 17:17:41 by simonpj]
simonpj [Thu, 28 Nov 2002 17:17:44 +0000 (17:17 +0000)]
[project @ 2002-11-28 17:17:41 by simonpj]
-------------------------------
      A day's work to improve error messages
-------------------------------

1.  Indicate when the cause of the error is likely to be the monomorpism
    restriction, and identify the offending variables.  This involves
    mainly tcSimplifyTop and its error generation.

2.  Produce much better kind error messages.  No more
      ../alonzo/DiGraph.hs:40:
  Couldn't match `* -> *' against `Type bx'
      Expected kind: * -> *
      Inferred kind: Type bx
  When checking that `DiGraph n' is a type

It took a surprisingly long time to get the details right.

21 years ago[project @ 2002-11-28 10:04:52 by simonpj]
simonpj [Thu, 28 Nov 2002 10:04:53 +0000 (10:04 +0000)]
[project @ 2002-11-28 10:04:52 by simonpj]
Report over-size tuples gracefully

21 years ago[project @ 2002-11-28 10:04:15 by simonpj]
simonpj [Thu, 28 Nov 2002 10:04:15 +0000 (10:04 +0000)]
[project @ 2002-11-28 10:04:15 by simonpj]
Document a couple more bugs

21 years ago[project @ 2002-11-28 01:00:44 by mthomas]
mthomas [Thu, 28 Nov 2002 01:00:44 +0000 (01:00 +0000)]
[project @ 2002-11-28 01:00:44 by mthomas]
Add a getting started example.  Someone with Docbook please check the SGML.

21 years ago[project @ 2002-11-26 07:02:04 by mthomas]
mthomas [Tue, 26 Nov 2002 07:02:04 +0000 (07:02 +0000)]
[project @ 2002-11-26 07:02:04 by mthomas]
mblockIsHeap has been removed so update mingw32 branch - SIMON CHECK PLS!

21 years ago[project @ 2002-11-22 13:59:40 by simonmar]
simonmar [Fri, 22 Nov 2002 13:59:40 +0000 (13:59 +0000)]
[project @ 2002-11-22 13:59:40 by simonmar]
Two files that shouldn't have been on the HEAD (yet)

21 years ago[project @ 2002-11-22 07:43:29 by matthewc]
matthewc [Fri, 22 Nov 2002 07:43:30 +0000 (07:43 +0000)]
[project @ 2002-11-22 07:43:29 by matthewc]
Implement adjustor thunks for IA64.
N.B. malloc'd memory isn't executable, so I'm currently allocating them
on the (mmap'd) Haskell heap instead...

21 years ago[project @ 2002-11-22 06:54:05 by matthewc]
matthewc [Fri, 22 Nov 2002 06:54:05 +0000 (06:54 +0000)]
[project @ 2002-11-22 06:54:05 by matthewc]
Update HEAP_ALLOCED implementation for IA64.

21 years ago[project @ 2002-11-21 17:54:54 by simonpj]
simonpj [Thu, 21 Nov 2002 17:54:54 +0000 (17:54 +0000)]
[project @ 2002-11-21 17:54:54 by simonpj]
un-wibble

21 years ago[project @ 2002-11-21 17:54:17 by simonpj]
simonpj [Thu, 21 Nov 2002 17:54:18 +0000 (17:54 +0000)]
[project @ 2002-11-21 17:54:17 by simonpj]
Another wibble

21 years ago[project @ 2002-11-21 17:43:43 by simonpj]
simonpj [Thu, 21 Nov 2002 17:43:43 +0000 (17:43 +0000)]
[project @ 2002-11-21 17:43:43 by simonpj]
wibble

21 years ago[project @ 2002-11-21 15:51:43 by simonpj]
simonpj [Thu, 21 Nov 2002 15:51:44 +0000 (15:51 +0000)]
[project @ 2002-11-21 15:51:43 by simonpj]
-------------------------------
Pass the current-module type envt
to HscMain.compileExpr, and thence to the desugarer
-------------------------------

For Template Haskell it's important to have the type envt of
the current module available to hand the desugarer.

Should fix TH_spliceDecl3

21 years ago[project @ 2002-11-21 14:59:51 by simonpj]
simonpj [Thu, 21 Nov 2002 14:59:52 +0000 (14:59 +0000)]
[project @ 2002-11-21 14:59:51 by simonpj]
-------------------------------
Better notion of what a 'value' is
Slightly better eta reduction
-------------------------------

1.  At various places we watch out for "values"; the predicate exprIsValue
detects them. It was stupidly treating nullary constructors as non-values
which is exceptionally stupid.  This (performance) bug has been there
for ages.

There's an exactly similar bug in SimplUtils.interestingArg, which looks
for an interesting argument to trigger an inlining.

2.  The eta reduction in SimplUtils.tryEtaReduce would only eta reduce if
that left us with a variable.  That led to slightly tiresome thing like
:DMonad (/\a b -> foo @ s @ a @ b) ...
where this would be neater
:DMonad (foo @ s)
The fix is easy, and there's a little less code too.

21 years ago[project @ 2002-11-21 11:32:45 by simonpj]
simonpj [Thu, 21 Nov 2002 11:32:45 +0000 (11:32 +0000)]
[project @ 2002-11-21 11:32:45 by simonpj]
Add rawSystem back in for benefit of pre-504 compilers on Win32

21 years ago[project @ 2002-11-21 11:31:51 by simonpj]
simonpj [Thu, 21 Nov 2002 11:31:51 +0000 (11:31 +0000)]
[project @ 2002-11-21 11:31:51 by simonpj]
import trimming

21 years ago[project @ 2002-11-21 11:31:34 by simonpj]
simonpj [Thu, 21 Nov 2002 11:31:34 +0000 (11:31 +0000)]
[project @ 2002-11-21 11:31:34 by simonpj]
--------------------------------
Compile instance declarations better
--------------------------------

This commit makes the type checker build better dictionaries
from instance declarations.  "Better" in the sense that if a
binding in the instance declaration mentions one of the other
methods of the same class, we use that method directly rather
than going via a (recursive) use of the dictionary.

This makes it easier to unravel recursive knots, and that
makes more inlining happen.  There's a long comment in
TcInstDcls.tcMethods

Makes the Monad instance for ST much more inlinable, and that
makes spectral/fibheaps go faster, among other things.

21 years ago[project @ 2002-11-21 11:27:05 by simonmar]
simonmar [Thu, 21 Nov 2002 11:27:05 +0000 (11:27 +0000)]
[project @ 2002-11-21 11:27:05 by simonmar]
these files should be on eval-apply-branch

21 years ago[project @ 2002-11-21 10:04:20 by simonmar]
simonmar [Thu, 21 Nov 2002 10:04:21 +0000 (10:04 +0000)]
[project @ 2002-11-21 10:04:20 by simonmar]
Repair the HEAD after some file adds/removes that were supposed to
happen on the eval-apply-branch yesterday mysteriously happened on the
HEAD instead.

21 years ago[project @ 2002-11-21 09:37:24 by simonpj]
simonpj [Thu, 21 Nov 2002 09:37:25 +0000 (09:37 +0000)]
[project @ 2002-11-21 09:37:24 by simonpj]
More wibbles to improve declaration splicing

21 years ago[project @ 2002-11-21 09:36:48 by simonpj]
simonpj [Thu, 21 Nov 2002 09:36:48 +0000 (09:36 +0000)]
[project @ 2002-11-21 09:36:48 by simonpj]
Less rn-tracing

21 years ago[project @ 2002-11-21 09:36:03 by simonpj]
simonpj [Thu, 21 Nov 2002 09:36:04 +0000 (09:36 +0000)]
[project @ 2002-11-21 09:36:03 by simonpj]
-------------------------------
Fix and tidy the desugaring of
pattern-matching in do-notation
-------------------------------

In the reorgansiation of HsPat, failureFreePat had become incorrect (due to
a catch-all case that caught a constructor that should have been matched).  So
pattern-match failure in do-notation wasn't handled right.

As it turned out, DsExpr.dsDo could be made much simpler and more elegant
by using matchSimply instead of matchWrapper, and this had the side benefit
of removing the last call to HsPat.failureFreePat.  So it's gone!

21 years ago[project @ 2002-11-21 03:34:07 by chak]
chak [Thu, 21 Nov 2002 03:34:07 +0000 (03:34 +0000)]
[project @ 2002-11-21 03:34:07 by chak]
Convert : Added newly required import of `HsSyn.TySynonym'
TcSplice: Adapted `tcRunQ' to new definition of `THSyntax.Q'

21 years ago[project @ 2002-11-20 23:27:37 by chak]
chak [Wed, 20 Nov 2002 23:27:37 +0000 (23:27 +0000)]
[project @ 2002-11-20 23:27:37 by chak]
wibble

21 years ago[project @ 2002-11-20 15:43:37 by simonpj]
simonpj [Wed, 20 Nov 2002 15:43:40 +0000 (15:43 +0000)]
[project @ 2002-11-20 15:43:37 by simonpj]
Three Template Haskell improvements

a) Add type synonyms to THSyntax (and DsMeta, Convert)

b) Make Q into a newtype instead of a type synonym

c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms
   and similarly addTyVarBinds

21 years ago[project @ 2002-11-20 15:40:32 by simonpj]
simonpj [Wed, 20 Nov 2002 15:40:32 +0000 (15:40 +0000)]
[project @ 2002-11-20 15:40:32 by simonpj]
Wibble to fix :info

21 years ago[project @ 2002-11-20 15:39:47 by simonpj]
simonpj [Wed, 20 Nov 2002 15:39:47 +0000 (15:39 +0000)]
[project @ 2002-11-20 15:39:47 by simonpj]
------------------------------------
Improve occurrence analysis a little
------------------------------------

Consider

x1 = a0 : []
x2 = a1 : x1
x3 = a2 : x2
g  = f x3

First time round, it looks as if x1 and x2 occur as an arg of a
let(rec)-bound constructor, and hence should not be inlined. (If the
RHS of a let is just (C a b) where C is a constructor, then we like to
keep it that way, with atomic a,b, so that it can be inlined easily at
a 'case'.)

But in this case, x3 is inlined in g's RHS... and now x2 is not an arg
of a let-bound constructor, so it can be inlined, and then x1.   Result:

g = f (a2 : a1 : a0 : [])

Which is fine.  What is *not* fine is that it has been costing us a
whole simplifier iteration for each element!

This commit adds another little hack to get around the problem: don't treat
constructor RHSs specially if the bound variable looks as if it occurs just
once so it'll be inlined.  This catches the common case very nicely.

It's a pain that we have the atomic-args-for-constructor-RHSs invariant.
But I can't see  how to do without it.

21 years ago[project @ 2002-11-20 14:09:42 by simonmar]
simonmar [Wed, 20 Nov 2002 14:10:04 +0000 (14:10 +0000)]
[project @ 2002-11-20 14:09:42 by simonmar]
Snapshot of the Eval/Apply changes, c. 15 Nov 2002.  This snapshot
should be relatively stable, although GHCi and profiling are currently
known to be broken.

21 years ago[project @ 2002-11-20 13:34:20 by simonmar]
simonmar [Wed, 20 Nov 2002 13:34:20 +0000 (13:34 +0000)]
[project @ 2002-11-20 13:34:20 by simonmar]
Back out rev. 1.233

21 years ago[project @ 2002-11-20 13:33:52 by simonmar]
simonmar [Wed, 20 Nov 2002 13:33:52 +0000 (13:33 +0000)]
[project @ 2002-11-20 13:33:52 by simonmar]
Back out previous change.  I remembered why we don't generate .depend
each time the sources chage: it's too annoying :-)

21 years ago[project @ 2002-11-20 12:34:42 by chak]
chak [Wed, 20 Nov 2002 12:34:43 +0000 (12:34 +0000)]
[project @ 2002-11-20 12:34:42 by chak]
TH:
- We are forcing importing THSyntax.Q at every top splice now; this suffices
  to get simple splices that do not involve reifyDecl or declaration
  quasi-quotes to work.  NB: This worked already when the construction of the
  Dec term and the splice were in separated modules, but not when they are in
  the same (see the regression test "TH_spliceDecl1.hs").
- The tests "TH_spliceDecl2.hs" and "TH_spliceDecl3.hs" use toplevel splices
  together with quasi-quoted and reifyDecl.  These currently still fail, as
  importing of some of the required type constructors from THSyntax isn't
  forced.

21 years ago[project @ 2002-11-20 09:37:45 by simonpj]
simonpj [Wed, 20 Nov 2002 09:37:48 +0000 (09:37 +0000)]
[project @ 2002-11-20 09:37:45 by simonpj]
-----------------------------------------------
Add -Werror flag, which makes warnings fatal
-----------------------------------------------

-Werror is standard gcc-ism; it makes warnings into fatal errors
so you don't miss them in a batch compile.

Fairly easy to implement, by modifying ErrUtils.errorsFound

Suggested by Ashley Yakeley

21 years ago[project @ 2002-11-20 07:19:12 by chak]
chak [Wed, 20 Nov 2002 07:19:13 +0000 (07:19 +0000)]
[project @ 2002-11-20 07:19:12 by chak]
TH: Revised type variable handling in toplevel decls (became necessary due to
recent addition of foralls in type representations).

21 years ago[project @ 2002-11-19 15:57:10 by simonpj]
simonpj [Tue, 19 Nov 2002 15:57:10 +0000 (15:57 +0000)]
[project @ 2002-11-19 15:57:10 by simonpj]
-----------------------------------------------
Fix a terrible and long-standing strictness bug
-----------------------------------------------

MERGE TO STABLE

Simplify.simplifyArg was floating out lets from a lazy argument.
Not only is this unprofitable, but it can actually be wrong it
the floated let has a strict-demand flag on it.  (Simplify.simplLazyBind
goes to some trouble to check for this case.)

The situation is this

lazy_fn (let v = <expensive> in str_fn v v)

Here, the strictness analyser may put a 'demanded' flag on
v, and if is is *then* floated we'll get

let v* = <expensive>
in
lazy_fn (str_fn v v)

and then <expensive> will always be evaluated.

This bug has been in the compiler at least a year (since Sept 01), but
in fact it's quite hard to make a test case for it, because the same
bug meant that the let was floated out *before* strictness analysis
giving

let v = <expensive>
in
lazy_fn (str_fn v v)

and now v won't get a strict-demand flag.  So it's only if the let
shows up (by inlining) after strictness analysis but not before.

21 years ago[project @ 2002-11-19 15:51:16 by simonpj]
simonpj [Tue, 19 Nov 2002 15:51:17 +0000 (15:51 +0000)]
[project @ 2002-11-19 15:51:16 by simonpj]
Comments

21 years ago[project @ 2002-11-19 14:16:43 by simonmar]
simonmar [Tue, 19 Nov 2002 14:16:45 +0000 (14:16 +0000)]
[project @ 2002-11-19 14:16:43 by simonmar]
- Fix a bug in eta-expansion of an application; it probably never bit
  us in practice.

- Change the behaviour of State#-lambdas: previously a State# lambda
  was considered to be one-shot for the purposes of inlining and
  eta-expansion.  Both can lead to unbounded extra work, but inlining
  is more likely to kill us, and eta-expansion is the case we mostly
  care about (getting the State# lambda to the outside of the function
  is often very important).  So now we only consider a State# lambda to be
  one-shot in eta expansion, not for inlining.

21 years ago[project @ 2002-11-19 13:49:30 by simonmar]
simonmar [Tue, 19 Nov 2002 13:49:30 +0000 (13:49 +0000)]
[project @ 2002-11-19 13:49:30 by simonmar]
Don't recalculate dependencies if none of the source files have changed.

21 years ago[project @ 2002-11-19 13:46:26 by simonmar]
simonmar [Tue, 19 Nov 2002 13:46:26 +0000 (13:46 +0000)]
[project @ 2002-11-19 13:46:26 by simonmar]
Don't recalculate dependencies if none of the source files have
changed.

From: Ian Lynagh <igloo@earth.li>

21 years ago[project @ 2002-11-19 13:39:29 by simonmar]
simonmar [Tue, 19 Nov 2002 13:39:29 +0000 (13:39 +0000)]
[project @ 2002-11-19 13:39:29 by simonmar]
Add some documentation about the new bootstrapping support

21 years ago[project @ 2002-11-19 13:08:08 by simonmar]
simonmar [Tue, 19 Nov 2002 13:08:08 +0000 (13:08 +0000)]
[project @ 2002-11-19 13:08:08 by simonmar]
- If we're building GHC, then default to building+installing stage 2.

21 years ago[project @ 2002-11-19 12:34:55 by simonpj]
simonpj [Tue, 19 Nov 2002 12:34:56 +0000 (12:34 +0000)]
[project @ 2002-11-19 12:34:55 by simonpj]
More newMethod tidying up

21 years ago[project @ 2002-11-19 11:14:50 by simonmar]
simonmar [Tue, 19 Nov 2002 11:14:50 +0000 (11:14 +0000)]
[project @ 2002-11-19 11:14:50 by simonmar]
- Pull in the appropriate $(GhcStageNHcOpts)

- re-instate -I$(GHC_INCLUDE_DIR) in $(SRC_CC_OPTS) that I
  accidentally removed in rev. 1.226

21 years ago[project @ 2002-11-19 11:10:44 by simonmar]
simonmar [Tue, 19 Nov 2002 11:10:44 +0000 (11:10 +0000)]
[project @ 2002-11-19 11:10:44 by simonmar]
Add GhcStage{1,2,3}HcOpts, empty by default

21 years ago[project @ 2002-11-19 09:37:08 by simonpj]
simonpj [Tue, 19 Nov 2002 09:37:08 +0000 (09:37 +0000)]
[project @ 2002-11-19 09:37:08 by simonpj]
Wibble

21 years ago[project @ 2002-11-18 17:01:01 by simonpj]
simonpj [Mon, 18 Nov 2002 17:01:03 +0000 (17:01 +0000)]
[project @ 2002-11-18 17:01:01 by simonpj]
-----------------------------
Perl and control-M's on Win32
-----------------------------

If the Cygwin 'perl' processes a file produced by a Mingw program
(such as ghc -M), so that the latter has DOS-style line termination,
the Cygwin 'perl' gets confused and adds extra control-M's.

This affects
a) mkdependC, which processes the .depend file produced by
ghc -M
b) the perl post-procssing step in ghc/compiler/Makefile,
which makes .depend-1 etc from .depend-BASE

The solution is to sprinkle few
binmode( HANDLE );
statements around in the perl scripts.

I think they don't affect the Unix version.

21 years ago[project @ 2002-11-18 14:57:09 by simonpj]
simonpj [Mon, 18 Nov 2002 14:57:09 +0000 (14:57 +0000)]
[project @ 2002-11-18 14:57:09 by simonpj]
Record some known bugs

21 years ago[project @ 2002-11-18 14:35:57 by simonpj]
simonpj [Mon, 18 Nov 2002 14:35:57 +0000 (14:35 +0000)]
[project @ 2002-11-18 14:35:57 by simonpj]
A TH fix; and implicit-parameter documentation

21 years ago[project @ 2002-11-18 14:25:50 by simonpj]
simonpj [Mon, 18 Nov 2002 14:25:55 +0000 (14:25 +0000)]
[project @ 2002-11-18 14:25:50 by simonpj]
----------------------------------------
Class ops that do not introduce for-alls
----------------------------------------

MERGE TO STABLE (if poss)

The handling of class ops that do not add an extra for-all
was utterly bogus.  For example:

class C a where
    fc :: (?p :: String) => a;

class D a where
    fd :: (Ord a) => [a] -> [a]

De-bogus-ing means

a) Being careful when taking apart the class op type in
MkIface.tcClassOpSig

b) Ditto when making the method Id in an instance binding.
   Hence new function Inst.tcInstClassOp, and its calls
   in TcInstDcls, and TcClassDcls

21 years ago[project @ 2002-11-18 14:25:29 by simonpj]
simonpj [Mon, 18 Nov 2002 14:25:29 +0000 (14:25 +0000)]
[project @ 2002-11-18 14:25:29 by simonpj]
Comments

21 years ago[project @ 2002-11-18 14:22:01 by simonpj]
simonpj [Mon, 18 Nov 2002 14:22:01 +0000 (14:22 +0000)]
[project @ 2002-11-18 14:22:01 by simonpj]
----------------------------------
Ambiguity for implicit parameters
---------------------------------

MERGE TO STABLE

Implicit parameters do not cause amiguity. For example, this is OK:

foo :: (?x :: [a]) => Int -> Int
foo _ = length ?x

Test is tcrun023.hs

21 years ago[project @ 2002-11-18 10:45:45 by simonmar]
simonmar [Mon, 18 Nov 2002 10:45:45 +0000 (10:45 +0000)]
[project @ 2002-11-18 10:45:45 by simonmar]
Don't install HS_PROG in $libexecdir as well as $bindir on Win32.

21 years ago[project @ 2002-11-18 10:03:24 by simonmar]
simonmar [Mon, 18 Nov 2002 10:03:24 +0000 (10:03 +0000)]
[project @ 2002-11-18 10:03:24 by simonmar]
Use -fvia-C when compiling with 4.08.x

21 years ago[project @ 2002-11-17 15:27:07 by panne]
panne [Sun, 17 Nov 2002 15:27:08 +0000 (15:27 +0000)]
[project @ 2002-11-17 15:27:07 by panne]
Added RTS entry points as mandated by the FFI addendum to the Haskell
98 report. NOTE: The implementations of hs_init, hs_exit, and
hs_set_argv are still missing.

21 years ago[project @ 2002-11-15 11:20:30 by simonmar]
simonmar [Fri, 15 Nov 2002 11:20:31 +0000 (11:20 +0000)]
[project @ 2002-11-15 11:20:30 by simonmar]
- get rid of $(FptoolsHcOpts), it was ill-conceived.  As it was,
  $(FptoolsHcOpts) was overriding options in $(GhcHcOpts).  Now,
  we just use $(SRC_HC_OPTS) instead, which can be overriden
  by $(GhcHcOpts).

- Don't bother adding -ldl to $(SRC_HC_OPTS) in config.mk.  It is
  added to the RTS's package configuration if necessary.

21 years ago[project @ 2002-11-14 17:01:17 by simonmar]
simonmar [Thu, 14 Nov 2002 17:01:17 +0000 (17:01 +0000)]
[project @ 2002-11-14 17:01:17 by simonmar]
wibble

21 years ago[project @ 2002-11-14 11:46:30 by simonmar]
simonmar [Thu, 14 Nov 2002 11:46:30 +0000 (11:46 +0000)]
[project @ 2002-11-14 11:46:30 by simonmar]
Add a new question to the FAQ: "Do I need to recompile all my code if
I upgrade GHC?".

21 years ago[project @ 2002-11-14 10:25:26 by simonmar]
simonmar [Thu, 14 Nov 2002 10:25:26 +0000 (10:25 +0000)]
[project @ 2002-11-14 10:25:26 by simonmar]
The $(shell ...) processing was losing some quoting in $(HC_OPTS), so
hack around it using $(patsubst ...) instead.

21 years ago[project @ 2002-11-13 17:02:06 by simonmar]
simonmar [Wed, 13 Nov 2002 17:02:06 +0000 (17:02 +0000)]
[project @ 2002-11-13 17:02:06 by simonmar]
Add -f to ln -s command