ghc-hetmet.git
19 years ago[project @ 2005-02-14 17:00:31 by simonmar]
simonmar [Mon, 14 Feb 2005 17:00:31 +0000 (17:00 +0000)]
[project @ 2005-02-14 17:00:31 by simonmar]
Be clearer about HC files: you need a set generated on the same
platform, not just similar hardware.

19 years ago[project @ 2005-02-14 16:49:50 by simonmar]
simonmar [Mon, 14 Feb 2005 16:49:50 +0000 (16:49 +0000)]
[project @ 2005-02-14 16:49:50 by simonmar]
Improve the module-not-found error message when we didn't actually
search for it anywhere.  This happens when we know all the places it
might be: either in the current program, or a package.

19 years ago[project @ 2005-02-14 16:38:30 by simonmar]
simonmar [Mon, 14 Feb 2005 16:38:30 +0000 (16:38 +0000)]
[project @ 2005-02-14 16:38:30 by simonmar]
cmSetContext: check whether the modules specified actually exist and
emit the usual Finder error message if any don't.

This regressed duing the ModuleName->Module changeover, where I was a
bit heavyhanded in removing moduleNameToModule: it also checked for
the existence of each module and emitted a sensible exception.

19 years ago[project @ 2005-02-14 16:20:56 by simonmar]
simonmar [Mon, 14 Feb 2005 16:20:56 +0000 (16:20 +0000)]
[project @ 2005-02-14 16:20:56 by simonmar]
More libghccompat nonsense

19 years ago[project @ 2005-02-14 13:42:09 by simonmar]
simonmar [Mon, 14 Feb 2005 13:42:09 +0000 (13:42 +0000)]
[project @ 2005-02-14 13:42:09 by simonmar]
-d*-lint shouldn't turn off recompilation checking

19 years ago[project @ 2005-02-14 13:27:52 by simonmar]
simonmar [Mon, 14 Feb 2005 13:28:05 +0000 (13:28 +0000)]
[project @ 2005-02-14 13:27:52 by simonmar]
Put the GlobalRdrEnv back into the ModIface, so it gets preserved when
we reload a module without recompiling it.

19 years ago[project @ 2005-02-14 10:35:07 by simonmar]
simonmar [Mon, 14 Feb 2005 10:35:07 +0000 (10:35 +0000)]
[project @ 2005-02-14 10:35:07 by simonmar]
Fix documentation for ghc-pkg list.

19 years ago[project @ 2005-02-14 10:33:58 by simonmar]
simonmar [Mon, 14 Feb 2005 10:33:58 +0000 (10:33 +0000)]
[project @ 2005-02-14 10:33:58 by simonmar]
Fix help text for ghc-pkg list to match the implementation (it was
easier to do this than fix the implementation, and in fact this is
more consistent).

19 years ago[project @ 2005-02-11 15:28:46 by simonmar]
simonmar [Fri, 11 Feb 2005 15:28:46 +0000 (15:28 +0000)]
[project @ 2005-02-11 15:28:46 by simonmar]
Catch up with mutable list changes

19 years ago[project @ 2005-02-11 14:01:30 by simonmar]
simonmar [Fri, 11 Feb 2005 14:01:30 +0000 (14:01 +0000)]
[project @ 2005-02-11 14:01:30 by simonmar]
Careful with mutable list entries that point to THUNKs: the thunk
might be updated, and the resulting IND_OLDGEN will be on the mutable
list twice.

We previously avoided this problem by having an extra MUT_CONS object
on the mutable list pointing to the THUNK, so that we could tell the
difference between the entry on the mutable list that used to be the
THUNK, and the new entry for the IND_OLDGEN.

We don't have MUT_CONS any more (this was part of the cleanup from
separating the mutable list from the heap).  So, now, when scavenging
an IND_OLDGEN on the mutable list, we check whether it is pointing to
an already-evacuated object.  This is a bit crude, but at least it is
a localised hack.

