ghc-hetmet.git
19 years ago[project @ 2005-02-02 12:41:50 by simonmar]
simonmar [Wed, 2 Feb 2005 12:41:50 +0000 (12:41 +0000)]
[project @ 2005-02-02 12:41:50 by simonmar]
Add a helpful sanity check: if we try to re-enter the scheduler from
Haskell code without going via suspendThread()/resumeThread(), such as
when you have a 'foreign import unsafe' that should be 'safe', then you
get an error message.

19 years ago[project @ 2005-02-02 11:49:43 by simonmar]
simonmar [Wed, 2 Feb 2005 11:49:43 +0000 (11:49 +0000)]
[project @ 2005-02-02 11:49:43 by simonmar]
include ghcplatform.h

19 years ago[project @ 2005-02-02 11:04:23 by simonmar]
simonmar [Wed, 2 Feb 2005 11:04:23 +0000 (11:04 +0000)]
[project @ 2005-02-02 11:04:23 by simonmar]
Fix sed command line

19 years ago[project @ 2005-02-02 10:50:28 by simonpj]
simonpj [Wed, 2 Feb 2005 10:50:28 +0000 (10:50 +0000)]
[project @ 2005-02-02 10:50:28 by simonpj]
Futher gruesome makefile hackery to deal with building lib/compat

19 years ago[project @ 2005-02-02 10:15:48 by simonpj]
simonpj [Wed, 2 Feb 2005 10:15:48 +0000 (10:15 +0000)]
[project @ 2005-02-02 10:15:48 by simonpj]
Fix two separate bugs in CoreLint, both relating to the fact that the substitution
it carries must be applied exactly once.

This cures a lint crash in Text.ParserCombinators.Parsec.Perm, which was triggered
by -O2; specifically, SpecConstr generated some terms with heavy shadowing of type
variables.

19 years ago[project @ 2005-02-02 10:14:01 by simonmar]
simonmar [Wed, 2 Feb 2005 10:14:04 +0000 (10:14 +0000)]
[project @ 2005-02-02 10:14:01 by simonmar]
Fix isLinkMode and adjust formatting a little

19 years ago[project @ 2005-02-02 09:59:41 by simonmar]
simonmar [Wed, 2 Feb 2005 09:59:41 +0000 (09:59 +0000)]
[project @ 2005-02-02 09:59:41 by simonmar]
Add an entry for "duplicate definition for __module_registered"

19 years ago[project @ 2005-02-01 17:49:02 by simonpj]
simonpj [Tue, 1 Feb 2005 17:49:02 +0000 (17:49 +0000)]
[project @ 2005-02-01 17:49:02 by simonpj]
Finish docs for hs-boot files; please review!

19 years ago[project @ 2005-02-01 17:27:34 by simonpj]
simonpj [Tue, 1 Feb 2005 17:27:34 +0000 (17:27 +0000)]
[project @ 2005-02-01 17:27:34 by simonpj]
First cut at hs-boot documentation

19 years ago[project @ 2005-02-01 15:55:00 by simonmar]
simonmar [Tue, 1 Feb 2005 15:55:00 +0000 (15:55 +0000)]
[project @ 2005-02-01 15:55:00 by simonmar]
Generate some sensible code when presented with the output from gcc -O2

19 years ago[project @ 2005-02-01 15:34:00 by simonmar]
simonmar [Tue, 1 Feb 2005 15:34:00 +0000 (15:34 +0000)]
[project @ 2005-02-01 15:34:00 by simonmar]
whitespace

19 years ago[project @ 2005-02-01 15:33:14 by simonmar]
simonmar [Tue, 1 Feb 2005 15:33:14 +0000 (15:33 +0000)]
[project @ 2005-02-01 15:33:14 by simonmar]
hack upon the hack: confine the hack to -fasm, because gcc is too
stupid to optimise away the extra temporary.

19 years ago[project @ 2005-02-01 15:08:06 by simonmar]
simonmar [Tue, 1 Feb 2005 15:08:06 +0000 (15:08 +0000)]
[project @ 2005-02-01 15:08:06 by simonmar]
small perf hack in emitVectoredReturnInstr: work around lack of CSE in
the NCG by assigning info_amode to a new temporary.

19 years ago[project @ 2005-02-01 14:14:41 by simonmar]
simonmar [Tue, 1 Feb 2005 14:14:41 +0000 (14:14 +0000)]
[project @ 2005-02-01 14:14:41 by simonmar]
Add __attribute__((used)) to static functions, as gcc 3.4 -O2 is in the
habit of throwing them away.

19 years ago[project @ 2005-02-01 13:18:05 by simonmar]
simonmar [Tue, 1 Feb 2005 13:18:05 +0000 (13:18 +0000)]
[project @ 2005-02-01 13:18:05 by simonmar]
Fix the source_unchanged test in the Hsc phase

19 years ago[project @ 2005-02-01 08:36:02 by simonpj]
simonpj [Tue, 1 Feb 2005 08:36:07 +0000 (08:36 +0000)]
[project @ 2005-02-01 08:36:02 by simonpj]
--------------------
Command-flag cleanup
--------------------

