ghc-hetmet.git
18 years ago[project @ 2005-07-21 09:56:26 by simonmar]
simonmar [Thu, 21 Jul 2005 09:56:26 +0000 (09:56 +0000)]
[project @ 2005-07-21 09:56:26 by simonmar]
Update notes on Perl

18 years ago[project @ 2005-07-21 09:27:34 by simonmar]
simonmar [Thu, 21 Jul 2005 09:27:34 +0000 (09:27 +0000)]
[project @ 2005-07-21 09:27:34 by simonmar]
Require Perl >= 5.6

18 years ago[project @ 2005-07-21 08:41:23 by panne]
panne [Thu, 21 Jul 2005 08:41:23 +0000 (08:41 +0000)]
[project @ 2005-07-21 08:41:23 by panne]
compMan is dead, Jim...

18 years ago[project @ 2005-07-19 22:55:10 by simonpj]
simonpj [Tue, 19 Jul 2005 22:55:10 +0000 (22:55 +0000)]
[project @ 2005-07-19 22:55:10 by simonpj]
remove RnSource.lhs-boot and add RnExpr.lhs-boot

18 years ago[project @ 2005-07-19 22:53:37 by simonpj]
simonpj [Tue, 19 Jul 2005 22:53:37 +0000 (22:53 +0000)]
[project @ 2005-07-19 22:53:37 by simonpj]
Wibble

18 years ago[project @ 2005-07-19 16:44:50 by simonpj]
simonpj [Tue, 19 Jul 2005 16:45:02 +0000 (16:45 +0000)]
[project @ 2005-07-19 16:44:50 by simonpj]
WARNING: this is a big commit.  You might want
to wait a few days before updating, in case I've
broken something.

However, if any of the changes are what you wanted,
please check it out and test!

This commit does three main things:

1. A re-organisation of the way that GHC handles bindings in HsSyn.
   This has been a bit of a mess for quite a while.  The key new
   types are

-- Bindings for a let or where clause
data HsLocalBinds id
  = HsValBinds (HsValBinds id)
  | HsIPBinds  (HsIPBinds id)
  | EmptyLocalBinds

-- Value bindings (not implicit parameters)
data HsValBinds id
  = ValBindsIn  -- Before typechecking
(LHsBinds id) [LSig id] -- Not dependency analysed
-- Recursive by default

  | ValBindsOut -- After typechecking
[(RecFlag, LHsBinds id)]-- Dependency analysed

2. Implement Mark Jones's idea of increasing polymoprhism
   by using type signatures to cut the strongly-connected components
   of a recursive group.  As a consequence, GHC no longer insists
   on the contexts of the type signatures of a recursive group
   being identical.

   This drove a significant change: the renamer no longer does dependency
   analysis.  Instead, it attaches a free-variable set to each binding,
   so that the type checker can do the dep anal.  Reason: the typechecker
   needs to do *two* analyses:
one to find the true mutually-recursive groups
(which we need so we can build the right CoreSyn)
one to find the groups in which to typecheck, taking
account of type signatures

3. Implement non-ground SPECIALISE pragmas, as promised, and as
   requested by Remi and Ross.  Certainly, this should fix the
   current problem with GHC, namely that if you have
g :: Eq a => a -> b -> b
   then you can now specialise thus