19 years ago[project @ 2005-02-11 12:20:12 by simonmar]
simonmar [Fri, 11 Feb 2005 12:20:12 +0000 (12:20 +0000)]
[project @ 2005-02-11 12:20:12 by simonmar]
Fix a bug: thunk_selector_depth was being incremented before checking
that we had reached the depth limit, and not decremented if we had
reached the limit.

19 years ago[project @ 2005-02-11 10:35:06 by simonmar]
simonmar [Fri, 11 Feb 2005 10:35:06 +0000 (10:35 +0000)]
[project @ 2005-02-11 10:35:06 by simonmar]
Allow package identifiers with versions in the old command-line syntax

19 years ago[project @ 2005-02-11 09:57:32 by simonmar]
simonmar [Fri, 11 Feb 2005 09:57:32 +0000 (09:57 +0000)]
[project @ 2005-02-11 09:57:32 by simonmar]
Add a missing delcaration for stg_MUT_ARR_PTRS_FROZEN0_entry (unbreak
the unregisterised build).

19 years ago[project @ 2005-02-10 15:26:23 by simonmar]
simonmar [Thu, 10 Feb 2005 15:26:23 +0000 (15:26 +0000)]
[project @ 2005-02-10 15:26:23 by simonmar]
Print the banner before the "reading package config file" messages in
verbose mode.

19 years ago[project @ 2005-02-10 15:12:22 by simonmar]
simonmar [Thu, 10 Feb 2005 15:12:22 +0000 (15:12 +0000)]
[project @ 2005-02-10 15:12:22 by simonmar]
Make sure we don't register a package with an identifier that cannot
be parsed later.

19 years ago[project @ 2005-02-10 13:38:50 by simonmar]
simonmar [Thu, 10 Feb 2005 13:38:50 +0000 (13:38 +0000)]
[project @ 2005-02-10 13:38:50 by simonmar]
NO_INSTALL_LIBRARY=YES

19 years ago[project @ 2005-02-10 13:38:35 by simonmar]
simonmar [Thu, 10 Feb 2005 13:38:35 +0000 (13:38 +0000)]
[project @ 2005-02-10 13:38:35 by simonmar]
Fix library installation: we now install libraries *unless*
NO_INSTALL_LIBRARY=YES.

19 years ago[project @ 2005-02-10 13:01:52 by simonmar]
simonmar [Thu, 10 Feb 2005 13:02:40 +0000 (13:02 +0000)]
[project @ 2005-02-10 13:01:52 by simonmar]
GC changes: instead of threading old-generation mutable lists
through objects in the heap, keep it in a separate flat array.

This has some advantages:

  - the IND_OLDGEN object is now only 2 words, so the minimum
    size of a THUNK is now 2 words instead of 3.  This saves
    some amount of allocation (about 2% on average according to
    my measurements), and is more friendly to the cache by
    squashing objects together more.

  - keeping the mutable list separate from the IND object
    will be necessary for our multiprocessor implementation.

  - removing the mut_link field makes the layout of some objects
    more uniform, leading to less complexity and special cases.

  - I also unified the two mutable lists (mut_once_list and mut_list)
    into a single mutable list, which lead to more simplifications
    in the GC.

19 years ago[project @ 2005-02-10 12:35:21 by ross]
ross [Thu, 10 Feb 2005 12:35:21 +0000 (12:35 +0000)]
[project @ 2005-02-10 12:35:21 by ross]
xrefs to Cabal docs

19 years ago[project @ 2005-02-10 07:01:45 by wolfgang]
wolfgang [Thu, 10 Feb 2005 07:01:45 +0000 (07:01 +0000)]
[project @ 2005-02-10 07:01:45 by wolfgang]
Fix previous commit. Got distracted, thought I had already tested.

