ghc.git
7 years agoIntroduce GHC.Base.noupdate as an alternative to {-# NOUPDATE #-} unshare
Joachim Breitner [Thu, 30 Aug 2012 08:19:10 +0000 (10:19 +0200)]
Introduce GHC.Base.noupdate as an alternative to {-# NOUPDATE #-}

7 years agoAdd Edit warning to Parser.y.pp
Joachim Breitner [Mon, 27 Aug 2012 13:30:38 +0000 (15:30 +0200)]
Add Edit warning to Parser.y.pp

7 years agoNew parameter -funshare-selectors
Joachim Breitner [Thu, 9 Aug 2012 14:39:29 +0000 (16:39 +0200)]
New parameter -funshare-selectors

7 years agoFix infinite loop in Unshare.lhs
Joachim Breitner [Thu, 9 Aug 2012 14:39:13 +0000 (16:39 +0200)]
Fix infinite loop in Unshare.lhs

7 years agoMake stg_sel_*_reent available when linking
Joachim Breitner [Thu, 9 Aug 2012 10:05:11 +0000 (12:05 +0200)]
Make stg_sel_*_reent available when linking

7 years agoExperiment: Make all selector thunks reentrant
Joachim Breitner [Tue, 7 Aug 2012 15:17:56 +0000 (17:17 +0200)]
Experiment: Make all selector thunks reentrant

After all the garbage collecotr will update them, and we save some stack
usage this way.

7 years agoCreate reentrant variants of the selector thunks
Joachim Breitner [Tue, 7 Aug 2012 15:05:23 +0000 (17:05 +0200)]
Create reentrant variants of the selector thunks

7 years agoHold on to the full UpdateFlag information for longer
Joachim Breitner [Tue, 7 Aug 2012 14:38:51 +0000 (16:38 +0200)]
Hold on to the full UpdateFlag information for longer

7 years agoRefacor out isSelectorThunk from mkRhsClosure
Joachim Breitner [Mon, 6 Aug 2012 08:32:19 +0000 (10:32 +0200)]
Refacor out isSelectorThunk from mkRhsClosure

7 years agoAdd {-# NOUPDATE #-} pragma to expressions
Joachim Breitner [Fri, 3 Aug 2012 13:28:32 +0000 (15:28 +0200)]
Add {-# NOUPDATE #-} pragma to expressions

and mark thunks whose content is wrapped in such a pragma as reentrant.

7 years agoAdd an unshare stg2stg phase
Joachim Breitner [Fri, 3 Aug 2012 13:27:19 +0000 (15:27 +0200)]
Add an unshare stg2stg phase

Just a stub for experimentation: This currently marks every think as
reentrant that calls a function whose name ends in myenum.

7 years agoHaddock syntax fix in Tickish documentation
Joachim Breitner [Fri, 3 Aug 2012 12:31:46 +0000 (14:31 +0200)]
Haddock syntax fix in Tickish documentation

7 years agoUpdate documentation for -fwarn-dodgy-imports.
Paolo Capriotti [Sat, 25 Aug 2012 19:33:36 +0000 (20:33 +0100)]
Update documentation for -fwarn-dodgy-imports.

7 years agoMake badImportItem into a warning (#7167)
Paolo Capriotti [Thu, 23 Aug 2012 11:54:45 +0000 (12:54 +0100)]
Make badImportItem into a warning (#7167)

Also fix a bug where a dodgy import warning was emitted for data
families with a single constructor.

7 years agoMore CPP macros -> inline functions
Ian Lynagh [Sat, 25 Aug 2012 14:42:20 +0000 (15:42 +0100)]
More CPP macros -> inline functions

All the wibble seem to have cancelled out, and (non-debug) object sizes
are back to where they started.

I'm not 100% sure that the types are optimal, but at least now the
functions have types and we can fix them if necessary.

7 years agoMore CPP macros -> inline functions
Ian Lynagh [Sat, 25 Aug 2012 12:32:50 +0000 (13:32 +0100)]
More CPP macros -> inline functions

7 years agoMore CPP macro -> inline function
Ian Lynagh [Sat, 25 Aug 2012 12:03:31 +0000 (13:03 +0100)]
More CPP macro -> inline function

7 years agoConvert a couple more macros to inline functions
Ian Lynagh [Sat, 25 Aug 2012 11:49:47 +0000 (12:49 +0100)]
Convert a couple more macros to inline functions

This caused a couple of .o files to change size. I had a look at one,
and it seems to be caused by the difference in size of these two
instructions:
    49 8b 5d 08            mov    0x8(%r13),%rbx
    49 8b 5c 24 08         mov    0x8(%r12),%rbx
(with a few nops being added or removed later in the file, presumably
for alignment reasons).

7 years agoMake a function for get_itbl, rather than using a CPP macro
Ian Lynagh [Sat, 25 Aug 2012 10:31:50 +0000 (11:31 +0100)]
Make a function for get_itbl, rather than using a CPP macro

This has several advantages:
* It can be called from gdb
* There is more type information for the user, and type checking
  for the compiler
* Less opportunity for things to go wrong, e.g. due to missing
  parentheses or repeated execution

The sizes of the non-debug .o files hasn't changed (other than
Inlines.o), so I'm pretty sure the compiled code is identical.

7 years agoFix build with FreeBSD versions earlier than 9.0
Gabor Pali [Thu, 9 Aug 2012 22:45:42 +0000 (00:45 +0200)]
Fix build with FreeBSD versions earlier than 9.0

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 23 Aug 2012 16:05:13 +0000 (17:05 +0100)]
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 23 Aug 2012 15:36:08 +0000 (16:36 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoDon't specialise on implicit-parameter arguments in Specalise
Simon Peyton Jones [Thu, 23 Aug 2012 15:35:55 +0000 (16:35 +0100)]
Don't specialise on implicit-parameter arguments in Specalise

This is a fix for Trac #7101

7 years agoTwo small fixes to SpecConstr for functions with equality-proof args
Simon Peyton Jones [Thu, 23 Aug 2012 15:35:11 +0000 (16:35 +0100)]
Two small fixes to SpecConstr for functions with equality-proof args

First, make Rules.match_co able to deal wit some modest coercions
Second, make SpecConstr use wild-card for coercion arguments

This is the rest of the fix for Trac #7165

7 years agoFix to-iface conversion of RULES involving coercions in argument pattterns
Simon Peyton Jones [Thu, 23 Aug 2012 15:33:36 +0000 (16:33 +0100)]
Fix to-iface conversion of RULES involving coercions in argument pattterns

This is part of the fix to Trac #7165

7 years agoFollow changes in Cabal
Ian Lynagh [Thu, 23 Aug 2012 14:20:33 +0000 (15:20 +0100)]
Follow changes in Cabal

7 years agoMerge ../HEAD
Simon Peyton Jones [Thu, 23 Aug 2012 14:30:38 +0000 (15:30 +0100)]
Merge ../HEAD

7 years agoFix for optimizer bug on linux-powerpc (#6156).
Erik de Castro Lopo [Thu, 23 Aug 2012 10:39:47 +0000 (20:39 +1000)]
Fix for optimizer bug on linux-powerpc (#6156).

7 years agoDon't assume that coercion variables have (~) types
Simon Peyton Jones [Thu, 23 Aug 2012 10:04:22 +0000 (11:04 +0100)]
Don't assume that coercion variables have (~) types

The constraint solver doesn't zonk the types of coercion variables
so we can't assume that a coercion variable will have a (~) type.

Fixes Trac #7090.

7 years agoEmit a warning for -rtsopts -shared, as well as -rtsopts -no-hs-main
Simon Marlow [Thu, 23 Aug 2012 08:49:12 +0000 (09:49 +0100)]
Emit a warning for -rtsopts -shared, as well as -rtsopts -no-hs-main

-rtsopts has no effect with -shared, so we should emit a warning.  See
 #5373 and #7177.

7 years agoMinor refactoring
Simon Peyton Jones [Thu, 23 Aug 2012 09:17:19 +0000 (10:17 +0100)]
Minor refactoring

7 years agoFix :issafe command (#7172).
David Terei [Thu, 23 Aug 2012 08:59:05 +0000 (01:59 -0700)]
Fix :issafe command (#7172).

7 years agoImprove Safe Haskell warn/error output.
David Terei [Thu, 23 Aug 2012 07:29:02 +0000 (00:29 -0700)]
Improve Safe Haskell warn/error output.

7 years agoAdd mapTM to TrieMap
Simon Peyton Jones [Wed, 22 Aug 2012 15:15:17 +0000 (16:15 +0100)]
Add mapTM to TrieMap

7 years agoTab elimination
Simon Peyton Jones [Wed, 22 Aug 2012 15:15:04 +0000 (16:15 +0100)]
Tab elimination

7 years agoA bit more debug output
Simon Peyton Jones [Wed, 22 Aug 2012 15:14:30 +0000 (16:14 +0100)]
A bit more debug output

7 years agoFix missing case in coVarsOfTcCo
Simon Peyton Jones [Wed, 22 Aug 2012 15:13:56 +0000 (16:13 +0100)]
Fix missing case in coVarsOfTcCo

Reported by Ganesh, Trac #7178.  Fix is easy.

7 years agoMore CPP removal in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:51:09 +0000 (00:51 +0100)]
More CPP removal in nativeGen/X86/Regs.hs

7 years agoMore CPP removal in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:43:41 +0000 (00:43 +0100)]
More CPP removal in nativeGen/X86/Regs.hs

7 years agoRemove some CPP in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:40:58 +0000 (00:40 +0100)]
Remove some CPP in nativeGen/X86/Regs.hs

7 years agoMake the PPC globalRegMaybe more similar to the other platforms'
Ian Lynagh [Tue, 21 Aug 2012 20:50:59 +0000 (21:50 +0100)]
Make the PPC globalRegMaybe more similar to the other platforms'

7 years agoWhitespace only in compiler/nativeGen/PPC/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 20:48:40 +0000 (21:48 +0100)]
Whitespace only in compiler/nativeGen/PPC/Regs.hs

7 years agoWhitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
Ian Lynagh [Tue, 21 Aug 2012 18:53:04 +0000 (19:53 +0100)]
Whitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs

7 years agoRemove unused 'targetWordSize'
Ian Lynagh [Tue, 21 Aug 2012 18:51:58 +0000 (19:51 +0100)]
Remove unused 'targetWordSize'

7 years agoPass platform down to lastint
Ian Lynagh [Tue, 21 Aug 2012 18:50:32 +0000 (19:50 +0100)]
Pass platform down to lastint

7 years agoPass platform down to lastxmm
Ian Lynagh [Tue, 21 Aug 2012 18:39:20 +0000 (19:39 +0100)]
Pass platform down to lastxmm

7 years agoStgCmmUtils no longer needs to include HaskellMachRegs.h
Ian Lynagh [Tue, 21 Aug 2012 18:08:31 +0000 (19:08 +0100)]
StgCmmUtils no longer needs to include HaskellMachRegs.h

7 years agoUse haveRegBase in StgCmmUtils too
Ian Lynagh [Tue, 21 Aug 2012 18:04:57 +0000 (19:04 +0100)]
Use haveRegBase in StgCmmUtils too

7 years agoWhitespace only in StgCmmUtils
Ian Lynagh [Tue, 21 Aug 2012 17:57:56 +0000 (18:57 +0100)]
Whitespace only in StgCmmUtils

7 years agoCgUtils no longer needs to #include HaskellMachRegs.h
Ian Lynagh [Tue, 21 Aug 2012 17:52:11 +0000 (18:52 +0100)]
CgUtils no longer needs to #include HaskellMachRegs.h

7 years agoAdd haveRegBase to CodeGen.Platform
Ian Lynagh [Tue, 21 Aug 2012 17:44:31 +0000 (18:44 +0100)]
Add haveRegBase to CodeGen.Platform

7 years agoMove activeStgRegs into CodeGen.Platform
Ian Lynagh [Tue, 21 Aug 2012 16:44:38 +0000 (17:44 +0100)]
Move activeStgRegs into CodeGen.Platform

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Tue, 21 Aug 2012 15:45:53 +0000 (16:45 +0100)]
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoFix the generation of CallerSaves; fixes #7163
Ian Lynagh [Tue, 21 Aug 2012 15:41:30 +0000 (16:41 +0100)]
Fix the generation of CallerSaves; fixes #7163

Simon Marlow spotted that we were #include'ing MachRegs.h several times,
but that doesn't work as (a) it uses ifdeffery to avoid being included
multiple times, and (b) even if we work around that, then the #define's
from previous inclusions are still defined when we #include it again.

So we now put the platform code for each platform in a separate .hs file.

7 years agoOS X: use mmap() instead of malloc for allocating the bss (#7040)
Simon Marlow [Mon, 20 Aug 2012 12:14:47 +0000 (13:14 +0100)]
OS X: use mmap() instead of malloc for allocating the bss (#7040)

7 years agofix warning
Simon Marlow [Tue, 21 Aug 2012 14:02:34 +0000 (15:02 +0100)]
fix warning

7 years agoAnnotate code in {-# LINE #-} pragmas as well
Peter Wortmann [Wed, 8 Aug 2012 15:52:15 +0000 (16:52 +0100)]
Annotate code in {-# LINE #-} pragmas as well

I suppose this was a good idea for HPC, as it assumed that source code
annotations coming from a source file could only talk about the same
source file (by how Mix files are saved).

I don't see a reason why cost-centres or source annotations would want
that kind of behaviour. I introduced a flag for toggling the behaviour
per tickish.

(plus some minor refactoring, as well as making sure that the same check
applies to binary tick boxes, where they had apparently been forgotten.)

7 years agoRefactor the way we infer types for functions in a mutually recursive group
Simon Peyton Jones [Tue, 21 Aug 2012 13:37:20 +0000 (14:37 +0100)]
Refactor the way we infer types for functions in a mutually recursive group

See Note [Impedence matching] in TcBinds.
Fixes Trac #7173

7 years agoRe-jig the reporting of names bound multiple times
Simon Peyton Jones [Tue, 21 Aug 2012 13:35:12 +0000 (14:35 +0100)]
Re-jig the reporting of names bound multiple times

Fixes Trac #7164

7 years agoReduce the likelihood of x64/x86-64 changes breaking the build on other arches (...
Erik de Castro Lopo [Tue, 7 Aug 2012 20:44:00 +0000 (06:44 +1000)]
Reduce the likelihood of x64/x86-64 changes breaking the build on other arches (#7083).

Code that needs to differentiate between i386 and x86-64 should now
be written as if x86-64 is the default and i386 is the special case.
Eg:

    # if i386_TARGET_ARCH
    someFuncion = .....
    # else
    someFuncion = .....
    # endif

7 years agoFix inverted test for platformUnregisterised (should fix the optllvm breakage)
Simon Marlow [Tue, 21 Aug 2012 11:48:34 +0000 (12:48 +0100)]
Fix inverted test for platformUnregisterised (should fix the optllvm breakage)

7 years agotidy up
Simon Marlow [Tue, 21 Aug 2012 11:26:16 +0000 (12:26 +0100)]
tidy up

7 years agoImprove compile times by enabling +RTS -H for GHC (only when bootstrapped)
Simon Marlow [Tue, 21 Aug 2012 10:57:55 +0000 (11:57 +0100)]
Improve compile times by enabling +RTS -H for GHC (only when bootstrapped)

7 years agoReduce fragmentation when using +RTS -H (with or without a size)
Simon Marlow [Tue, 21 Aug 2012 10:39:06 +0000 (11:39 +0100)]
Reduce fragmentation when using +RTS -H (with or without a size)

7 years agoimprove debug output
Simon Marlow [Tue, 21 Aug 2012 10:37:18 +0000 (11:37 +0100)]
improve debug output

7 years agoFix a discrepancy between two calculations of which generation to collect
Simon Marlow [Tue, 21 Aug 2012 08:58:35 +0000 (09:58 +0100)]
Fix a discrepancy between two calculations of which generation to collect

The calculation should be done in one place, of course.

7 years agomove startProfTimer() and stopProfTimer() to the public headers
Simon Marlow [Tue, 21 Aug 2012 08:48:22 +0000 (09:48 +0100)]
move startProfTimer() and stopProfTimer() to the public headers

7 years agoadd X86_64_GOTTPOFF relocation for errno
Simon Marlow [Mon, 20 Aug 2012 14:13:45 +0000 (15:13 +0100)]
add X86_64_GOTTPOFF relocation for errno

Submitted by: Markus Pfeiffer <markus.pfeiffer@morphism.de> on cvs-ghc

7 years agoRetain ordering of finalizers during GC (#7160)
Simon Marlow [Mon, 20 Aug 2012 12:52:07 +0000 (13:52 +0100)]
Retain ordering of finalizers during GC (#7160)

This came up since the addition of C finalizers, since Haskell
finalizers are already stored in an explicit list.  C finalizers on
the other hand get a WEAK object each, so in order to run them in the
right order we have to make sure that list stays in the correct
order.  I hate adding new invariants, but this is the quickest way to
fix the bug for now.  A better way to fix it would be to have a single
WEAK object with a list of finaliers attached to it, and a primop
for adding finalizers to the list.

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:05:28 +0000 (11:05 +0100)]
remove tabs

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:04:57 +0000 (11:04 +0100)]
remove tabs

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:04:15 +0000 (11:04 +0100)]
remove tabs

7 years agoAvoid the quadratic append trap in flattenCmmAGraph
Simon Marlow [Thu, 9 Aug 2012 09:43:59 +0000 (10:43 +0100)]
Avoid the quadratic append trap in flattenCmmAGraph

Fixes a perf problem in perf/compiler/T783

7 years agoExport startProfTimer and stopProfTimer symbols.
Paolo Capriotti [Mon, 20 Aug 2012 15:25:49 +0000 (16:25 +0100)]
Export startProfTimer and stopProfTimer symbols.

This fixes unresolved symbols error when dynamically linking base.

7 years agoProfiling: open .prof when -hr<cc> is specified
Takano Akio [Wed, 15 Aug 2012 02:16:40 +0000 (11:16 +0900)]
Profiling: open .prof when -hr<cc> is specified

The code for retainer profiling is used with e.g. +RTS -hc -hrfoo -RTS,
as well as with +RTS -hr -RTS.

7 years agoWhen pattern matching against a constructor with equalities,
Simon Peyton Jones [Mon, 20 Aug 2012 13:28:00 +0000 (14:28 +0100)]
When pattern matching against a constructor with equalities,
require either -XGADTs *or* -XTypeFamilies (rather than only the former)

Fixes Trac #7156

7 years agoImprove documentation for rank-1 types (Trac #7137)
Simon Peyton Jones [Mon, 20 Aug 2012 13:26:08 +0000 (14:26 +0100)]
Improve documentation for rank-1 types (Trac #7137)

7 years agoAllow a vew pattern or bang pattern in a record pattern.
Takano Akio [Thu, 16 Aug 2012 10:13:47 +0000 (11:13 +0100)]
Allow a vew pattern or bang pattern in a record pattern.

e.g.
        data T = MkT { x,y :: Int }

        f (MkT { x = !v, y = negate -> w }) = v + w

7 years agoUse TcMType.growThetaTyVars (which works) rather than TcSimplify.growPreds (which...
Simon Peyton Jones [Wed, 15 Aug 2012 17:10:54 +0000 (18:10 +0100)]
Use TcMType.growThetaTyVars (which works) rather than TcSimplify.growPreds (which doesn't)

I think this got left behind when we simplified and improved TcSimplify.  The effect
was that we had a function like
   class P a b | a -> b
   class Q b c | b -> c

   f :: (P a b, Q b c) => a -> a

and were were failing to quanitfy over 'c', even though it is (indirectly) determined
by 'a'.

This make Programatica fail to compile: Trac #7147

7 years agoTest FlexibleInstance not UndecidableInstances in the ambiguity check
Simon Peyton Jones [Wed, 15 Aug 2012 15:02:03 +0000 (16:02 +0100)]
Test FlexibleInstance not UndecidableInstances in the ambiguity check

Fixes Trac #7131

7 years agoRequire DataKinds for promoted list/tuple syntax in types
Simon Peyton Jones [Wed, 15 Aug 2012 15:01:19 +0000 (16:01 +0100)]
Require DataKinds for promoted list/tuple syntax in types

Fixes Trac #7151

7 years agoPut kind variables before type variables when quantifying
Simon Peyton Jones [Wed, 15 Aug 2012 14:59:26 +0000 (15:59 +0100)]
Put kind variables before type variables when quantifying

This is a pretty egregious error; I'm surprised it has lasted so long!

Fixes Trac #7124

7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Wed, 15 Aug 2012 13:24:43 +0000 (14:24 +0100)]
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoFix Trac #7145, by recording uses of constructor "children" in export lists
Simon Peyton Jones [Wed, 15 Aug 2012 13:24:26 +0000 (14:24 +0100)]
Fix Trac #7145, by recording uses of constructor "children" in export lists

7 years agoComments about shadowing
Simon Peyton Jones [Wed, 15 Aug 2012 13:23:42 +0000 (14:23 +0100)]
Comments about shadowing

7 years agoTH: Pragmas refactoring.
Mikhail Vorozhtsov [Tue, 10 Jul 2012 14:37:42 +0000 (21:37 +0700)]
TH: Pragmas refactoring.

Also adds RULES and 'SPECIALIZE instance' support.

7 years agoMake .t files when running haddock
Ian Lynagh [Tue, 14 Aug 2012 17:24:01 +0000 (18:24 +0100)]
Make .t files when running haddock

These files contain the "+RTS -t --machin-readable" output, so that
we can spot performance regressions.

7 years agoImprove documentation of the way that defaulting to IO happens in GHCi
Simon Peyton Jones [Tue, 14 Aug 2012 16:31:48 +0000 (17:31 +0100)]
Improve documentation of the way that defaulting to IO happens in GHCi

Thanks to John Hughes for the suggestion.

7 years agoDocument -fdefer-type-errors
Simon Peyton Jones [Tue, 14 Aug 2012 16:31:18 +0000 (17:31 +0100)]
Document -fdefer-type-errors

Thanks to Paolo for most of the work.

7 years agoBetter debug printing
Simon Peyton Jones [Tue, 14 Aug 2012 16:06:21 +0000 (17:06 +0100)]
Better debug printing

7 years agoComments
Simon Peyton Jones [Tue, 14 Aug 2012 16:06:10 +0000 (17:06 +0100)]
Comments

7 years agoFix Trac #7128, by zonking kind varaibles more assiduously when typechecking a class...
Simon Peyton Jones [Tue, 14 Aug 2012 16:06:00 +0000 (17:06 +0100)]
Fix Trac #7128, by zonking kind varaibles more assiduously when typechecking a class declaration

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 13 Aug 2012 21:52:17 +0000 (22:52 +0100)]
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoFix GHCi segfault during startup on linux-powerpc (#2972).
Erik de Castro Lopo [Mon, 30 Jul 2012 19:53:49 +0000 (05:53 +1000)]
Fix GHCi segfault during startup on linux-powerpc (#2972).

Slightly modified version of a patch from Ben Collins <bcollins@ubuntu.com>
who did the final debugging that showed the segfault was being caused the
memory protection mechanism.

Due to the requirement of "jump islands" to handle 24 bit relative jump
offsets, GHCi on PowerPC did not use mmap to load object files like the
other architectures. Instead, it allocated memory using malloc and fread
to load the object code. However there is a quirk in the GNU libc malloc
implementation. For memory regions over certain size (dynamic and
configurable), malloc will use mmap to obtain the required memory instead
of sbrk and malloc's call to mmap sets the memory readable and writable,
but not executable. That means when GHCi loads code into a memory region
that was mmapped instead of malloc-ed and tries to execute it we get a
segfault.

This solution drops the malloc/fread object loading in favour of using
mmap and then puts the jump island for each object code module at the
end of the mmaped region for that object.

This patch may also be a solution on other ELF based powerpc systems
but does not work on darwin-powerpc.

7 years agoFix environment update for type instance declarations in GHCi (#7117)
Paolo Capriotti [Mon, 13 Aug 2012 17:26:34 +0000 (18:26 +0100)]
Fix environment update for type instance declarations in GHCi (#7117)

Patch by Patrick Palka <patrick@parcs.ath.cx>

7 years agoGive suggestions for unrecognised command line arguments
Joachim Breitner [Thu, 9 Aug 2012 14:10:56 +0000 (16:10 +0200)]
Give suggestions for unrecognised command line arguments

7 years agoRespect verbosity for "flags changed" message (#7139)
Paolo Capriotti [Mon, 13 Aug 2012 12:36:38 +0000 (13:36 +0100)]
Respect verbosity for "flags changed" message (#7139)

Also, print that message on stdout.

7 years agoFix ambiguous flag resolution (#7138)
Paolo Capriotti [Mon, 13 Aug 2012 11:48:29 +0000 (12:48 +0100)]
Fix ambiguous flag resolution (#7138)

Pick longest flag when more than one matches in findArg.

This fixes an issue where -ignore-dot-ghci wasn't honored, because the
flag was parsed as "-i gnore-dot-ghci".

7 years agoUpdate 'unboxed tuples' section of users guide.
Austin Seipp [Sun, 5 Aug 2012 20:06:33 +0000 (15:06 -0500)]
Update 'unboxed tuples' section of users guide.

In particular, many of the restrictions on using unboxed tuples went
away thanks to Max Bolingbroke, and they can now be bound to variables
without pattern matching, and passed as arguments.

Also fix a little formatting in glasgow-exts.xml. Some other parts
of this section may be out of date.

Signed-off-by: Austin Seipp <mad.one@gmail.com>
7 years agoDon't pass -Wimplicit to the C++ compiler.
Austin Seipp [Sun, 5 Aug 2012 08:26:45 +0000 (03:26 -0500)]
Don't pass -Wimplicit to the C++ compiler.

Supresses an ugly warning from gcc 4.6+ saying this is a C/ObjC flag
only.

Signed-off-by: Austin Seipp <mad.one@gmail.com>