* Fewer cases in GhcMode: eliminate DoMkDLL, DoLink, both in favour of
  StopBefore StopLn

* Replace the NoLink boolean with a GhcLink three-way flag:
NoLink, StaticLink, MakeDLL

* Corresponding plumbing to link it all up.

19 years ago[project @ 2005-02-01 00:52:18 by ross]
ross [Tue, 1 Feb 2005 00:52:22 +0000 (00:52 +0000)]
[project @ 2005-02-01 00:52:18 by ross]
more regex test down to libraries/base

19 years ago[project @ 2005-01-31 16:59:37 by simonpj]
simonpj [Mon, 31 Jan 2005 16:59:38 +0000 (16:59 +0000)]
[project @ 2005-01-31 16:59:37 by simonpj]
Tidy up stop-phase passing; fix bug in -o handling for ghc -E X.hs -o X.pp

19 years ago[project @ 2005-01-31 15:48:13 by simonpj]
simonpj [Mon, 31 Jan 2005 15:48:22 +0000 (15:48 +0000)]
[project @ 2005-01-31 15:48:13 by simonpj]
---------------------------
Some Template Haskell fixes
---------------------------

* Tidy up conversion from TH.Name to RdrName.RdrName. It was partly
  duplicated between Convert.thRdrName and TcSplice.lookupThName.
  Now it's all in one place: Convert.thRdrName

* Fix a bug in TH.tupleTypeName/TH.tupleDataName (GHC.Tuple -> Data.Tuple)

* Export appEs from Language.Haskell.TH

19 years ago[project @ 2005-01-31 14:57:36 by simonpj]
simonpj [Mon, 31 Jan 2005 14:57:36 +0000 (14:57 +0000)]
[project @ 2005-01-31 14:57:36 by simonpj]
Compile utilities and lib/compat with GhcHcOpts, in case it is profiled

19 years ago[project @ 2005-01-31 14:53:13 by simonpj]
simonpj [Mon, 31 Jan 2005 14:53:14 +0000 (14:53 +0000)]
[project @ 2005-01-31 14:53:13 by simonpj]
Compile utilities and lib/compat with GhcHcOpts, in case it is profiled

19 years ago[project @ 2005-01-31 13:53:29 by simonpj]
simonpj [Mon, 31 Jan 2005 13:53:29 +0000 (13:53 +0000)]
[project @ 2005-01-31 13:53:29 by simonpj]
Wibble to hoistForAllTys

19 years ago[project @ 2005-01-31 13:25:33 by simonpj]
simonpj [Mon, 31 Jan 2005 13:25:48 +0000 (13:25 +0000)]
[project @ 2005-01-31 13:25:33 by simonpj]
---------------------------
Types and evaluated-ness in
  CoreTidy and CorePrep
---------------------------

This commmit fixes two problems.

1.  DataToTagOp requires its argument to be evaluated, otherwise it silently
    gives the wrong answer.  This was not happening because we had