19 years ago[project @ 2005-02-10 05:46:46 by wolfgang]
wolfgang [Thu, 10 Feb 2005 05:46:46 +0000 (05:46 +0000)]
[project @ 2005-02-10 05:46:46 by wolfgang]
Fix Mac OS X-specific breakage introduced by rev. 1.67 of ghc/includes/Stg.h.
Adding the used attribute to static functions caused gcc to emit
Apple-specific .no_dead_strip directives, which messed things up.

19 years ago[project @ 2005-02-10 04:58:09 by wolfgang]
wolfgang [Thu, 10 Feb 2005 04:58:09 +0000 (04:58 +0000)]
[project @ 2005-02-10 04:58:09 by wolfgang]
Add a special case for Mac OS X to FP_PROG_AR_NEEDS_RANLIB.
On Mac OS X, we need to run ranlib after installing .a files because
they contain a timestamp which will be outdated after installing.

We could do a proper test for that, but it would contain the command
'sleep 6' and still apply only to one platform.

19 years ago[project @ 2005-02-10 03:08:26 by wolfgang]
wolfgang [Thu, 10 Feb 2005 03:08:26 +0000 (03:08 +0000)]
[project @ 2005-02-10 03:08:26 by wolfgang]
PowerPC: mangler trouble again

19 years ago[project @ 2005-02-09 15:59:35 by wolfgang]
wolfgang [Wed, 9 Feb 2005 15:59:35 +0000 (15:59 +0000)]
[project @ 2005-02-09 15:59:35 by wolfgang]
PowerPC: #ifdef darwin_REGS -> #if darwin_REGS

19 years ago[project @ 2005-02-09 15:25:12 by simonmar]
simonmar [Wed, 9 Feb 2005 15:25:12 +0000 (15:25 +0000)]
[project @ 2005-02-09 15:25:12 by simonmar]
Keep .type/.size directives for _entry symbols, but rename them to
_info.  This helps cachegrind to find where my instructions are going.

19 years ago[project @ 2005-02-09 14:02:31 by simonpj]
simonpj [Wed, 9 Feb 2005 14:02:31 +0000 (14:02 +0000)]
[project @ 2005-02-09 14:02:31 by simonpj]
Add comment

19 years ago[project @ 2005-02-09 10:11:36 by simonmar]
simonmar [Wed, 9 Feb 2005 10:11:36 +0000 (10:11 +0000)]
[project @ 2005-02-09 10:11:36 by simonmar]
oops, fix building of GHCi libraries.  We only want to avoid the
*install* if this isn't a package.

19 years ago[project @ 2005-02-08 10:21:36 by simonmar]
simonmar [Tue, 8 Feb 2005 10:21:36 +0000 (10:21 +0000)]
[project @ 2005-02-08 10:21:36 by simonmar]
Only build GHCi libs, install libs, and make Haddock docs for packages
(not ordinary libraries, like libghccompat.a).

19 years ago[project @ 2005-02-08 10:20:50 by simonmar]
simonmar [Tue, 8 Feb 2005 10:20:50 +0000 (10:20 +0000)]
[project @ 2005-02-08 10:20:50 by simonmar]
Happy 1.15 is now required

19 years ago[project @ 2005-02-08 09:41:21 by simonpj]
simonpj [Tue, 8 Feb 2005 09:41:21 +0000 (09:41 +0000)]
[project @ 2005-02-08 09:41:21 by simonpj]
Remove trace in mkGenericRhs (merge to STABLE)

19 years ago[project @ 2005-02-07 14:05:25 by simonmar]
simonmar [Mon, 7 Feb 2005 14:05:25 +0000 (14:05 +0000)]
[project @ 2005-02-07 14:05:25 by simonmar]
Fix doc building for binary distributions

19 years ago[project @ 2005-02-07 13:51:26 by simonpj]
simonpj [Mon, 7 Feb 2005 13:51:26 +0000 (13:51 +0000)]
[project @ 2005-02-07 13:51:26 by simonpj]
Missing commit from the module A export list commit

