14 years agoFix Trac #1814 (staging interaction in Template Haskell and GHCi), and add comments [Tue, 6 Nov 2007 13:55:48 +0000 (13:55 +0000)]
Fix Trac #1814 (staging interaction in Template Haskell and GHCi), and add comments

An Id bound by GHCi from a previous Stmt is Global but Internal, and
I'd forgotten that, leading to unnecessary restrictions when using TH
and GHCi together.

This patch fixes the problem and adds lots of explanatory comments (which
is where most of the extra lines come from).

14 years agoImprove error messages [Tue, 6 Nov 2007 10:52:58 +0000 (10:52 +0000)]
Improve error messages

14 years agoImprove manual entry for binding lexically scoped type variables in pattern signatures [Tue, 6 Nov 2007 10:51:51 +0000 (10:51 +0000)]
Improve manual entry for binding lexically scoped type variables in pattern signatures

14 years agoRemove trailing spaces from programlisting lines [Tue, 6 Nov 2007 10:49:21 +0000 (10:49 +0000)]
Remove trailing spaces from programlisting lines

14 years agoRemove unhelpful sentence (see Trac #1832) [Tue, 6 Nov 2007 10:43:15 +0000 (10:43 +0000)]
Remove unhelpful sentence (see Trac #1832)

Merge to 6.8 branch

14 years agofix stage 1 compilation
Simon Marlow [Tue, 6 Nov 2007 14:20:57 +0000 (14:20 +0000)]
fix stage 1 compilation

14 years agowarning police
Simon Marlow [Tue, 6 Nov 2007 14:05:38 +0000 (14:05 +0000)]
warning police

14 years agoGHC API: add checkAndLoadModule
Simon Marlow [Tue, 6 Nov 2007 14:01:21 +0000 (14:01 +0000)]
GHC API: add checkAndLoadModule
Does what the name suggests: it performs the function of both
checkModule and load on that module, avoiding the need to process each
module twice when checking a batch of modules.  This will make Haddock
and ghctags much faster.

Along with this is the beginnings of a refactoring of the HscMain
interface.  HscMain now exports functions for separately running the
parser, typechecher, and generating ModIface and ModDetails.
Eventually the plan is to complete this interface and use it to
replace the existing one.

14 years agoupdate to use latest changes to the GHC API (works much quicker now)
Simon Marlow [Tue, 6 Nov 2007 13:54:30 +0000 (13:54 +0000)]
update to use latest changes to the GHC API (works much quicker now)

14 years agowarning police
Simon Marlow [Tue, 6 Nov 2007 10:40:19 +0000 (10:40 +0000)]
warning police

14 years agoVarious improvements
Simon Marlow [Mon, 5 Nov 2007 16:40:54 +0000 (16:40 +0000)]
Various improvements
 - take the GHC topdir as a runtime argument
 - deal with files one at a time (fix space leak)

14 years agobuild ghctags-inplace
Simon Marlow [Mon, 5 Nov 2007 16:39:54 +0000 (16:39 +0000)]
build ghctags-inplace

14 years agoupdates to ghctags code
Simon Marlow [Mon, 5 Nov 2007 16:39:27 +0000 (16:39 +0000)]
updates to ghctags code

14 years agoeliminate a bit of duplication
Simon Marlow [Mon, 5 Nov 2007 14:37:14 +0000 (14:37 +0000)]
eliminate a bit of duplication

14 years agocatch up with changes to checkModule
Simon Marlow [Mon, 5 Nov 2007 14:22:17 +0000 (14:22 +0000)]
catch up with changes to checkModule

14 years agoreorder the imports
Simon Marlow [Mon, 25 Jun 2007 13:41:51 +0000 (13:41 +0000)]
reorder the imports

14 years agoadd $(GHCTAGS)
Simon Marlow [Mon, 25 Jun 2007 13:34:50 +0000 (13:34 +0000)]
add $(GHCTAGS)

14 years agofollow changes in HsRecFields
Simon Marlow [Mon, 25 Jun 2007 13:31:19 +0000 (13:31 +0000)]
follow changes in HsRecFields

14 years agomerged patches relating to GhcTags from #946
Simon Marlow [Mon, 25 Jun 2007 13:21:58 +0000 (13:21 +0000)]
merged patches relating to GhcTags from #946

* accomodate changes in the GHC API
* refactoring for more readable source code
* if the whole group fails, try one file at a time
* desperate attempts to handle the GHC build

14 years agoRules to create TAGS using ghctags
Simon Marlow [Mon, 25 Jun 2007 13:20:47 +0000 (13:20 +0000)]
Rules to create TAGS using ghctags

14 years agorequest for documentation of a new argument [Mon, 25 Jun 2007 13:19:06 +0000 (13:19 +0000)]
request for documentation of a new argument

15 years agonew README file for utils/ghctags [Fri, 13 Oct 2006 20:27:56 +0000 (20:27 +0000)]
new README file for utils/ghctags

15 years agoproper HC entry for bootstrapping in Makefile
Norman Ramsey [Wed, 20 Sep 2006 04:28:39 +0000 (04:28 +0000)]
proper HC entry for bootstrapping in Makefile

15 years agofirst cut at missing case for ids defined in pattern
Norman Ramsey [Wed, 20 Sep 2006 04:27:57 +0000 (04:27 +0000)]
first cut at missing case for ids defined in pattern

15 years agochange representation of FoundThing
Norman Ramsey [Sun, 17 Sep 2006 05:08:00 +0000 (05:08 +0000)]
change representation of FoundThing
refactored FoundThing to use GHC's native representation of
source-code locations and to carry the module name so that the TAGS
file can contain a qualified name as well as the unqualified name

15 years agoget names of data constructors
Norman Ramsey [Sun, 17 Sep 2006 01:55:39 +0000 (01:55 +0000)]
get names of data constructors

15 years agodo notation for the Maybe monad
Norman Ramsey [Sun, 17 Sep 2006 00:34:10 +0000 (00:34 +0000)]
do notation for the Maybe monad

15 years agoload all files at once and compute tags for all
Norman Ramsey [Sun, 17 Sep 2006 00:24:30 +0000 (00:24 +0000)]
load all files at once and compute tags for all

15 years agotell GHC not to generate code (thanks Simon M)
Norman Ramsey [Sun, 17 Sep 2006 00:23:53 +0000 (00:23 +0000)]
tell GHC not to generate code (thanks Simon M)

15 years agocover more cases; take GHC options on command line
Norman Ramsey [Sat, 16 Sep 2006 23:27:55 +0000 (23:27 +0000)]
cover more cases; take GHC options on command line
Bit of a dog's breakfast here:
  * generate tags for more cases in the syntax
  * accept -package ghc and other args on command line
  * scrub away old code for snaffling thru text

15 years agoinitial, very incomplete tags generator
Norman Ramsey [Fri, 15 Sep 2006 23:50:33 +0000 (23:50 +0000)]
initial, very incomplete tags generator
The ultimate goal is to replace hasktags with
a tags generator based on GHC-as-a-library.
This file is a very incomplete first cut.

14 years agoInline implication constraints [Mon, 5 Nov 2007 22:08:07 +0000 (22:08 +0000)]
Inline implication constraints

This patch fixes Trac #1643, where Lennart found that GHC was generating
code with unnecessary dictionaries.  The reason was that we were getting
an implication constraint floated out of an INLINE (actually an instance
decl), and the implication constraint therefore wasn't inlined even
though it was used only once (but inside the INLINE).  Thus we were

ic = \d -> <stuff>
foo = _inline_me_ (...ic...)

Then 'foo' gets inlined in lots of places, but 'ic' now looks a bit

But implication constraints should *always* be inlined; they are just
artefacts of the constraint simplifier.

This patch solves the problem, by adding a WpInline form to the HsWrap

14 years agoComment warning about transparent newtypes [Mon, 5 Nov 2007 22:07:44 +0000 (22:07 +0000)]
Comment warning about transparent newtypes

14 years agoWibble to earlier case-merge fix [Mon, 5 Nov 2007 22:06:27 +0000 (22:06 +0000)]
Wibble to earlier case-merge fix

This fix avoids a bogus WARN in SimplEnv.substId

14 years agoImprove pretty-printing of Core slightly (avoid indenting let bodies) [Mon, 5 Nov 2007 22:05:35 +0000 (22:05 +0000)]
Improve pretty-printing of Core slightly (avoid indenting let bodies)

14 years agoFix an old but subtle bug in the Simplifier [Mon, 5 Nov 2007 16:13:14 +0000 (16:13 +0000)]
Fix an old but subtle bug in the Simplifier

I got a Core Lint failure when compiling System.Win32.Info in the
Win32 package.  It was very delicate: adding or removing a function
definition elsewhere in the module (unrelated to the error) made the
error go away.

Happily, I found it.  In SimplUtils.prepareDefault I was comparing an
InId with an OutId.  We were getting a spurious hit, and hence doing
a bogus CaseMerge.

This bug has been lurking ever since I re-factored the way that case
expressions were simplified, about 6 months ago!

14 years agoMake CoreLint give a more informative error message [Mon, 5 Nov 2007 16:12:17 +0000 (16:12 +0000)]
Make CoreLint give a more informative error message

14 years agoComments about TH staging [Mon, 5 Nov 2007 14:53:40 +0000 (14:53 +0000)]
Comments about TH staging

14 years agoFix freeHaskellFunctionPtr for Darwin/i386
Aaron Tomb [Mon, 29 Oct 2007 20:26:36 +0000 (20:26 +0000)]
Fix freeHaskellFunctionPtr for Darwin/i386

14 years agoMERGED: Set interfacedir (using $topdir, not $httptopdir)
Ian Lynagh [Sat, 3 Nov 2007 18:08:03 +0000 (18:08 +0000)]
MERGED: Set interfacedir (using $topdir, not $httptopdir)
Mon Oct 29 10:48:25 PDT 2007  Ian Lynagh <>

14 years agoTeach ghc-pkg about $httptopdir
Ian Lynagh [Mon, 29 Oct 2007 16:11:30 +0000 (16:11 +0000)]
Teach ghc-pkg about $httptopdir

14 years agoMERGED: installPackage needs to treat $httptopdir the same as $topdir
Ian Lynagh [Sat, 3 Nov 2007 18:02:59 +0000 (18:02 +0000)]
MERGED: installPackage needs to treat $httptopdir the same as $topdir
Sun Oct 28 06:45:34 PDT 2007  Ian Lynagh <>

14 years agoMERGED: Define and use $httptopdir for the haddock docs locations
Ian Lynagh [Sat, 3 Nov 2007 18:00:23 +0000 (18:00 +0000)]
MERGED: Define and use $httptopdir for the haddock docs locations
Sun Oct 28 05:35:52 PDT 2007  Ian Lynagh <>

14 years agoWe need to copy .buildinfo files into the bindists
Ian Lynagh [Sun, 28 Oct 2007 13:17:52 +0000 (13:17 +0000)]
We need to copy .buildinfo files into the bindists

14 years ago(>>>) now comes from GHC.Desugar
Simon Marlow [Fri, 2 Nov 2007 15:59:54 +0000 (15:59 +0000)]
(>>>) now comes from GHC.Desugar

14 years agoRefactor error recovery slightly [Fri, 2 Nov 2007 13:01:15 +0000 (13:01 +0000)]
Refactor error recovery slightly

Mostly this patch is refacoring, but it also avoids post-tc zonking if
the typechecker found errors.  This is good because otherwise with
DEBUG you can get the "Inventing strangely-kinded TyCon" warning.

14 years agoAvoid Haddock bug #1821 [Fri, 2 Nov 2007 13:00:43 +0000 (13:00 +0000)]
Avoid Haddock bug #1821

14 years agoUpdate error message to mention -XPatternSignatures instead of -fglasgow-exts [Thu, 1 Nov 2007 18:03:02 +0000 (18:03 +0000)]
Update error message to mention -XPatternSignatures instead of -fglasgow-exts

14 years agoRejig the error messages a bit; fixes a minor bug [Thu, 1 Nov 2007 17:50:22 +0000 (17:50 +0000)]
Rejig the error messages a bit; fixes a minor bug

The type checker was only reporting the first message if an equality
failed to match.  This patch does a bit of refactoring and fixes the
bug, which was in the bogus use of eqInstMisMatch
in tcSimplify.report_no_instances.b

This is really a bug in 6.8 too, so this would be good to merge across
to the 6.8 branch.

14 years agoRefactor Haddock options
David Waern [Thu, 1 Nov 2007 13:17:57 +0000 (13:17 +0000)]
Refactor Haddock options

This patch renames the DOC_OPTIONS pragma to OPTIONS_HADDOCK. It also
adds "-- # ..."-style Haddock option pragmas, for compatibility with
code that use them.

Another change is that both of these two pragmas behave like
OPTIONS_GHC, i.e. they are only allowed at the top of the module, they
are ignored everywhere else and they are stored in the dynflags. There is
no longer any Haddock options in HsSyn.

Please merge this to the 6.8.2 branch when 6.8.1 is out, if appropriate.

14 years agoclean ghci-inplace
Simon Marlow [Wed, 31 Oct 2007 09:39:32 +0000 (09:39 +0000)]
clean ghci-inplace

14 years agoclean Haddock droppings
Simon Marlow [Wed, 31 Oct 2007 09:39:23 +0000 (09:39 +0000)]
clean Haddock droppings

14 years agoFix warning in OSMem for darwin
Manuel M T Chakravarty [Tue, 30 Oct 2007 13:30:03 +0000 (13:30 +0000)]
Fix warning in OSMem for darwin

14 years agoFIX BUILD: a glitch in the new rules and inlining stuff [Tue, 30 Oct 2007 11:38:57 +0000 (11:38 +0000)]
FIX BUILD: a glitch in the new rules and inlining stuff

Don't re-add the worker info to a binder until completeBind. It's not
needed in its own RHS, and it may be replaced, via the substitution
following postInlineUnconditionally.

(Fixes build of the stage2 compiler which fell over when Coercion.lhs
was being compiled.)

14 years agoFix LiberateCase [Mon, 29 Oct 2007 17:06:20 +0000 (17:06 +0000)]
Fix LiberateCase

Merge to STABLE please

Liberate case was being far too gung-ho about what to specialise. This
bug only showed up when a recursive function 'f' has a nested recursive
function 'g', where 'g' calls 'f' (as well as recursively calling 'g').
This exact situation happens in GHC/IO.writeLines.

This patch puts things right; see Note [When to specialise].  Result:
much less code bloat.

14 years agoImprove error-message output slightly [Mon, 29 Oct 2007 16:26:37 +0000 (16:26 +0000)]
Improve error-message output slightly

14 years agoImprove documentation of orphan instances (thanks to Adrian Hey) [Mon, 29 Oct 2007 16:25:05 +0000 (16:25 +0000)]
Improve documentation of orphan instances (thanks to Adrian Hey)

Please push to stable branch


14 years agofix installation of haddock.css and friends
Simon Marlow [Mon, 29 Oct 2007 12:07:32 +0000 (12:07 +0000)]
fix installation of haddock.css and friends

14 years agoIn a pattern binding, a type sig in the pattern cannot bind a type variable [Sat, 27 Oct 2007 15:33:30 +0000 (15:33 +0000)]
In a pattern binding, a type sig in the pattern cannot bind a type variable

In a pattern binding with a pattern type signature, such as

(Just (x::a)) = e

the pattern type signature cannot bind type variables.  Hence
'a' must be in scope already for the above example to be legal.

This has been the situation for some time, but Dan changed it when
adding view patterns.  This one-line change restores the old behaviour.

14 years agoSubstantial improvement to the interaction of RULES and inlining [Mon, 29 Oct 2007 11:10:56 +0000 (11:10 +0000)]
Substantial improvement to the interaction of RULES and inlining

(Merge to 6.8 branch after testing.)

There were a number of delicate interactions between RULEs and inlining
in GHC 6.6.  I've wanted to fix this for a long time, and some perf
problems in the 6.8 release candidate finally forced me over the edge!

The issues are documented extensively in OccurAnal, Note [Loop breaking
and RULES], and I won't duplicate them here.  (Many of the extra lines in
OccurAnal are comments!)

This patch resolves Trac bugs #1709, #1794, #1763, I believe.

14 years agoAdd newline in debug print [Fri, 26 Oct 2007 15:02:24 +0000 (15:02 +0000)]
Add newline in debug print

14 years agoExplicit pattern match in default case of addTickLHsBind [Wed, 24 Oct 2007 13:48:28 +0000 (13:48 +0000)]
Explicit pattern match in default case of addTickLHsBind

14 years agoGeneralise the types of mk_FunBind, mk_easy_FunBind, mkVarBind [Wed, 24 Oct 2007 13:47:50 +0000 (13:47 +0000)]
Generalise the types of mk_FunBind, mk_easy_FunBind, mkVarBind

14 years agoFix the build with GHC < 6.4 (foldl1' didn't exist)
Ian Lynagh [Sat, 27 Oct 2007 21:05:26 +0000 (21:05 +0000)]
Fix the build with GHC < 6.4 (foldl1' didn't exist)

14 years agoFix the build with GHC < 6.4 (foldl1' didn't exist)
Ian Lynagh [Sat, 27 Oct 2007 21:05:26 +0000 (21:05 +0000)]
Fix the build with GHC < 6.4 (foldl1' didn't exist)

14 years agoMERGED: We need to install-docs when making the Windows bindist
Ian Lynagh [Sat, 27 Oct 2007 20:32:20 +0000 (20:32 +0000)]
MERGED: We need to install-docs when making the Windows bindist

14 years agoWe need to set _way=* in rts/ both when making and installing bindists
Ian Lynagh [Sat, 27 Oct 2007 14:29:14 +0000 (14:29 +0000)]
We need to set _way=* in rts/ both when making and installing bindists
This is a hack, but it means we get libHSrts*.a etc rather than just

14 years agoFix a whole heap of speling errrs in the docs
Josef Svenningsson [Sun, 7 Oct 2007 21:38:58 +0000 (21:38 +0000)]
Fix a whole heap of speling errrs in the docs

14 years agoOnly build/install the man page if XSLTPROC is defined
Ian Lynagh [Sat, 27 Oct 2007 12:21:55 +0000 (12:21 +0000)]
Only build/install the man page if XSLTPROC is defined

14 years agoinstall the Cabal docs, and make them show up in a binary distribution
Simon Marlow [Fri, 26 Oct 2007 12:24:56 +0000 (12:24 +0000)]
install the Cabal docs, and make them show up in a binary distribution

14 years agocp => $(CP)
Simon Marlow [Fri, 26 Oct 2007 11:10:54 +0000 (11:10 +0000)]
cp => $(CP)

14 years agoget rid of the html subdirectory under share/doc/ghc/users_guide
Simon Marlow [Fri, 26 Oct 2007 11:09:19 +0000 (11:09 +0000)]
get rid of the html subdirectory under share/doc/ghc/users_guide

14 years agoMake 'improvement' work properly in TcSimplify [Sat, 27 Oct 2007 15:54:59 +0000 (15:54 +0000)]
Make 'improvement' work properly in TcSimplify

(Please merge this, and the preceding
handful from me to the 6.8 branch.)

This patch fixes a serious problem in the type checker, whereby
TcSimplify was going into a loop because it thought improvement
had taken place, but actually the unificataion was actually deferred.

We thereby fix Trac #1781, #1783, #1795, and #1797!

In fixing this I found what a mess TcSimplify.reduceContext is!
We need to fix this.

The main idea is to replace the "improvement flag" in Avails with
a simpler and more direct test: have any of the mutable type variables
in the (zonked) 'given' or 'irred' constraints been filled in?
This test uses the new function TcMType.isFilledMetaTyVar; the test
itself is towards the end of reduceContext.

I fixed a variety of other infelicities too, and left some ToDos.

14 years agoAn implication constraint can abstract over EqInsts [Sat, 27 Oct 2007 15:54:33 +0000 (15:54 +0000)]
An implication constraint can abstract over EqInsts

14 years agoIn an AbsBinds, the 'dicts' can include EqInsts [Sat, 27 Oct 2007 15:49:03 +0000 (15:49 +0000)]
In an AbsBinds, the 'dicts' can include EqInsts

An AbsBinds abstrats over evidence, and the evidence can be both
Dicts (class constraints, implicit parameters) and EqInsts (equality
constraints).  So we need to
  - use varType rather than idType
  - use instToVar rather than instToId
  - use zonkDictBndr rather than zonkIdBndr in zonking

It actually all worked before, but gave warnings.

14 years agoMore notes [Sat, 27 Oct 2007 15:47:02 +0000 (15:47 +0000)]
More notes

14 years agoComments only [Sat, 27 Oct 2007 15:46:42 +0000 (15:46 +0000)]
Comments only

14 years agoAdd anyM to IOEnv [Sat, 27 Oct 2007 15:45:51 +0000 (15:45 +0000)]
Add anyM to IOEnv

14 years agoAdd a note to NOTES [Sat, 27 Oct 2007 10:02:20 +0000 (10:02 +0000)]
Add a note to NOTES

14 years agoMake compileToCore return the module name and type environment along with bindings
Tim Chevalier [Sat, 27 Oct 2007 10:05:30 +0000 (10:05 +0000)]
Make compileToCore return the module name and type environment along with bindings

  compileToCore returned just a list of CoreBind, which isn't enough,
since to do anything with the resulting Core code, you probably also
want the type declarations. I left compileToCore as it is, but added a
function compileToCoreModule that returns a complete Core module (with
module name, type environment, and bindings). I'm not sure that
returning the type environment is the best way to represent the type
declarations for the given module, but I don't want to reinvent the
External Core wheel for this.

14 years agobinary-dist: Makefile-vars needs HADDOCK_DOCS=YES
Simon Marlow [Thu, 25 Oct 2007 13:58:16 +0000 (13:58 +0000)]
binary-dist: Makefile-vars needs HADDOCK_DOCS=YES

14 years agofix the links in the library documentation index
Simon Marlow [Thu, 25 Oct 2007 15:22:45 +0000 (15:22 +0000)]
fix the links in the library documentation index

14 years agodefault to installing runhaskell and hsc2hs again, but provide knobs to turn them off
Simon Marlow [Thu, 25 Oct 2007 08:42:22 +0000 (08:42 +0000)]
default to installing runhaskell and hsc2hs again, but provide knobs to turn them off

14 years agoAdding hpc documentation about sum and map, push to STABLE. [Thu, 25 Oct 2007 05:03:41 +0000 (05:03 +0000)]
Adding hpc documentation about sum and map, push to STABLE.

14 years agoFixing typo in runtime documentation for hpc, push to stable [Thu, 25 Oct 2007 04:54:56 +0000 (04:54 +0000)]
Fixing typo in runtime documentation for hpc, push to stable

14 years agoCorrect a comment
Ian Lynagh [Wed, 24 Oct 2007 11:45:49 +0000 (11:45 +0000)]
Correct a comment

14 years agoFix ghc package in bindists; it wasn't adding the depenedency on readline
Ian Lynagh [Wed, 24 Oct 2007 12:06:33 +0000 (12:06 +0000)]
Fix ghc package in bindists; it wasn't adding the depenedency on readline

14 years agoFix installing the ghc package .hi files in a bindist
Ian Lynagh [Wed, 24 Oct 2007 11:42:19 +0000 (11:42 +0000)]
Fix installing the ghc package .hi files in a bindist

14 years agoBuild the manpage when building, not when installing
Ian Lynagh [Wed, 24 Oct 2007 11:29:14 +0000 (11:29 +0000)]
Build the manpage when building, not when installing

14 years agoHack to make sure we get all the RTS ways in bindists
Ian Lynagh [Wed, 24 Oct 2007 00:41:55 +0000 (00:41 +0000)]
Hack to make sure we get all the RTS ways in bindists

14 years agoFix installing the documentation in the bindists
Ian Lynagh [Tue, 23 Oct 2007 23:46:24 +0000 (23:46 +0000)]
Fix installing the documentation in the bindists

14 years ago-ftype-families -> -XTypeFamilies
Ian Lynagh [Wed, 24 Oct 2007 14:28:28 +0000 (14:28 +0000)]
-ftype-families -> -XTypeFamilies

14 years agoFIX #1791: fail with out-of-heap when allocating more than the max heap size in one go
Simon Marlow [Wed, 24 Oct 2007 09:54:20 +0000 (09:54 +0000)]
FIX #1791: fail with out-of-heap when allocating more than the max heap size in one go
Normally the out-of-heap check is performed post-GC, but there are
cases where we can detect earlier that we definitely have exhausted
the heap size limit.

14 years agoFix more warnings
Simon Marlow [Tue, 23 Oct 2007 13:13:51 +0000 (13:13 +0000)]
Fix more warnings

14 years agoFIX BUILD (on 32-bit platforms): hs_hpc_module() type mismatch
Simon Marlow [Tue, 23 Oct 2007 08:22:33 +0000 (08:22 +0000)]
FIX BUILD (on 32-bit platforms): hs_hpc_module() type mismatch

14 years agopatch from #1782; fixes check-packages target on Solaris
Simon Marlow [Mon, 22 Oct 2007 13:33:37 +0000 (13:33 +0000)]
patch from #1782; fixes check-packages target on Solaris

14 years agoadd PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
Simon Marlow [Thu, 18 Oct 2007 12:52:20 +0000 (12:52 +0000)]
add PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra
commentary by me.  It turns out that this patch is not just a cleanup,
it is also necessary for GHCi to work on x86_64 with shared libraries,
because previously lookupSymbol() was creating jump-table entries for
all symbols looked up that resolved outside 2Gb, whereas Wolfgang's
version only generates jump-table entries for 32-bit symbol references
in object code that we load.

14 years agofix creation of ghc-inplace for non-std ways
Simon Marlow [Wed, 17 Oct 2007 15:28:20 +0000 (15:28 +0000)]
fix creation of ghc-inplace for non-std ways

14 years agoremove an incorrect assertion
Simon Marlow [Tue, 16 Oct 2007 15:18:29 +0000 (15:18 +0000)]
remove an incorrect assertion

14 years agosecond attempt to fix C compiler warnings with -fhpc
Simon Marlow [Fri, 19 Oct 2007 13:32:43 +0000 (13:32 +0000)]
second attempt to fix C compiler warnings with -fhpc
The hs_hpc_module() prototype in RtsExternal.h didn't match its usage:
we were passing StgWord-sized parameters but the prototype used C
ints.  I think it accidentally worked because we only ever passed
constants that got promoted.  The constants unfortunately were
sometimes negative, which caused the C compiler to emit warnings.

I suspect PprC.pprHexVal may be wrong to emit negative constants in
the generated C, but I'm not completely sure.  Anyway, it's easy to
fix this in CgHpc, which is what I've done.