case (tag2Enum x) of y -> ...(dataToTag y)...
    and the tag2Enum was being inlined (it's non-speculative), giving
...(dataToTag (tag2Enum x))...

    Rather than relying on a somewhat-delicate global invariant, CorePrep
    now establishes the invariant that DataToTagOp's argument is evaluated.
    It does so by putting up-to-date is-evaluated information into each
    binder's UnfoldingInfo; not a full unfolding, just the (OtherCon [])
    for evaluated binders.

    Then there's a special case for DataToTag where applications are dealt with.

    Finally, we make DataToTagOp strict, which it really is.

2.  CoreTidy now does GADT refinement as it goes. This is important to ensure that
    each variable occurrence has informative type information, which in turn is
    essential to make exprType work (otherwise it can simply crash).
    [This happened in test gadt/tdpe]

    CorePrep has the same problem, but the solution is a little different:
    when looking up in the cloning environment, use the type at the occurrence
    site if we're inside a GADT.  It might be cleaner to use the same story as
    CoreTidy, but then we'd need to keep an in-scope set for type variables.
    No big deal either way.

19 years ago[project @ 2005-01-31 13:22:57 by simonpj]
simonpj [Mon, 31 Jan 2005 13:23:17 +0000 (13:23 +0000)]
[project @ 2005-01-31 13:22:57 by simonpj]
Rename mkTvSubst to mkOpenTvSubst; add new mkTvSubst

19 years ago[project @ 2005-01-31 13:21:01 by simonpj]
simonpj [Mon, 31 Jan 2005 13:21:10 +0000 (13:21 +0000)]
[project @ 2005-01-31 13:21:01 by simonpj]
Name evaldUnfolding = OtherCon [], and use it

19 years ago[project @ 2005-01-31 12:55:50 by simonmar]
simonmar [Mon, 31 Jan 2005 12:55:51 +0000 (12:55 +0000)]
[project @ 2005-01-31 12:55:50 by simonmar]
Move signal prototypes into RtsExternal.h

19 years ago[project @ 2005-01-31 05:27:14 by wolfgang]
wolfgang [Mon, 31 Jan 2005 05:27:16 +0000 (05:27 +0000)]
[project @ 2005-01-31 05:27:14 by wolfgang]
Reorganise handling of -fPIC flags passed to C compiler.
The flags expected by gcc differ only slightly per platform
(basically depending whether you are on a Mac or not), we don't need
separate cases for every processor.

TODO: Display an error message for platforms where -fPIC -fvia-C is not
      supported.

19 years ago[project @ 2005-01-29 12:15:33 by ross]
ross [Sat, 29 Jan 2005 12:15:33 +0000 (12:15 +0000)]
[project @ 2005-01-29 12:15:33 by ross]
Oops, misspelled OPTIONS_GHC

19 years ago[project @ 2005-01-29 09:57:42 by stolz]
stolz [Sat, 29 Jan 2005 09:57:42 +0000 (09:57 +0000)]
[project @ 2005-01-29 09:57:42 by stolz]
USE_MMAP on FreeBSD as well

19 years ago[project @ 2005-01-28 23:33:51 by krasimir]
krasimir [Fri, 28 Jan 2005 23:33:58 +0000 (23:33 +0000)]
[project @ 2005-01-28 23:33:51 by krasimir]
- The output from uncaught exceptions handler is redirected to RTS's errorBelch.
- The output from Debug.Trace is redirected to RTS's debugBelch
- Usually errorBelch and debugBelch messages go to stderr except for
Windows GUI applications. For GUI applications the Debug.Trace output is
redirected to debug console and the exceptions message is displayed in message box.

19 years ago[project @ 2005-01-28 18:50:25 by ross]
ross [Fri, 28 Jan 2005 18:50:25 +0000 (18:50 +0000)]
[project @ 2005-01-28 18:50:25 by ross]
add missing underscores

19 years ago[project @ 2005-01-28 17:44:55 by simonpj]
simonpj [Fri, 28 Jan 2005 17:45:03 +0000 (17:45 +0000)]
[project @ 2005-01-28 17:44:55 by simonpj]
Arrange that when seeking instance decls in GHCi, in response
to a :info command, we only print ones whose types are in scope
unqualified.  This eliminates an alarmingly long list when
simply typing ':info Show', say.

On the way, I reorganised a bit.  GHCi printing happens by
converting a TyThing to an IfaceDecl, and printing that.
I now arrange to generate unqualifed IfaceExtNames directly
during this conversion, based on what is in scope.  Previously
it was done during the pretty-printing part via the UserStyle.
But this is nicer.

19 years ago[project @ 2005-01-28 16:28:56 by ross]
ross [Fri, 28 Jan 2005 16:28:56 +0000 (16:28 +0000)]
[project @ 2005-01-28 16:28:56 by ross]
from 6.3, generate INCLUDE instead of OPTIONS -#include and GHC_OPTIONS
instead of OPTIONS.

19 years ago[project @ 2005-01-28 14:41:23 by simonmar]
simonmar [Fri, 28 Jan 2005 14:41:23 +0000 (14:41 +0000)]
[project @ 2005-01-28 14:41:23 by simonmar]
x-ref INCLUDE pragmas

19 years ago[project @ 2005-01-28 14:41:09 by simonmar]
simonmar [Fri, 28 Jan 2005 14:41:09 +0000 (14:41 +0000)]
[project @ 2005-01-28 14:41:09 by simonmar]
Document {-# INCLUDE #-}

19 years ago[project @ 2005-01-28 14:27:00 by simonmar]
simonmar [Fri, 28 Jan 2005 14:27:00 +0000 (14:27 +0000)]
[project @ 2005-01-28 14:27:00 by simonmar]
add an INCLUDE pragma, as a compiler-independent alternative to
-#include.

19 years ago[project @ 2005-01-28 14:21:12 by simonmar]
simonmar [Fri, 28 Jan 2005 14:21:12 +0000 (14:21 +0000)]
[project @ 2005-01-28 14:21:12 by simonmar]
Fix -no-recomp

19 years ago[project @ 2005-01-28 14:01:08 by simonmar]
simonmar [Fri, 28 Jan 2005 14:01:08 +0000 (14:01 +0000)]
[project @ 2005-01-28 14:01:08 by simonmar]
Here's a file I forgot to add.

NB. ghcconfig.h is now a *source file*.  If you're using a linked
build tree, please remove it from ghc/includes and re-link (in fact,
you probabaly need a make clean in ghc/includes at least).

19 years ago[project @ 2005-01-28 12:57:00 by simonmar]
simonmar [Fri, 28 Jan 2005 12:57:00 +0000 (12:57 +0000)]
[project @ 2005-01-28 12:57:00 by simonmar]
Comment updates only (platform-related)

19 years ago[project @ 2005-01-28 12:55:17 by simonmar]
simonmar [Fri, 28 Jan 2005 12:56:27 +0000 (12:56 +0000)]
[project @ 2005-01-28 12:55:17 by simonmar]
Rationalise the BUILD,HOST,TARGET defines.

Recall that:

  - build is the platform we're building on
  - host is the platform we're running on
  - target is the platform we're generating code for

The change is that now we take these definitions as applying from the
point of view of the particular source code being built, rather than
the point of view of the whole build tree.

For example, in RTS and library code, we were previously testing the
TARGET platform.  But under the new rule, the platform on which this
code is going to run is the HOST platform.  TARGET only makes sense in
the compiler sources.

In practical terms, this means that the values of BUILD, HOST & TARGET
may vary depending on which part of the build tree we are in.

Actual changes:

 - new file: includes/ghcplatform.h contains platform defines for
   the RTS and library code.

 - new file: includes/ghcautoconf.h contains the autoconf settings
   only (HAVE_BLAH).  This is so that we can get hold of these
   settings independently of the platform defines when necessary
   (eg. in GHC).

 - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.

 - MachRegs.h, which is included into both the compiler and the RTS,
   now has to cope with the fact that it might need to test either
   _TARGET_ or _HOST_ depending on the context.

 - the compiler's Makefile now generates
     stage{1,2,3}/ghc_boot_platform.h
   which contains platform defines for the compiler.  These differ
   depending on the stage, of course: in stage2, the HOST is the
   TARGET of stage1.  This was wrong before.

 - The compiler doesn't get platform info from Config.hs any more.
   Previously it did (sometimes), but unless we want to generate
   a new Config.hs for each stage we can't do this.

 - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
   in CPP'd Haskell source.

 - ghcplatform.h defines *_TARGET_* for backwards compatibility
   (ghcplatform.h is included by ghcconfig.h, which is included by
   config.h, so code which still #includes config.h will get the TARGET
   settings as before).

 - The Users's Guide is updated to mention *_HOST_* rather than
   *_TARGET_*.

 - coding-style.html in the commentary now contains a section on
   platform defines.  There are further doc updates to come.

Thanks to Wolfgang Thaller for pointing me in the right direction.

19 years ago[project @ 2005-01-27 18:38:21 by panne]
panne [Thu, 27 Jan 2005 18:38:21 +0000 (18:38 +0000)]
[project @ 2005-01-27 18:38:21 by panne]
Fixed a typo and a cut-n-pasto

19 years ago[project @ 2005-01-27 15:55:38 by simonpj]
simonpj [Thu, 27 Jan 2005 15:55:45 +0000 (15:55 +0000)]
[project @ 2005-01-27 15:55:38 by simonpj]
Make -no-recomp a dynamic flag

19 years ago[project @ 2005-01-27 15:53:38 by simonpj]
simonpj [Thu, 27 Jan 2005 15:53:38 +0000 (15:53 +0000)]
[project @ 2005-01-27 15:53:38 by simonpj]
Comments

19 years ago[project @ 2005-01-27 15:53:08 by simonpj]
simonpj [Thu, 27 Jan 2005 15:53:08 +0000 (15:53 +0000)]
[project @ 2005-01-27 15:53:08 by simonpj]
Remove redundant parens in pretty print

19 years ago[project @ 2005-01-27 15:52:09 by simonpj]
simonpj [Thu, 27 Jan 2005 15:52:09 +0000 (15:52 +0000)]
[project @ 2005-01-27 15:52:09 by simonpj]
Wibble

19 years ago[project @ 2005-01-27 15:51:11 by simonpj]
simonpj [Thu, 27 Jan 2005 15:51:11 +0000 (15:51 +0000)]
[project @ 2005-01-27 15:51:11 by simonpj]
Add a rule for dataToTag (tagToEnum x)

19 years ago[project @ 2005-01-27 14:38:29 by simonmar]
simonmar [Thu, 27 Jan 2005 14:38:29 +0000 (14:38 +0000)]
[project @ 2005-01-27 14:38:29 by simonmar]
Fix explicit layout

19 years ago[project @ 2005-01-27 13:00:14 by simonmar]
simonmar [Thu, 27 Jan 2005 13:01:13 +0000 (13:01 +0000)]
[project @ 2005-01-27 13:00:14 by simonmar]
bootstrapping wibbles

19 years ago[project @ 2005-01-27 12:57:16 by simonpj]
simonpj [Thu, 27 Jan 2005 12:57:16 +0000 (12:57 +0000)]
[project @ 2005-01-27 12:57:16 by simonpj]
Omit PRE_HC_OPTS and POST_HC_OPTS for hs-boot files

19 years ago[project @ 2005-01-27 12:55:15 by simonmar]
simonmar [Thu, 27 Jan 2005 12:55:15 +0000 (12:55 +0000)]
[project @ 2005-01-27 12:55:15 by simonmar]
bootstrapping wibbles

19 years ago[project @ 2005-01-27 12:47:05 by simonpj]
simonpj [Thu, 27 Jan 2005 12:47:05 +0000 (12:47 +0000)]
[project @ 2005-01-27 12:47:05 by simonpj]
Extra suffix rules for hs-boot stuff; you need this to compile the new hs-boot story

19 years ago[project @ 2005-01-27 12:38:49 by ross]
ross [Thu, 27 Jan 2005 12:38:49 +0000 (12:38 +0000)]
[project @ 2005-01-27 12:38:49 by ross]
turn -Dfoo into
#define foo 1
(like C compilers do) instead of
#define foo

19 years ago[project @ 2005-01-27 12:16:51 by simonpj]
simonpj [Thu, 27 Jan 2005 12:16:51 +0000 (12:16 +0000)]
[project @ 2005-01-27 12:16:51 by simonpj]
Fix handling of dependent packages without a version

19 years ago[project @ 2005-01-27 11:55:37 by simonmar]
simonmar [Thu, 27 Jan 2005 11:55:37 +0000 (11:55 +0000)]
[project @ 2005-01-27 11:55:37 by simonmar]
Include package Cabal when linking

19 years ago[project @ 2005-01-27 11:51:56 by simonpj]
simonpj [Thu, 27 Jan 2005 11:52:11 +0000 (11:52 +0000)]
[project @ 2005-01-27 11:51:56 by simonpj]
Import trimming

19 years ago[project @ 2005-01-27 11:50:58 by simonpj]
simonpj [Thu, 27 Jan 2005 11:51:00 +0000 (11:51 +0000)]
[project @ 2005-01-27 11:50:58 by simonpj]
Make sure that the interactive context can see home-package instances;
I forgot to do this when making tcRnModule find the appropriate intances
(TcRnDriver rev 1.91)

This was causing SourceForge [ghc-Bugs-1106171].

19 years ago[project @ 2005-01-27 11:30:49 by simonmar]
simonmar [Thu, 27 Jan 2005 11:30:49 +0000 (11:30 +0000)]
[project @ 2005-01-27 11:30:49 by simonmar]
GhcBootLibs=YES when building libraries the first time.

19 years ago[project @ 2005-01-27 11:29:03 by simonmar]
simonmar [Thu, 27 Jan 2005 11:29:03 +0000 (11:29 +0000)]
[project @ 2005-01-27 11:29:03 by simonmar]
Suppress .cmm suffix rules when $(BootingFromHc)

19 years ago[project @ 2005-01-27 11:27:22 by simonmar]
simonmar [Thu, 27 Jan 2005 11:27:22 +0000 (11:27 +0000)]
[project @ 2005-01-27 11:27:22 by simonmar]
updates to hc-file-bundle target

19 years ago[project @ 2005-01-27 11:12:52 by simonpj]
simonpj [Thu, 27 Jan 2005 11:12:58 +0000 (11:12 +0000)]
[project @ 2005-01-27 11:12:52 by simonpj]
Remove redundant .hi-boot files.  The earliest compiler we claim to be able
to compile GHC with is GHC 5, and that needs hi-boot-5 boot files.  So the
plain hi-boot files are dead.

Reason for removing them now is that my big commit accidentally splatted
them with binary data; so if you ever want to recover them, go back
one revision beore the one I'm deleting.

19 years ago[project @ 2005-01-27 10:51:06 by simonmar]
simonmar [Thu, 27 Jan 2005 10:51:06 +0000 (10:51 +0000)]
[project @ 2005-01-27 10:51:06 by simonmar]
bootstrapping wibble

19 years ago[project @ 2005-01-27 10:44:00 by simonpj]
simonpj [Thu, 27 Jan 2005 10:45:48 +0000 (10:45 +0000)]
[project @ 2005-01-27 10:44:00 by simonpj]
--------------------------------------------
          Replace hi-boot files with hs-boot files
   --------------------------------------------

This major commit completely re-organises the way that recursive modules
are dealt with.

  * It should have NO EFFECT if you do not use recursive modules

  * It is a BREAKING CHANGE if you do

====== Warning: .hi-file format has changed, so if you are
====== updating into an existing HEAD build, you'll
====== need to make clean and re-make

The details:  [documentation still to be done]

* Recursive loops are now broken with Foo.hs-boot (or Foo.lhs-boot),
  not Foo.hi-boot

* An hs-boot files is a proper source file.  It is compiled just like
  a regular Haskell source file:
ghc Foo.hs generates Foo.hi, Foo.o
ghc Foo.hs-boot generates Foo.hi-boot, Foo.o-boot

* hs-boot files are precisely a subset of Haskell. In particular:
- they have the same import, export, and scoping rules
- errors (such as kind errors) in hs-boot files are checked
  You do *not* need to mention the "original" name of something in
  an hs-boot file, any more than you do in any other Haskell module.

* The Foo.hi-boot file generated by compiling Foo.hs-boot is a machine-
  generated interface file, in precisely the same format as Foo.hi

* When compiling Foo.hs, its exports are checked for compatibility with
  Foo.hi-boot (previously generated by compiling Foo.hs-boot)

* The dependency analyser (ghc -M) knows about Foo.hs-boot files, and
  generates appropriate dependencies.  For regular source files it
  generates
Foo.o : Foo.hs
Foo.o : Baz.hi -- Foo.hs imports Baz
Foo.o : Bog.hi-boot -- Foo.hs source-imports Bog

  For a hs-boot file it generates similar dependencies
Bog.o-boot : Bog.hs-boot
Bog.o-boot : Nib.hi -- Bog.hs-boto imports Nib

* ghc -M is also enhanced to use the compilation manager dependency
  chasing, so that
ghc -M Main
  will usually do the job.  No need to enumerate all the source files.

* The -c flag is no longer a "compiler mode". It simply means "omit the
  link step", and synonymous with -no-link.

19 years ago[project @ 2005-01-26 16:57:31 by stolz]
stolz [Wed, 26 Jan 2005 16:57:31 +0000 (16:57 +0000)]
[project @ 2005-01-26 16:57:31 by stolz]
Automagically find docbook on FreeBSD (or anybody else who cares to store
it under /usr/local/share/xsl/docbook)

19 years ago[project @ 2005-01-26 16:56:45 by simonmar]
simonmar [Wed, 26 Jan 2005 16:56:45 +0000 (16:56 +0000)]
[project @ 2005-01-26 16:56:45 by simonmar]
tidy up

19 years ago[project @ 2005-01-26 16:11:58 by simonmar]
simonmar [Wed, 26 Jan 2005 16:11:58 +0000 (16:11 +0000)]
[project @ 2005-01-26 16:11:58 by simonmar]
updates

19 years ago[project @ 2005-01-26 16:10:02 by simonpj]
simonpj [Wed, 26 Jan 2005 16:10:06 +0000 (16:10 +0000)]
[project @ 2005-01-26 16:10:02 by simonpj]
-----------------------
Fixup to hoistForAllTys
-----------------------

* hoistForAllTys moves from TcHsType to TcType

hoistForAllTys was being too vigorous and breaking up type synonyms,
even when it was entirely unnecessary to do so.

Not only does this make error messsages less good, but it's actually
wrong for Haskell 98, because we are meant to report under-applied
type synonyms, and that check doesn't happen until after hoistForAllTys.
This led to a very obscure bug, immortalised as tcfail129.

19 years ago[project @ 2005-01-26 16:08:55 by simonmar]
simonmar [Wed, 26 Jan 2005 16:08:55 +0000 (16:08 +0000)]
[project @ 2005-01-26 16:08:55 by simonmar]
Build ghc/lib (untested)

19 years ago[project @ 2005-01-26 16:05:48 by simonmar]
simonmar [Wed, 26 Jan 2005 16:05:48 +0000 (16:05 +0000)]
[project @ 2005-01-26 16:05:48 by simonmar]
hc-file-bundle: need to track ghc/lib too

19 years ago[project @ 2005-01-26 16:03:40 by simonmar]
simonmar [Wed, 26 Jan 2005 16:03:41 +0000 (16:03 +0000)]
[project @ 2005-01-26 16:03:40 by simonmar]
Common up the ghc_ge_XXX variables into config.mk, and add the
ability to build ghc/lib and ghc/utils using the stage1 compiler, by
saying 'make UseStage1=YES'.  This is going to be useful for
bootstrapping.

19 years ago[project @ 2005-01-26 15:04:08 by simonmar]
simonmar [Wed, 26 Jan 2005 15:04:09 +0000 (15:04 +0000)]
[project @ 2005-01-26 15:04:08 by simonmar]
Remove System.FilePath, use System.Directory.Internals for now.

19 years ago[project @ 2005-01-26 13:45:11 by simonmar]
simonmar [Wed, 26 Jan 2005 13:45:11 +0000 (13:45 +0000)]
[project @ 2005-01-26 13:45:11 by simonmar]
Avoid use of System.FilePath, which is going away

19 years ago[project @ 2005-01-26 12:58:09 by simonmar]
simonmar [Wed, 26 Jan 2005 12:58:09 +0000 (12:58 +0000)]
[project @ 2005-01-26 12:58:09 by simonmar]
fileLoop: catch InvalidArgument and behave as for EOF (i.e. terminate
the session).  This means that the user can close stdin to end a GHCi
session, but it also means that the tests that run programs which use
getContents inside GHCi won't crash because stdin has been closed.

19 years ago[project @ 2005-01-24 00:36:03 by ross]
ross [Mon, 24 Jan 2005 00:36:03 +0000 (00:36 +0000)]
[project @ 2005-01-24 00:36:03 by ross]
make hsc2hs work with Hugs

19 years ago[project @ 2005-01-23 20:34:17 by wolfgang]
wolfgang [Sun, 23 Jan 2005 20:34:17 +0000 (20:34 +0000)]
[project @ 2005-01-23 20:34:17 by wolfgang]
Distinguish between rodata and relrodata (relocatable read-only data) in the
mangler.
By default, use $T_HDR_rodata if $T_HDR_relrodata is not defined for a
particular platform.

19 years ago[project @ 2005-01-23 18:50:40 by wolfgang]
wolfgang [Sun, 23 Jan 2005 18:50:45 +0000 (18:50 +0000)]
[project @ 2005-01-23 18:50:40 by wolfgang]
Make the NCG distinguish between the read-only data section and the
"relocatable read-only data" section.
Read-only data is supposed to be _really_ read-only, whereas "relrodata"
can have relocations, but should not be modified by the program at runtime.

For Linux, put relrodata into ".data" by default, as the dynamic linker
tends to do evil things to avoid relocating things in read-only sections.

19 years ago[project @ 2005-01-23 18:18:05 by wolfgang]
wolfgang [Sun, 23 Jan 2005 18:18:05 +0000 (18:18 +0000)]
[project @ 2005-01-23 18:18:05 by wolfgang]
Darwin / Mac OS X:

For builds with dynamic libraries, fix up dynamic library paths
("install names") for binaries. Otherwise, a dynamically-linked stage2 ghc
would contain the path names of the build directories.

19 years ago[project @ 2005-01-23 17:05:31 by panne]
panne [Sun, 23 Jan 2005 17:05:31 +0000 (17:05 +0000)]
[project @ 2005-01-23 17:05:31 by panne]
In the installed package.conf, all includeDirs were empty, so no GHC/package
headers were found. This commit fixes that (in a hopefully correct way).

19 years ago[project @ 2005-01-23 09:41:01 by krasimir]
krasimir [Sun, 23 Jan 2005 09:41:01 +0000 (09:41 +0000)]
[project @ 2005-01-23 09:41:01 by krasimir]
Use withProgName. Without it getProgName from the executed script will return
"<interactive>"

19 years ago[project @ 2005-01-23 06:10:15 by wolfgang]
wolfgang [Sun, 23 Jan 2005 06:10:24 +0000 (06:10 +0000)]
[project @ 2005-01-23 06:10:15 by wolfgang]
Add support for the dead code stripping feature of recent Apple linkers.
If your code is compiled using the NCG, you can now specify
-optl-W,-dead_strip on the GHC command line when linking.
It will have basically the same effect as using split-objs to build the
libraries.

Advantages over split-objs:
    * No evil perl script involved
    * Requires no special handling when building libraries

Disadvantages:
    * The current version of Apple's linker is slow when given the
      -dead_strip flag. _REALLY_ slow.
    * Mac OS X only.

This works by making the NCG emit the .subsections_via_symbols directive.
Additionally, we have to add an extra label at the top of every info table,
and make sure that the entry code references it (otherwise the info table
will be considered part of the preceding entry code).
The mangler just removes the .subsections_via_symbols directive.

19 years ago[project @ 2005-01-22 08:20:31 by krasimir]
krasimir [Sat, 22 Jan 2005 08:20:31 +0000 (08:20 +0000)]
[project @ 2005-01-22 08:20:31 by krasimir]
import Foreign.Ptr and Foreign.C under Windows

19 years ago[project @ 2005-01-21 19:58:51 by sof]
sof [Fri, 21 Jan 2005 19:59:01 +0000 (19:59 +0000)]
[project @ 2005-01-21 19:58:51 by sof]
win32 only:
  Tidy up delivery and handling of console events by having the low-level
  console event handler signal the RTS thread blocked waiting for I/O.

19 years ago[project @ 2005-01-21 18:06:26 by panne]
panne [Fri, 21 Jan 2005 18:06:26 +0000 (18:06 +0000)]
[project @ 2005-01-21 18:06:26 by panne]
* Require happy >= 1.15 for build
* Build some needed PostScript docs
* Merge the ghc-doc- sub-package into the ghc sub-package, it's quite
  unusual to find the docs for a package blah under
  /usr/share/doc/packages/blah-doc

19 years ago[project @ 2005-01-21 16:55:14 by simonmar]
simonmar [Fri, 21 Jan 2005 16:55:14 +0000 (16:55 +0000)]
[project @ 2005-01-21 16:55:14 by simonmar]
small wibble

19 years ago[project @ 2005-01-21 16:32:36 by simonmar]
simonmar [Fri, 21 Jan 2005 16:32:36 +0000 (16:32 +0000)]
[project @ 2005-01-21 16:32:36 by simonmar]
Begin updating the porting instructions for GHC 6.4.  A few details
have changed.

19 years ago[project @ 2005-01-21 16:02:47 by simonmar]
simonmar [Fri, 21 Jan 2005 16:02:58 +0000 (16:02 +0000)]
[project @ 2005-01-21 16:02:47 by simonmar]
Don't try to run finalizers at program exit.  This turned out to be
hard if not impossible to do in general, so now we don't attempt it at
all.

The Main.main wrapper, previously called runIO and now called
runMainIO, flushes stdout and stderr before exiting.  This should
catch most cases where programs rely on Handles being flushed at
program exit, but note that now if you simply drop a Handle in your
program, there's no guarantee it'll be flushed on exit.  If the
punters complain enough, I suppose we could implement a global
Handle table and flush them all at exit... I'd rather not do this if
possible, though.  Better to teach people to close their Handles
properly.

19 years ago[project @ 2005-01-21 12:48:38 by simonmar]
simonmar [Fri, 21 Jan 2005 12:48:39 +0000 (12:48 +0000)]
[project @ 2005-01-21 12:48:38 by simonmar]
Update packages documentation (phew)

19 years ago[project @ 2005-01-21 11:04:39 by simonmar]
simonmar [Fri, 21 Jan 2005 11:04:39 +0000 (11:04 +0000)]
[project @ 2005-01-21 11:04:39 by simonmar]
Update the --help text

19 years ago[project @ 2005-01-21 00:14:41 by ross]
ross [Fri, 21 Jan 2005 00:14:41 +0000 (00:14 +0000)]
[project @ 2005-01-21 00:14:41 by ross]
repair import breakage

19 years ago[project @ 2005-01-20 18:35:47 by ross]
ross [Thu, 20 Jan 2005 18:35:47 +0000 (18:35 +0000)]
[project @ 2005-01-20 18:35:47 by ross]
more precise imports (including try from System.IO.Error)

19 years ago[project @ 2005-01-20 16:15:02 by simonmar]
simonmar [Thu, 20 Jan 2005 16:15:02 +0000 (16:15 +0000)]
[project @ 2005-01-20 16:15:02 by simonmar]
ghc-pkg list: show hidden packages in parentheses

19 years ago[project @ 2005-01-20 15:06:17 by simonmar]
simonmar [Thu, 20 Jan 2005 15:06:23 +0000 (15:06 +0000)]
[project @ 2005-01-20 15:06:17 by simonmar]
Squash gcc 3.4.x warnings.

19 years ago[project @ 2005-01-20 15:05:59 by simonmar]
simonmar [Thu, 20 Jan 2005 15:05:59 +0000 (15:05 +0000)]
[project @ 2005-01-20 15:05:59 by simonmar]
One package.conf.in file I forgot

19 years ago[project @ 2005-01-20 14:30:17 by simonmar]
simonmar [Thu, 20 Jan 2005 14:30:17 +0000 (14:30 +0000)]
[project @ 2005-01-20 14:30:17 by simonmar]
Avoid a warning

19 years ago[project @ 2005-01-20 14:22:19 by simonmar]
simonmar [Thu, 20 Jan 2005 14:22:33 +0000 (14:22 +0000)]
[project @ 2005-01-20 14:22:19 by simonmar]
Fill in the haddock-interfaces and haddock-html fields in the
package.conf files.

To do this I had to make some changes:

  - haddock-interfaces requires the value of $(datadir).  We can't
    just plug this in, because $(datadir) might change at install-time
    (eg. a Windows installer can be placed anywhere, as can a Unix
    binary .tar.gz distribution).  The current trick is for the
    compiler to splice in the value of $libdir in package.conf at
    runtime.  So we could extend this mechanism and tell the compiler
    the value of $datadir via a command-line option, but that seems
    ugly.

    On Windows, $datadir==$libdir, so we don't need any changes:
    package.conf still uses $libdir, and a Windows installation is
    independent of its absolute location.  Even 'make install' on
    Windows should have this property.

    On Unix:
- for 'make install' and in-place execution, we just use
          absolute paths in package.conf

- for a binary dist, we generate a package.conf that refers
  to $libdir and $datadir, and splice in the values at
  install-time (distrib/Makefile-bin.in).

  - Also, I renamed $libdir to $topdir to more closely reflect its
    actual meaning.  This is somewhat malicious in that it will flush
    out all those clients using $libdir when they really shouldn't
    be :-)

19 years ago[project @ 2005-01-20 12:02:06 by simonpj]
simonpj [Thu, 20 Jan 2005 12:02:06 +0000 (12:02 +0000)]
[project @ 2005-01-20 12:02:06 by simonpj]
Fix syntax error

19 years ago[project @ 2005-01-19 18:31:07 by wolfgang]
wolfgang [Wed, 19 Jan 2005 18:31:07 +0000 (18:31 +0000)]
[project @ 2005-01-19 18:31:07 by wolfgang]
Update comments for PowerPC register mapping.

19 years ago[project @ 2005-01-19 11:48:15 by simonmar]
simonmar [Wed, 19 Jan 2005 11:48:15 +0000 (11:48 +0000)]
[project @ 2005-01-19 11:48:15 by simonmar]
-jN friendliness

19 years ago[project @ 2005-01-19 10:04:17 by simonmar]
simonmar [Wed, 19 Jan 2005 10:04:17 +0000 (10:04 +0000)]
[project @ 2005-01-19 10:04:17 by simonmar]
Mention -fffi in this chapter.

19 years ago[project @ 2005-01-18 16:28:43 by simonmar]
simonmar [Tue, 18 Jan 2005 16:28:43 +0000 (16:28 +0000)]
[project @ 2005-01-18 16:28:43 by simonmar]
USE_MMAP on Linux too: this is needed for sparc64-unknown-linux at
least, and since it seems to work on i386-unknown-linux too we might
as well enable it.  We should probably use it on more arches/OSs too.

19 years ago[project @ 2005-01-18 15:58:12 by simonpj]
simonpj [Tue, 18 Jan 2005 15:58:12 +0000 (15:58 +0000)]
[project @ 2005-01-18 15:58:12 by simonpj]
Wibble