19 years ago[project @ 2005-02-07 12:16:50 by simonpj]
simonpj [Mon, 7 Feb 2005 12:16:52 +0000 (12:16 +0000)]
[project @ 2005-02-07 12:16:50 by simonpj]
-----------------------------------------------------
Switch off derivable type class generation by default
-----------------------------------------------------

Merge to STABLE

This commit switches off the generation of the support code for 'Derivable
Type Classes' by default.  Use -fgenerics to switch it on.

Motivation: seldom used, and there's a nasty blowup in Core types for data
types that have lots of constructors or lots of fields.

We now put -fgenerics in the GhcLibOpts, so that the libraries have the
support code, as before.

19 years ago[project @ 2005-02-07 12:07:21 by simonpj]
simonpj [Mon, 7 Feb 2005 12:07:21 +0000 (12:07 +0000)]
[project @ 2005-02-07 12:07:21 by simonpj]
------------------------------
Improve unused-import warnings
------------------------------

Merge to STABLE

This commit improves the warning messages for unused imports, in the
case where the 'module A' form is used in an export list.

In doing this, I've realised that the unused-import checking is deficient
in several ways.  At least

a) it doesn't recognise that there might be several import statements
   for the same module (TcRnTypes.imp_mods has only one entry per
   module

b) it doesn't understand about qualified modules at all

c) even more fundamentally, it starts from the used Names,
   but if the module mentions (say) aliases M.f and N.f for
   the same Name, then two imports might be necessary for it

I'm not going to fix these problems now; this message just records them.

19 years ago[project @ 2005-02-07 11:13:35 by simonmar]
simonmar [Mon, 7 Feb 2005 11:13:35 +0000 (11:13 +0000)]
[project @ 2005-02-07 11:13:35 by simonmar]
Mention that GHC is required for building GHC.

19 years ago[project @ 2005-02-07 11:11:33 by simonmar]
simonmar [Mon, 7 Feb 2005 11:11:33 +0000 (11:11 +0000)]
[project @ 2005-02-07 11:11:33 by simonmar]
Point directly to the Building Guide from here.

19 years ago[project @ 2005-02-07 09:55:54 by simonpj]
simonpj [Mon, 7 Feb 2005 09:55:54 +0000 (09:55 +0000)]
[project @ 2005-02-07 09:55:54 by simonpj]
Better documentation for unboxed types; merge to STABLE

19 years ago[project @ 2005-02-04 17:36:47 by simonpj]
simonpj [Fri, 4 Feb 2005 17:36:47 +0000 (17:36 +0000)]
[project @ 2005-02-04 17:36:47 by simonpj]
Wibble to message

19 years ago[project @ 2005-02-04 17:24:01 by simonpj]
simonpj [Fri, 4 Feb 2005 17:24:09 +0000 (17:24 +0000)]
[project @ 2005-02-04 17:24:01 by simonpj]
------------------------------------------------------
Report top-level implicit parameter errors more nicely
------------------------------------------------------

Consider
    module Main where

main = let ?x = 5 in print foo

foo = woggle 3

woggle :: (?x :: Int) => Int -> Int
woggle y = ?x + y

GHC's current rules say that 'foo' is monomorphic, so we get
foo :: Int
but we also get an unbound top-level constraint (?x::Int).  GHC 6.2 emits a
message like:
     Unbound implicit parameter (?x::Int)
     arising from use of `woggle' at ...

The point is that THERE IS NO WAY FOR THIS CONSTRAINT TO GET BOUND,
because we don't have a top-level binding form for implicit parameters.
So it's stupid for 'foo' to be monomorphic.

This commit improves matters by giving a much nicer error message:

     Implicit parameters escape from the monomorphic top-level binding(s) of `foo':
       ?x::Int arising from use of `woggle' at tcfail130.hs:10:6-11
     Probably fix: add type signatures for the top-level binding(s)
     When generalising the type(s) for `foo'