SPECIALISE g :: Int -> b -> b
    (This didn't use to work.)

   However, it goes further than that.  For example:
f :: (Eq a, Ix b) => a -> b -> b
   then you can make a partial specialisation
SPECIALISE f :: (Eq a) => a -> Int -> Int

    In principle, you can specialise f to *any* type that is
    "less polymorphic" (in the sense of subsumption) than f's
    actual type.  Such as
SPECIALISE f :: Eq a => [a] -> Int -> Int
    But I haven't tested that.

    I implemented this by doing the specialisation in the typechecker
    and desugarer, rather than leaving around the strange SpecPragmaIds,
    for the specialiser to find.  Indeed, SpecPragmaIds have vanished
    altogether (hooray).

    Pragmas in general are handled more tidily.  There's a new
    data type HsBinds.Prag, which lives in an AbsBinds, and carries
    pragma info from the typechecker to the desugarer.

Smaller things

- The loop in the renamer goes via RnExpr, instead of RnSource.
  (That makes it more like the type checker.)

- I fixed the thing that was causing 'check_tc' warnings to be
  emitted.

18 years ago[project @ 2005-07-18 11:47:08 by simonpj]
simonpj [Mon, 18 Jul 2005 11:47:08 +0000 (11:47 +0000)]
[project @ 2005-07-18 11:47:08 by simonpj]
Fix TH_reifyType2 test

18 years ago[project @ 2005-07-18 11:46:32 by simonpj]
simonpj [Mon, 18 Jul 2005 11:46:32 +0000 (11:46 +0000)]
[project @ 2005-07-18 11:46:32 by simonpj]
Comments

18 years ago[project @ 2005-07-15 02:00:15 by wolfgang]
wolfgang [Fri, 15 Jul 2005 02:00:15 +0000 (02:00 +0000)]
[project @ 2005-07-15 02:00:15 by wolfgang]
Mac OS X/PowerPC: Make GHCi deal with the additional statically linked
symbols from libSystemStub.a on Tiger (printf$LDBLStub and friends).

MERGE TO STABLE

18 years ago[project @ 2005-07-14 15:14:33 by simonmar]
simonmar [Thu, 14 Jul 2005 15:14:33 +0000 (15:14 +0000)]
[project @ 2005-07-14 15:14:33 by simonmar]
- -package P picks the latest version of P, instead of complaining
    if P is ambiguous.

  - -hide-package P hides all versions of P, instead of complaining
    if P is ambiguous.

18 years ago[project @ 2005-07-14 15:12:20 by simonmar]
simonmar [Thu, 14 Jul 2005 15:12:20 +0000 (15:12 +0000)]
[project @ 2005-07-14 15:12:20 by simonmar]
- -package P hides all other versions of P (this was advertised
    in the documentation, but wasn't actually implemented in 6.4)

  - if multiple packages with the same name are still exposed after
    the flags have been processed, then all except the latest version
    are hidden.

18 years ago[project @ 2005-07-14 10:38:03 by simonmar]
simonmar [Thu, 14 Jul 2005 10:38:03 +0000 (10:38 +0000)]
[project @ 2005-07-14 10:38:03 by simonmar]
Fix mulMayOflo() on 64-bit archs.  This fixes the arith003 failures on x86_64.

18 years ago[project @ 2005-07-13 13:08:05 by simonmar]
simonmar [Wed, 13 Jul 2005 13:08:05 +0000 (13:08 +0000)]
[project @ 2005-07-13 13:08:05 by simonmar]
#include <windows.h>

18 years ago[project @ 2005-07-13 12:27:55 by simonmar]
simonmar [Wed, 13 Jul 2005 12:27:55 +0000 (12:27 +0000)]
[project @ 2005-07-13 12:27:55 by simonmar]
Handle TREC_CHUNK in update_fwd_large

18 years ago[project @ 2005-07-13 10:16:11 by simonpj]
simonpj [Wed, 13 Jul 2005 10:16:11 +0000 (10:16 +0000)]
[project @ 2005-07-13 10:16:11 by simonpj]
MERGE to STABLE

Switch the order of equations generated by FunDeps.improve,
so that the error messages are more perspicuous.

This fixes SourceForge [ ghc-Bugs-1234239 ]
  "Bad location for violation of functional dependency"

tcfail143 tests.

18 years ago[project @ 2005-07-12 17:07:56 by panne]
panne [Tue, 12 Jul 2005 17:07:56 +0000 (17:07 +0000)]
[project @ 2005-07-12 17:07:56 by panne]
Add casts to silence warnings when using Solaris' simple-minded isupper() macro.

18 years ago[project @ 2005-07-12 16:30:01 by simonpj]
simonpj [Tue, 12 Jul 2005 16:30:01 +0000 (16:30 +0000)]
[project @ 2005-07-12 16:30:01 by simonpj]
Try MERGE to STABLE

When TH splices in code, it was previously decorated with noLoc.  If
there were any type errors in it, we got a very unhelpful message.

Now we propagate the splice location everywhere into the spliced code.
The location isn't very exact, because it refers to the splice site,
but it's better than before.

18 years ago[project @ 2005-07-12 14:50:56 by simonpj]
simonpj [Tue, 12 Jul 2005 14:50:56 +0000 (14:50 +0000)]
[project @ 2005-07-12 14:50:56 by simonpj]
Add an extra note about defaulting in GHCi

18 years ago[project @ 2005-07-12 14:50:10 by simonpj]
simonpj [Tue, 12 Jul 2005 14:50:10 +0000 (14:50 +0000)]
[project @ 2005-07-12 14:50:10 by simonpj]
An earlier commit, liberalising the defaulting rules for ghci,
messed up the handling of defaulting at the top level.  This
commit fixes it.

The current story is that if there's an ambiguous top-level
multi-parameter constraint (C a b), then a,b won't be defaulted,
regardless of how a,b are used otherwise.  A type variable is
defaulted only if it's constrained by single-parameter type classes,
even in the more-liberal GHCi.

tcfail142 tests this case.

18 years ago[project @ 2005-07-12 14:41:00 by simonmar]
simonmar [Tue, 12 Jul 2005 14:41:00 +0000 (14:41 +0000)]
[project @ 2005-07-12 14:41:00 by simonmar]
Give a more helpful error message on platforms for which FFI support
isn't implemented in GHCi (namely x86_64 at the moment).

18 years ago[project @ 2005-07-12 14:34:29 by simonmar]
simonmar [Tue, 12 Jul 2005 14:34:29 +0000 (14:34 +0000)]
[project @ 2005-07-12 14:34:29 by simonmar]
Fix cut-n-pasto in previous commit

18 years ago[project @ 2005-07-12 14:23:51 by simonmar]
simonmar [Tue, 12 Jul 2005 14:23:51 +0000 (14:23 +0000)]
[project @ 2005-07-12 14:23:51 by simonmar]
Disable a couple of assertions for the same reason as the previous commit.

18 years ago[project @ 2005-07-12 13:38:08 by simonpj]
simonpj [Tue, 12 Jul 2005 13:38:08 +0000 (13:38 +0000)]
[project @ 2005-07-12 13:38:08 by simonpj]
Check for an unboxed tuple binding
f = (# True, False #)

A fairly recent change, that treats specially non-recursive bindings of a
single variable, failed to take this into account.

tcfail141 tests this case.  (Was simpl008.)
-

18 years ago[project @ 2005-07-12 13:36:49 by simonpj]
simonpj [Tue, 12 Jul 2005 13:36:49 +0000 (13:36 +0000)]
[project @ 2005-07-12 13:36:49 by simonpj]
Comment only

18 years ago[project @ 2005-07-12 13:34:03 by simonmar]
simonmar [Tue, 12 Jul 2005 13:34:03 +0000 (13:34 +0000)]
[project @ 2005-07-12 13:34:03 by simonmar]
schedulDoGC: when traversing the all_threads list checking for invalid
transactions we were bogusly following the link field rather than the
global_link field.

18 years ago[project @ 2005-07-12 13:01:44 by simonmar]
simonmar [Tue, 12 Jul 2005 13:01:44 +0000 (13:01 +0000)]
[project @ 2005-07-12 13:01:44 by simonmar]
handle PrimTyCons in pprTyConHdr (fixes :i GHC.Base.Int# in GHCi)

18 years ago[project @ 2005-07-12 12:56:36 by simonmar]
simonmar [Tue, 12 Jul 2005 12:56:36 +0000 (12:56 +0000)]
[project @ 2005-07-12 12:56:36 by simonmar]
export some more bits

18 years ago[project @ 2005-07-12 12:20:58 by simonmar]
simonmar [Tue, 12 Jul 2005 12:20:58 +0000 (12:20 +0000)]
[project @ 2005-07-12 12:20:58 by simonmar]
More 64-fixing

18 years ago[project @ 2005-07-12 12:09:44 by simonmar]
simonmar [Tue, 12 Jul 2005 12:09:44 +0000 (12:09 +0000)]
[project @ 2005-07-12 12:09:44 by simonmar]
64 bit fix

18 years ago[project @ 2005-07-12 11:55:17 by simonmar]
simonmar [Tue, 12 Jul 2005 11:55:17 +0000 (11:55 +0000)]
[project @ 2005-07-12 11:55:17 by simonmar]
Use stgMallocBytesRWX for allocating info tables, since the memory
needs to be executable (not sure how this is working on OpenBSD right
now, but it definitely breaks on x86_64/Linux).

18 years ago[project @ 2005-07-12 11:51:31 by simonmar]
simonmar [Tue, 12 Jul 2005 11:51:31 +0000 (11:51 +0000)]
[project @ 2005-07-12 11:51:31 by simonmar]
Move mallocBytesRWX into RtsUtils, rename it to stgMallocBytesRWX, and
export it.

18 years ago[project @ 2005-07-12 11:38:44 by simonmar]
simonmar [Tue, 12 Jul 2005 11:38:44 +0000 (11:38 +0000)]
[project @ 2005-07-12 11:38:44 by simonmar]
Add some comments on why we don't use posix_memalign() right now.

18 years ago[project @ 2005-07-12 09:42:59 by simonmar]
simonmar [Tue, 12 Jul 2005 09:42:59 +0000 (09:42 +0000)]
[project @ 2005-07-12 09:42:59 by simonmar]
declare stg_returnToSchedNotPaused (forgot to commit this yesterday)

18 years ago[project @ 2005-07-11 20:33:45 by panne]
panne [Mon, 11 Jul 2005 20:33:45 +0000 (20:33 +0000)]
[project @ 2005-07-11 20:33:45 by panne]
After some experiments, it seems like we're stealing too many registers from
newer GCCs on SPARC, leading to

   "unable to find a register to spill in class `GENERAL_REGS'"

errors. The fix is to leave l6 and l7 to GCC. Tested with a full 2-stage
bootstrap (including OpenGL/GLUT packages) on SPARC Solaris 8 with GCC 3.4.4.

A test case for this (which I'm too lazy/tired to commit) is:

   module Blah ( foo ) where
   import Foreign.Ptr ( FunPtr )
   type Bar = Int -> Double -> Double -> Double -> IO ()
   foreign import ccall unsafe "dynamic" foo :: FunPtr Bar -> Bar

SimonM: MERGE TO STABLE (if nobody yells)

18 years ago[project @ 2005-07-11 15:57:38 by simonmar]
simonmar [Mon, 11 Jul 2005 15:57:39 +0000 (15:57 +0000)]
[project @ 2005-07-11 15:57:38 by simonmar]
Avoid calling threadPaused() on exit from STG land if we're just
switching to the interpreter, and conversely call threadPaused() in
the interpreter if we're returing to the scheduler for anything other
than switching to STG.

This will probably fix the recent slowdown in GHCi (ioref001 test, for
example).  It was broken when we moved the threadPaused() call into
STG from the scheduler, so it only affects the HEAD.

18 years ago[project @ 2005-07-11 15:34:07 by simonmar]
simonmar [Mon, 11 Jul 2005 15:34:07 +0000 (15:34 +0000)]
[project @ 2005-07-11 15:34:07 by simonmar]
make_constr_itbls: 64-bit fix (size of info table was hardcoded)

18 years ago[project @ 2005-07-11 14:21:54 by simonmar]
simonmar [Mon, 11 Jul 2005 14:21:54 +0000 (14:21 +0000)]
[project @ 2005-07-11 14:21:54 by simonmar]
byte code info tables for x86_64 (same as i386)

18 years ago[project @ 2005-07-11 14:08:07 by simonmar]
simonmar [Mon, 11 Jul 2005 14:08:07 +0000 (14:08 +0000)]
[project @ 2005-07-11 14:08:07 by simonmar]
Turn on GHCi for x86_64

18 years ago[project @ 2005-07-11 13:53:24 by simonmar]
simonmar [Mon, 11 Jul 2005 13:53:24 +0000 (13:53 +0000)]
[project @ 2005-07-11 13:53:24 by simonmar]
GHCi staggers to its feet on x86_64.

The problem is that in the small code model on x86_64, all symbol
relocations are 32-bit, because the program is assumed to fit into
2Gb.  However, shared libraries are linked outside the 2Gb range, and
the linker arranges that references to shared library symbols either
go via a jump table (for code references) or are copied into the 2Gb
area (for data references).

In GHCi's linker, We can use a jump table for the function symbols,
but we can't copy the data symbols because they've already been
relocated to point to the shared library.  What's more, we can't tell
whether a symbol reference is to code or data - this information is
only available from the shared library itself.

Fortunately, at least HSbase.o doesn't have any data references to
shared libraries (at least on the Linux distro I'm using), so I can at
least get GHCi up and limping.

18 years ago[project @ 2005-07-11 12:29:28 by simonmar]
simonmar [Mon, 11 Jul 2005 12:29:28 +0000 (12:29 +0000)]
[project @ 2005-07-11 12:29:28 by simonmar]
awakenBlockedQueue(): check for NULL.  This is a hack to workaround a
bug that occurs when async exceptions, unsafePerformIO, and
interruptible operations are used together.  See the comment in
Exceptions.cmm and bug #1235728 for more details.

18 years ago[project @ 2005-07-11 10:47:20 by simonpj]
simonpj [Mon, 11 Jul 2005 10:47:21 +0000 (10:47 +0000)]
[project @ 2005-07-11 10:47:20 by simonpj]
Wibbles to unifyFunTy error messages

18 years ago[project @ 2005-07-11 10:46:42 by simonpj]
simonpj [Mon, 11 Jul 2005 10:46:43 +0000 (10:46 +0000)]
[project @ 2005-07-11 10:46:42 by simonpj]
Improvements to speakN, define speakNOf, move plural from TcSimplify

18 years ago[project @ 2005-07-11 10:25:43 by simonmar]
simonmar [Mon, 11 Jul 2005 10:25:43 +0000 (10:25 +0000)]
[project @ 2005-07-11 10:25:43 by simonmar]
mingw32: ignore isDoesNotExistError failure from
GHC.ConsoleHandler.flushConsole

Submitted-by: Brian Smith <brianlsmith at gmail.com>

18 years ago[project @ 2005-07-11 09:54:43 by simonpj]
simonpj [Mon, 11 Jul 2005 09:54:44 +0000 (09:54 +0000)]
[project @ 2005-07-11 09:54:43 by simonpj]
Improve the error message from unifyFunTys.  Previously we got a really
horrible message from this:
  t = ((\Just x -> x) :: Maybe a -> a) (Just 1)

Try.hs:1:6:
    Couldn't match the rigid variable `a' against `t -> t1'
      Expected type: a
      Inferred type: t -> t1

Now it's much better:

Try.hs:14:6:
    The lambda expression `\ Just x -> ...' has two arguments,
    but its type `Maybe a -> a' has only one
    In the expression: (\ Just x -> x) :: Maybe a -> a

tcfail140 tests some cases

18 years ago[project @ 2005-07-11 09:48:57 by simonpj]
simonpj [Mon, 11 Jul 2005 09:48:57 +0000 (09:48 +0000)]
[project @ 2005-07-11 09:48:57 by simonpj]
Fix a bug in the renamer for parallel list comprehensions
MERGE TO STABLE

It's surprinsingly tricky to combine
  a) The parallel scopes for par-list-comps
with
  b) The general form of the renamer types, whereby
     scoped constructs work like
 rnPat :: Pat -> RnM (thing,FreeVars)
       -> RnM ((Pat,thing), FreeVars)
     This general shape neatly allows rnPat to
     extend the envt, report unused variables from
     the 'thing' inside, and return the correct set
     of free variables

But combining (a) and (b) is tricky, and was plain wrong before.

18 years ago[project @ 2005-07-11 09:48:19 by simonpj]
simonpj [Mon, 11 Jul 2005 09:48:19 +0000 (09:48 +0000)]
[project @ 2005-07-11 09:48:19 by simonpj]
Add speakN, and the ability to set printing depth

18 years ago[project @ 2005-07-11 09:17:41 by simonmar]
simonmar [Mon, 11 Jul 2005 09:17:41 +0000 (09:17 +0000)]
[project @ 2005-07-11 09:17:41 by simonmar]
enable splitting on x86_64

18 years ago[project @ 2005-07-11 09:10:58 by simonmar]
simonmar [Mon, 11 Jul 2005 09:10:58 +0000 (09:10 +0000)]
[project @ 2005-07-11 09:10:58 by simonmar]
x86_64: Pass -fno-asynchronous-unwind-tables to gcc, which eliminates
some unnecessary junk from the via-C generated code and allows
-split-objs to work.

18 years ago[project @ 2005-07-09 14:44:06 by panne]
panne [Sat, 9 Jul 2005 14:44:06 +0000 (14:44 +0000)]
[project @ 2005-07-09 14:44:06 by panne]
Fixed & simplified previous commit.

18 years ago[project @ 2005-07-09 14:35:51 by panne]
panne [Sat, 9 Jul 2005 14:35:51 +0000 (14:35 +0000)]
[project @ 2005-07-09 14:35:51 by panne]
Silence the error message when ld doesn't understand the -x option.

18 years ago[project @ 2005-07-09 14:33:01 by panne]
panne [Sat, 9 Jul 2005 14:33:01 +0000 (14:33 +0000)]
[project @ 2005-07-09 14:33:01 by panne]
Solaris' sed obviously doesn't like nested \(\), so do the gcc version
detection magic in two steps instead of one.

18 years ago[project @ 2005-07-09 00:13:14 by igloo]
igloo [Sat, 9 Jul 2005 00:13:14 +0000 (00:13 +0000)]
[project @ 2005-07-09 00:13:14 by igloo]
Fix building on IA64.

Please merge to stable.

18 years ago[project @ 2005-07-08 19:49:24 by simonpj]
simonpj [Fri, 8 Jul 2005 19:49:24 +0000 (19:49 +0000)]
[project @ 2005-07-08 19:49:24 by simonpj]
Revert accidental commit (merge to stable if bogus commit was merged)

18 years ago[project @ 2005-07-08 16:16:37 by simonpj]
simonpj [Fri, 8 Jul 2005 16:16:37 +0000 (16:16 +0000)]
[project @ 2005-07-08 16:16:37 by simonpj]
MERGE TO STABLE (once I"ve checked it works)

The dictionary-floating code in Specialise wasn't taking
variables free in the RULES into account, which resulted in
such variables perhaps going out of scope.

18 years ago[project @ 2005-07-08 15:05:15 by simonpj]
simonpj [Fri, 8 Jul 2005 15:05:16 +0000 (15:05 +0000)]
[project @ 2005-07-08 15:05:15 by simonpj]
MERGE TO STABLE

Add a check for Haskell-98 mode, to check that there is no type
synonym in an instance declaration.

tcfail139 tests this case

18 years ago[project @ 2005-07-08 13:57:50 by simonmar]
simonmar [Fri, 8 Jul 2005 13:57:50 +0000 (13:57 +0000)]
[project @ 2005-07-08 13:57:50 by simonmar]
genOutputFilenameFunc: fix output filename generated for non-Haskell
compilations with -odir.

18 years ago[project @ 2005-07-08 11:16:00 by simonmar]
simonmar [Fri, 8 Jul 2005 11:16:00 +0000 (11:16 +0000)]
[project @ 2005-07-08 11:16:00 by simonmar]
Clean .hi-boot and .o-boot files too

18 years ago[project @ 2005-07-07 13:50:40 by simonmar]
simonmar [Thu, 7 Jul 2005 13:50:40 +0000 (13:50 +0000)]
[project @ 2005-07-07 13:50:40 by simonmar]
small performance fix: in via-C mode we previously always created a
switch instead of an conditional-tree for a multi-branch case.  Refine
this slightly so that 2-branch switches turn into conditionals again,
since gcc doesn't do a good job of optimising the equivalent switch.

18 years ago[project @ 2005-07-06 11:31:53 by panne]
panne [Wed, 6 Jul 2005 11:31:53 +0000 (11:31 +0000)]
[project @ 2005-07-06 11:31:53 by panne]
DocBook validation police

18 years ago[project @ 2005-07-06 10:43:36 by simonmar]
simonmar [Wed, 6 Jul 2005 10:43:36 +0000 (10:43 +0000)]
[project @ 2005-07-06 10:43:36 by simonmar]
ghc -e should exit(1) if the statement fails to compile.

Fixes #1233146 (this was already partially fixed, in that ghc -e would
exit(1) if the modules fail to compile, but if the expression itself
was invalid it would still exit(0)).

18 years ago[project @ 2005-07-05 04:55:30 by dons]
dons [Tue, 5 Jul 2005 04:55:30 +0000 (04:55 +0000)]
[project @ 2005-07-05 04:55:30 by dons]
Fix ffi on OpenBSD by dynamically allocating the obscure_ccall_ret_code.
Also merge in SimonM's wrapper over inline asm patch.

18 years ago[project @ 2005-07-01 09:41:24 by simonmar]
simonmar [Fri, 1 Jul 2005 09:41:24 +0000 (09:41 +0000)]
[project @ 2005-07-01 09:41:24 by simonmar]
setContextAfterLoad: include the Prelude if the top module is compiled
(this broke at some point in the HEAD, 6.4 works fine).

18 years ago[project @ 2005-06-29 16:04:04 by simonpj]
simonpj [Wed, 29 Jun 2005 16:04:04 +0000 (16:04 +0000)]
[project @ 2005-06-29 16:04:04 by simonpj]
Vital wibble to last commit!

18 years ago[project @ 2005-06-29 15:41:27 by simonpj]
simonpj [Wed, 29 Jun 2005 15:41:27 +0000 (15:41 +0000)]
[project @ 2005-06-29 15:41:27 by simonpj]
MERGE TO STABLE

Fix a long-lurking renamer bug, concerning the reporting of ambiguous
name occurrences.

(the merge may require a little fiddling)

18 years ago[project @ 2005-06-29 08:47:21 by simonmar]
simonmar [Wed, 29 Jun 2005 08:47:21 +0000 (08:47 +0000)]
[project @ 2005-06-29 08:47:21 by simonmar]
Make it compile on Alpha.

18 years ago[project @ 2005-06-28 13:44:28 by simonmar]
simonmar [Tue, 28 Jun 2005 13:44:28 +0000 (13:44 +0000)]
[project @ 2005-06-28 13:44:28 by simonmar]
Add a comment that grabbing all the capabilities before GC causes the
thread->capability hash table to acquire multiple entries for the
current thread, which seems to be harmless.

18 years ago[project @ 2005-06-28 13:43:41 by simonmar]
simonmar [Tue, 28 Jun 2005 13:43:41 +0000 (13:43 +0000)]
[project @ 2005-06-28 13:43:41 by simonmar]
Disable the assertion that checks for multiple entries with the same
key in the hash table.  It's useful to be able to do this sometimes.

18 years ago[project @ 2005-06-27 12:59:52 by simonpj]
simonpj [Mon, 27 Jun 2005 12:59:52 +0000 (12:59 +0000)]
[project @ 2005-06-27 12:59:52 by simonpj]
MERGE TO STABLE

Fix a typechecker bug, which made the typechecker loop under certain
circumstances, notably when we have
type Foo a = a
and try to unify
b :=: Foo b

typecheck/should_compile/tc195 tests this case now.

18 years ago[project @ 2005-06-27 09:17:35 by simonmar]
simonmar [Mon, 27 Jun 2005 09:17:35 +0000 (09:17 +0000)]
[project @ 2005-06-27 09:17:35 by simonmar]
Update docs for :ctags, :etags.

18 years ago[project @ 2005-06-27 08:54:51 by simonmar]
simonmar [Mon, 27 Jun 2005 08:54:51 +0000 (08:54 +0000)]
[project @ 2005-06-27 08:54:51 by simonmar]
help text wibble

18 years ago[project @ 2005-06-27 08:53:03 by simonmar]
simonmar [Mon, 27 Jun 2005 08:53:03 +0000 (08:53 +0000)]
[project @ 2005-06-27 08:53:03 by simonmar]
Rename :tags to :etags and :ctags.  The problem was that :tags
prevented the common abbreviation of :type, namely :t.

Also, :etags and :ctags match the *nix commands of the same name, and
this way makes it easier for them to take an optional filename
argument (which they now do).

18 years ago[project @ 2005-06-23 09:17:30 by simonmar]
simonmar [Thu, 23 Jun 2005 09:17:30 +0000 (09:17 +0000)]
[project @ 2005-06-23 09:17:30 by simonmar]
Add a 'U' suffix to all integer literals to make them explicitly
unsigned.  This avoids some warnings from gcc, but I don't think it
fixes any actual bugs (I could be wrong, though).

18 years ago[project @ 2005-06-22 08:25:38 by simonmar]
simonmar [Wed, 22 Jun 2005 08:25:38 +0000 (08:25 +0000)]
[project @ 2005-06-22 08:25:38 by simonmar]
pkgIdMap should include adjustments made by -package flags (it used
to; I broke this yesterday).  Also add origPkgIdMap for keeping the
original package database - this might be needed in the future.

18 years ago[project @ 2005-06-22 08:24:22 by simonmar]
simonmar [Wed, 22 Jun 2005 08:24:22 +0000 (08:24 +0000)]
[project @ 2005-06-22 08:24:22 by simonmar]
Check the result of GHC.depanal for errors.

18 years ago[project @ 2005-06-21 15:11:38 by ross]
ross [Tue, 21 Jun 2005 15:11:40 +0000 (15:11 +0000)]
[project @ 2005-06-21 15:11:38 by ross]
split Distribution.Extension between Language.Haskell.Extension (just
the type, which will also be useful when haskell-src-exts is merged)
and Distribution.Compiler (mappings to compiler options).

18 years ago[project @ 2005-06-21 12:03:25 by simonmar]
simonmar [Tue, 21 Jun 2005 12:03:25 +0000 (12:03 +0000)]
[project @ 2005-06-21 12:03:25 by simonmar]
Document changes to the package system.

A nice side effect of the relaxed restrictions is that the
-ignore-package flag is no longer required when compiling a package
(unless the package is "base", and even in that case we might be able
to get away with -hide-package base).  For now, I've removed
references that talk about using -ignore-package when compiling a
package, and simplified the documentation for -ignore-package.

18 years ago[project @ 2005-06-21 11:57:00 by simonmar]
simonmar [Tue, 21 Jun 2005 11:57:00 +0000 (11:57 +0000)]
[project @ 2005-06-21 11:57:00 by simonmar]
fix Windows build

18 years ago[project @ 2005-06-21 10:44:37 by simonmar]
simonmar [Tue, 21 Jun 2005 10:44:42 +0000 (10:44 +0000)]
[project @ 2005-06-21 10:44:37 by simonmar]
Relax the restrictions on conflicting packages.  This should address
many of the traps that people have been falling into with the current
package story.

Now, a local module can shadow a module in an exposed package, as long
as the package is not otherwise required by the program.  GHC checks
for conflicts when it knows the dependencies of the module being
compiled.

Also, we now check for module conflicts in exposed packages only when
importing a module: if an import can be satisfied from multiple
packages, that's an error.  It's not possible to prevent GHC from
starting by installing packages now (unless you install another base
package).

It seems to be possible to confuse GHCi by having a local module
shadowing a package module that goes away and comes back again.  I
think it's nearly right, but strange happenings have been observed.

I'll try to merge this into the STABLE branch.

18 years ago[project @ 2005-06-21 10:30:41 by simonmar]
simonmar [Tue, 21 Jun 2005 10:30:41 +0000 (10:30 +0000)]
[project @ 2005-06-21 10:30:41 by simonmar]
we should be using PprTyThingInContext instead of PprTyThing here

18 years ago[project @ 2005-06-19 08:41:40 by krasimir]
krasimir [Sun, 19 Jun 2005 08:41:40 +0000 (08:41 +0000)]
[project @ 2005-06-19 08:41:40 by krasimir]
Add pprTyThingHdr function.

18 years ago[project @ 2005-06-19 08:40:50 by krasimir]
krasimir [Sun, 19 Jun 2005 08:40:50 +0000 (08:40 +0000)]
[project @ 2005-06-19 08:40:50 by krasimir]
Add PprTyThing to modules list

18 years ago[project @ 2005-06-19 03:08:23 by chak]
chak [Sun, 19 Jun 2005 03:08:23 +0000 (03:08 +0000)]
[project @ 2005-06-19 03:08:23 by chak]
Small improvement to the text

18 years ago[project @ 2005-06-16 09:51:45 by simonmar]
simonmar [Thu, 16 Jun 2005 09:51:45 +0000 (09:51 +0000)]
[project @ 2005-06-16 09:51:45 by simonmar]
oops, bring runghc in on the shared-compat.mk game

18 years ago[project @ 2005-06-16 09:45:28 by simonmar]
simonmar [Thu, 16 Jun 2005 09:45:29 +0000 (09:45 +0000)]
[project @ 2005-06-16 09:45:28 by simonmar]
Move the boilerplate Makefile code for using libghccompat.a into a
shared .mk file, lib/compat/compat.mk.  libghccompat.a is really a
poor-mans package, but to make it a real package would mean dealing
with variationg in the package support of different GHC versions, so
this is easier for now.

18 years ago[project @ 2005-06-16 09:40:27 by simonmar]
simonmar [Thu, 16 Jun 2005 09:40:27 +0000 (09:40 +0000)]
[project @ 2005-06-16 09:40:27 by simonmar]
Use -optdep--exclude-module to fix building HEAD with itself.

18 years ago[project @ 2005-06-16 09:36:15 by simonmar]
simonmar [Thu, 16 Jun 2005 09:36:15 +0000 (09:36 +0000)]
[project @ 2005-06-16 09:36:15 by simonmar]
Fix -optdep--exclude-module (looks like this has been broken for a while)

18 years ago[project @ 2005-06-16 09:33:41 by simonmar]
simonmar [Thu, 16 Jun 2005 09:33:41 +0000 (09:33 +0000)]
[project @ 2005-06-16 09:33:41 by simonmar]
Fix stage1 compilation

18 years ago[project @ 2005-06-16 01:17:09 by ross]
ross [Thu, 16 Jun 2005 01:17:11 +0000 (01:17 +0000)]
[project @ 2005-06-16 01:17:09 by ross]
refactoring only: split Compiler type from Distribution.Setup,
to reduce dependencies.

18 years ago[project @ 2005-06-15 13:50:14 by simonmar]
simonmar [Wed, 15 Jun 2005 13:50:14 +0000 (13:50 +0000)]
[project @ 2005-06-15 13:50:14 by simonmar]
Undo accidental commit

18 years ago[project @ 2005-06-15 12:03:19 by simonmar]
simonmar [Wed, 15 Jun 2005 12:03:46 +0000 (12:03 +0000)]
[project @ 2005-06-15 12:03:19 by simonmar]
Re-implement GHCi's :info and :browse commands in terms of TyThings
rather than IfaceSyn.

The GHC API now exposes its internal types for Haskell entities:
TyCons, Classes, DataCons, Ids and Instances (collectively known as
TyThings), so we can inspect these directly to pretty-print
information about an entity.  Previously the internal representations
were converted to IfaceSyn for passing to InteractiveUI, but we can
now remove that code.

Some of the new code comes via Visual Haskell, but I've changed it
around a lot to fix various dark corners and properly print things
like GADTs.

The pretty-printing interfaces for TyThings are exposed by a new
module PprTyThing, which is implemented purely in terms of the GHC API
(and is probably a good source of sample code).  Visual Haskell should
be able to use the functions exported by this module directly.

Lots of new goodies are exported by the GHC module, mainly for
inspecting TyThings.

18 years ago[project @ 2005-06-14 10:02:11 by tharris]
tharris [Tue, 14 Jun 2005 10:02:11 +0000 (10:02 +0000)]
[project @ 2005-06-14 10:02:11 by tharris]
Assert on nested atomic blocks

18 years ago[project @ 2005-06-13 14:36:01 by simonmar]
simonmar [Mon, 13 Jun 2005 14:36:01 +0000 (14:36 +0000)]
[project @ 2005-06-13 14:36:01 by simonmar]
- Fix up documentation for about new automatic printing semantics
- Document :tags

18 years ago[project @ 2005-06-13 14:16:03 by simonmar]
simonmar [Mon, 13 Jun 2005 14:16:03 +0000 (14:16 +0000)]
[project @ 2005-06-13 14:16:03 by simonmar]
fix layout in the help text

18 years ago[project @ 2005-06-13 14:12:59 by simonmar]
simonmar [Mon, 13 Jun 2005 14:12:59 +0000 (14:12 +0000)]
[project @ 2005-06-13 14:12:59 by simonmar]
Implement :tags command

Patch supplied by Claus Reinke, with some modifications by me.
Ideally we'd like this to be a command line option too, and we'd like
to drop the restriction that all the source files must be interpreted,
but that needs some work elsewhere (interface files have to store
definition source locations).

18 years ago[project @ 2005-06-13 13:46:39 by simonmar]
simonmar [Mon, 13 Jun 2005 13:46:39 +0000 (13:46 +0000)]
[project @ 2005-06-13 13:46:39 by simonmar]
unused imports

18 years ago[project @ 2005-06-13 13:44:48 by simonmar]
simonmar [Mon, 13 Jun 2005 13:44:48 +0000 (13:44 +0000)]
[project @ 2005-06-13 13:44:48 by simonmar]
- Eliminate some warnings, remove dead code
- export PrintUnqualified, alwaysQualify

18 years ago[project @ 2005-06-13 12:29:48 by simonmar]
simonmar [Mon, 13 Jun 2005 12:29:49 +0000 (12:29 +0000)]
[project @ 2005-06-13 12:29:48 by simonmar]
Block allocator performance fix: instead of keeping the free list
ordered, keep it doubly-linked, and introduce a new flag BF_FREE so we
can tell when a block is free.  We can still coalesce blocks on the
free list because block descriptors are kept consecutively in memory,
so we can tell based on the BF_FREE flag whether to coalesce with the
next higher/lower blocks when freeing a block.

This (almost) make freeChain O(n) rather than O(n^2), and has been
reported to help a lot when dealing with very large heaps.

18 years ago[project @ 2005-06-13 10:21:09 by simonmar]
simonmar [Mon, 13 Jun 2005 10:21:09 +0000 (10:21 +0000)]
[project @ 2005-06-13 10:21:09 by simonmar]
Use perl rather than sed to munge the package.conf file; avoids
portability problems with sed (previous version didn't work on Solaris).

18 years ago[project @ 2005-06-13 02:44:22 by wolfgang]
wolfgang [Mon, 13 Jun 2005 02:44:22 +0000 (02:44 +0000)]
[project @ 2005-06-13 02:44:22 by wolfgang]
Darwin:
Deal with the fact that the code and data in a .o file might not be
16-byte aligned even if it contains instructions that require 16-byte
alignment.
This fixes floating point related crashes on Darwin/x86; there might
also have been problems on Darwin/ppc if people load .o files with
AltiVec code into GHCi.

18 years ago[project @ 2005-06-13 02:03:42 by wolfgang]
wolfgang [Mon, 13 Jun 2005 02:03:42 +0000 (02:03 +0000)]
[project @ 2005-06-13 02:03:42 by wolfgang]
Darwin/x86:
Instead of aligning all literals at 16 bytes, reuse the hack from x86-64.