19 years ago[project @ 2005-02-04 15:43:28 by simonpj]
simonpj [Fri, 4 Feb 2005 15:43:32 +0000 (15:43 +0000)]
[project @ 2005-02-04 15:43:28 by simonpj]
Respect --exclude-module in ghc -M; some tidying up as well

19 years ago[project @ 2005-02-04 15:42:54 by simonpj]
simonpj [Fri, 4 Feb 2005 15:42:54 +0000 (15:42 +0000)]
[project @ 2005-02-04 15:42:54 by simonpj]
Comments and type sig

19 years ago[project @ 2005-02-04 13:36:27 by simonmar]
simonmar [Fri, 4 Feb 2005 13:36:27 +0000 (13:36 +0000)]
[project @ 2005-02-04 13:36:27 by simonmar]
The HEAD is now 6.5

19 years ago[project @ 2005-02-04 13:32:28 by simonmar]
simonmar [Fri, 4 Feb 2005 13:32:28 +0000 (13:32 +0000)]
[project @ 2005-02-04 13:32:28 by simonmar]
In the fragments of Haskell code which setup buffering and flushing
for the std Handles in GHCi, qualify names with System.IO rather than IO.

19 years ago[project @ 2005-02-04 11:58:23 by simonmar]
simonmar [Fri, 4 Feb 2005 11:58:23 +0000 (11:58 +0000)]
[project @ 2005-02-04 11:58:23 by simonmar]
Need to add -I. when compiling with GHC 6.3+

19 years ago[project @ 2005-02-03 13:11:44 by simonpj]
simonpj [Thu, 3 Feb 2005 13:11:44 +0000 (13:11 +0000)]
[project @ 2005-02-03 13:11:44 by simonpj]
Fix another substitution-related bug in CoreLint

19 years ago[project @ 2005-02-03 11:21:03 by simonmar]
simonmar [Thu, 3 Feb 2005 11:21:03 +0000 (11:21 +0000)]
[project @ 2005-02-03 11:21:03 by simonmar]
Move the in_haskell check to somewhere that works for the threaded RTS too.

19 years ago[project @ 2005-02-03 10:59:05 by simonmar]
simonmar [Thu, 3 Feb 2005 10:59:05 +0000 (10:59 +0000)]
[project @ 2005-02-03 10:59:05 by simonmar]
add a prototype

19 years ago[project @ 2005-02-03 10:57:06 by simonmar]
simonmar [Thu, 3 Feb 2005 10:57:08 +0000 (10:57 +0000)]
[project @ 2005-02-03 10:57:06 by simonmar]
Make setProgArgv() set the RTS's idea of the prog name too.

19 years ago[project @ 2005-02-02 13:41:08 by simonpj]
simonpj [Wed, 2 Feb 2005 13:41:08 +0000 (13:41 +0000)]
[project @ 2005-02-02 13:41:08 by simonpj]
Document dependency printing

19 years ago[project @ 2005-02-02 13:40:34 by simonpj]
simonpj [Wed, 2 Feb 2005 13:40:34 +0000 (13:40 +0000)]
[project @ 2005-02-02 13:40:34 by simonpj]
Dump package config only with -v4
Dump module dependencies (ghc -M) with -v2

19 years ago[project @ 2005-02-02 13:28:29 by simonpj]
simonpj [Wed, 2 Feb 2005 13:28:29 +0000 (13:28 +0000)]
[project @ 2005-02-02 13:28:29 by simonpj]
Tidy output

19 years ago[project @ 2005-02-02 13:28:05 by simonpj]
simonpj [Wed, 2 Feb 2005 13:28:05 +0000 (13:28 +0000)]
[project @ 2005-02-02 13:28:05 by simonpj]
Make sure that the argument of DataToTag is evaluated; rather a horrible piece of code, I fear

19 years ago[project @ 2005-02-02 13:27:07 by simonpj]
simonpj [Wed, 2 Feb 2005 13:27:07 +0000 (13:27 +0000)]
[project @ 2005-02-02 13:27:07 by simonpj]
Import trimming

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