11 years agoInterruptible FFI calls with pthread_kill and CancelSynchronousIO. v4
Edward Z. Yang [Sun, 19 Sep 2010 00:29:05 +0000 (00:29 +0000)]
Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4

This is patch that adds support for interruptible FFI calls in the form
of a new foreign import keyword 'interruptible', which can be used
instead of 'safe' or 'unsafe'.  Interruptible FFI calls act like safe
FFI calls, except that the worker thread they run on may be interrupted.

Internally, it replaces BlockedOnCCall_NoUnblockEx with
BlockedOnCCall_Interruptible, and changes the behavior of the RTS
to not modify the TSO_ flags on the event of an FFI call from
a thread that was interruptible.  It also modifies the bytecode
format for foreign call, adding an extra Word16 to indicate

The semantics of interruption vary from platform to platform, but the
intent is that any blocking system calls are aborted with an error code.
This is most useful for making function calls to system library
functions that support interrupting.  There is no support for pre-Vista

There is a partner testsuite patch which adds several tests for this

11 years agoRemove ghc-pkg's dependency on haskell98
Ian Lynagh [Wed, 13 Oct 2010 19:43:56 +0000 (19:43 +0000)]
Remove ghc-pkg's dependency on haskell98

11 years agoBuild haskell98 and haskell2010 with stage2
Ian Lynagh [Wed, 13 Oct 2010 18:27:59 +0000 (18:27 +0000)]
Build haskell98 and haskell2010 with stage2
Stops us accidentally depending on them

11 years agoFix warning: Remove unused import
Ian Lynagh [Wed, 13 Oct 2010 14:12:24 +0000 (14:12 +0000)]
Fix warning: Remove unused import

11 years agoFix warnings [Wed, 13 Oct 2010 04:03:35 +0000 (04:03 +0000)]
Fix warnings

11 years agoRegAlloc: Track slot liveness over jumps in spill cleaner [Wed, 13 Oct 2010 01:54:14 +0000 (01:54 +0000)]
RegAlloc: Track slot liveness over jumps in spill cleaner

11 years agoBump Cabal dep
Ian Lynagh [Tue, 12 Oct 2010 15:45:28 +0000 (15:45 +0000)]
Bump Cabal dep

11 years agoRemove __HASKELL1__, __HASKELL98__, __CONCURRENT_HASKELL__
Ian Lynagh [Tue, 12 Oct 2010 13:47:00 +0000 (13:47 +0000)]
We used to define these CPP symbols, but nothing on hackage uses them
and the first 2 are no longer correct (as we support multiple Haskell

11 years agoFollow Cabal changes: Cabal no longer has a docbook userguide
Ian Lynagh [Tue, 12 Oct 2010 13:05:38 +0000 (13:05 +0000)]
Follow Cabal changes: Cabal no longer has a docbook userguide
For now we don't build the Cabal userguide, but we should add markdown
support so that we can do so.

11 years agoFix build on Windows: ghc-pkg/Main.hs needs ForeignFunctionInterface
Ian Lynagh [Tue, 12 Oct 2010 11:21:11 +0000 (11:21 +0000)]
Fix build on Windows: ghc-pkg/Main.hs needs ForeignFunctionInterface

11 years agoRemove unnecessary import
Ian Lynagh [Sun, 10 Oct 2010 22:22:31 +0000 (22:22 +0000)]
Remove unnecessary import

11 years agoMake "./validate --slow" run the full testsuite
Ian Lynagh [Thu, 7 Oct 2010 00:43:27 +0000 (00:43 +0000)]
Make "./validate --slow" run the full testsuite

11 years agoFix build following haskell98 and -fglasgow-exts changes
Ian Lynagh [Wed, 6 Oct 2010 16:06:56 +0000 (16:06 +0000)]
Fix build following haskell98 and -fglasgow-exts changes

11 years agoDon't automatically link the haskell98 package
Ian Lynagh [Wed, 6 Oct 2010 13:02:35 +0000 (13:02 +0000)]
Don't automatically link the haskell98 package
The default language is now Haskell2010, so this was a little odd.
Also, --make is now on by default, so this was largely irrelevant.

11 years agoDeprecate -fglasgow-exts
Ian Lynagh [Wed, 6 Oct 2010 12:44:13 +0000 (12:44 +0000)]
Deprecate -fglasgow-exts

11 years agoRemove Opt_GADTs and Opt_TypeFamilies from -fglasgow-exts
Ian Lynagh [Wed, 6 Oct 2010 12:20:00 +0000 (12:20 +0000)]
Remove Opt_GADTs and Opt_TypeFamilies from -fglasgow-exts
This means most code doesn't get caught by monomorphic local bindings.

11 years agoFix Trac #4360: omitted case in combineCtLoc [Fri, 8 Oct 2010 13:57:47 +0000 (13:57 +0000)]
Fix Trac #4360: omitted case in combineCtLoc

11 years agoBeautiful new approach to the skolem-escape check and untouchable [Fri, 8 Oct 2010 13:37:51 +0000 (13:37 +0000)]
Beautiful new approach to the skolem-escape check and untouchable

Instead of keeping a *set* of untouchable variables in each
implication contraints, we keep a *range* of uniques for the
*touchable* variables of an implication.  This are precisely
the ones we would call the "existentials" if we were French.

It turns out that the code is more efficient, and vastly easier
to get right, than the set-based approach.

Fixes Trac #4355 among others

11 years agoDo less simplification when doing let-generalisation [Fri, 8 Oct 2010 13:35:42 +0000 (13:35 +0000)]
Do less simplification when doing let-generalisation

This fixes Trac #4361.  In a rather delicate way, but
no more delicate than before.  A more remoseless typechecker
would reject #4361 altogether.

See Note [Avoid unecessary constraint simplification]

11 years agoSuppress ambiguity errors if any other errors occur [Fri, 8 Oct 2010 11:13:18 +0000 (11:13 +0000)]
Suppress ambiguity errors if any other errors occur

11 years agoFix Trac #4361: be more discerning when inferring types [Fri, 8 Oct 2010 11:12:27 +0000 (11:12 +0000)]
Fix Trac #4361: be more discerning when inferring types

Note [Avoid unecessary constraint simplification] in TcSimplify

11 years agoFloat out partial applications
Simon Marlow [Fri, 8 Oct 2010 09:27:09 +0000 (09:27 +0000)]
Float out partial applications

This fixes at least one case of performance regression in 7.0, and
is nice win on nofib:

        Program           Size    Allocs   Runtime   Elapsed
            Min          +0.3%    -63.0%    -38.5%    -38.7%
            Max          +1.2%     +0.2%     +0.9%     +0.9%
 Geometric Mean          +0.6%     -3.0%     -6.4%     -6.6%

11 years agoSuppress knock-on typechecker errors [Fri, 8 Oct 2010 09:43:48 +0000 (09:43 +0000)]
Suppress knock-on typechecker errors

The error cascade caused puzzling errors in T4093b, and
suppressing some seems like a good plan.  Very few test
outputs change.

11 years agoSome refactoring and simplification in TcInteract.occurCheck [Thu, 7 Oct 2010 16:35:00 +0000 (16:35 +0000)]
Some refactoring and simplification in TcInteract.occurCheck

11 years agoComments only [Thu, 7 Oct 2010 13:03:01 +0000 (13:03 +0000)]
Comments only

11 years agoImplement auto-specialisation of imported Ids [Thu, 7 Oct 2010 11:10:51 +0000 (11:10 +0000)]
Implement auto-specialisation of imported Ids

This big-ish patch arranges that if an Id 'f' is
  * Type-class overloaded
       f :: Ord a => [a] -> [a]
  * Defined with an INLINABLE pragma
       {-# INLINABLE f #-}
  * Exported from its defining module 'D'

then in any module 'U' that imports D

1. Any call of 'f' at a fixed type will generate
   (a) a specialised version of f in U
   (b) a RULE that rewrites unspecialised calls to the
       specialised on

  e.g. if the call is (f Int dOrdInt xs) then the
  specialiser will generate
     $sfInt :: [Int] -> [Int]
     $sfInt = <code for f, imported from D, specialised>
     {-# RULE forall d.  f Int d = $sfInt #-}

2. In addition, you can give an explicit {-# SPECIALISE -#}
   pragma for the imported Id
     {-# SPECIALISE f :: [Bool] -> [Bool] #-}
   This too generates a local specialised definition,
   and the corresponding RULE

The new RULES are exported from module 'U', so that any module
importing U will see the specialised versions of 'f', and will
not re-specialise them.

There's a flag -fwarn-auto-orphan that warns you if the auto-generated
RULES are orphan rules. It's not in -Wall, mainly to avoid lots of
error messages with existing packages.

Main implementation changes

 - A new flag on a CoreRule to say if it was auto-generated.
   This is persisted across interface files, so there's a small
   change in interface file format.

 - Quite a bit of fiddling with plumbing, to get the
   {-# SPECIALISE #-} pragmas for imported Ids.  In particular, a
   new field tgc_imp_specs in TcGblEnv, to keep the specialise
   pragmas for imported Ids between the typechecker and the desugarer.

 - Some new code (although surprisingly little) in Specialise,
   to deal with calls of imported Ids

11 years agoMake NameEnv back into type NameEnv a = UniqFM a [Thu, 7 Oct 2010 10:46:38 +0000 (10:46 +0000)]
Make NameEnv back into type NameEnv a = UniqFM a

I don't think the type distinction of declaring NameEnv with a newtype
(as it was) is really useful to us. Moreover, VarEnv is a UniqFM, and
I do sometimes want to build an envt with Ids and look up with Names.

This may not be the last word on the subject.

11 years agoImprove the rule-matcher [Thu, 7 Oct 2010 10:37:00 +0000 (10:37 +0000)]
Improve the rule-matcher

Previously it was rejecting the match

  Template: forall s t. map s t
  Actual:   map Int t

which should obviously be fine.  It turns out that this kind of match
comes up when specialising.  By freshening that t we could avoid the
difficulty, but morally the (forall t) binds t and the rule should
be alpha-equivalent regardless of the forall'd variables.

This patch makes it so, and incidentally makes matching a little
more efficient.  See Note [Eta expansion] in VarEnv.

11 years agoFix Trac #4345: simplifier bug [Thu, 7 Oct 2010 10:27:20 +0000 (10:27 +0000)]
Fix Trac #4345: simplifier bug

This is another long-standing bug, in which there was a possibility
that a loop-breaker could lose its loop-breaker-hood OccInfo,
and then the simplifer re-simplified the expression. Result, either
non-termination or, in the case of #4345, an unbound identifier.

The fix is very simple, in Id.transferPolyIdInfo.
See Note [transferPolyIdInfo].

11 years agoAvoid redundant simplification [Thu, 7 Oct 2010 09:59:35 +0000 (09:59 +0000)]
Avoid redundant simplification

When adding specialisation for imported Ids, I noticed that the
Glorious Simplifier was repeatedly (and fruitlessly) simplifying the
same term.  It turned out to be easy to fix this, because I already
had a flag in the ApplyTo and Select constructors of SimplUtils.SimplCont.

See Note [Avoid redundant simplification]

11 years agoMake the occurrence analyser deal correctly with RULES for imported Ids [Thu, 7 Oct 2010 09:41:00 +0000 (09:41 +0000)]
Make the occurrence analyser deal correctly with RULES for imported Ids

This patch fixes a long-standing lurking bug, but it surfaced when I
was adding specialisation for imported Ids.

See Note [ImpRuleUsage], which explains the issue.   The solution
seems more complicated than the problem really deserves, but I
could not think of a simpler way, so I just bit the bullet and
wrote the code.  Improvements welcome.

11 years agoMake warning-free [Thu, 7 Oct 2010 09:20:07 +0000 (09:20 +0000)]
Make warning-free

11 years agoThis is just white-space and layout [Thu, 7 Oct 2010 09:16:18 +0000 (09:16 +0000)]
This is just white-space and layout

(At least, I don't think there is anything else.)

11 years agoFix an ASSERT failure in FamInstEnv [Thu, 7 Oct 2010 09:13:27 +0000 (09:13 +0000)]
Fix an ASSERT failure in FamInstEnv

I added a lot of comments too, to explain the preconditions;
esp Note [FamInstEnv]

11 years agoFix a looping bug in the new occur-check code [Thu, 7 Oct 2010 08:41:04 +0000 (08:41 +0000)]
Fix a looping bug in the new occur-check code

11 years agoFix test T4235 with -O [Wed, 6 Oct 2010 15:52:23 +0000 (15:52 +0000)]
Fix test T4235 with -O

The tag2Enum rule wasn't doing the right thing for
enumerations with a phantom type parameter, like
   data T a = A | B

11 years agoMake warning-free [Wed, 6 Oct 2010 15:50:33 +0000 (15:50 +0000)]
Make warning-free

11 years agoMajor bugfixing pass through the type checker [Wed, 6 Oct 2010 15:28:54 +0000 (15:28 +0000)]
Major bugfixing pass through the type checker

11 years agoTypechecker performance fixes and flatten skolem bugfixing [Mon, 4 Oct 2010 13:02:00 +0000 (13:02 +0000)]
Typechecker performance fixes and flatten skolem bugfixing

11 years agoPerformance bug fixes [Thu, 23 Sep 2010 14:39:18 +0000 (14:39 +0000)]
Performance bug fixes

11 years agoFix Trac #4371: matching of view patterns [Wed, 6 Oct 2010 11:53:16 +0000 (11:53 +0000)]
Fix Trac #4371: matching of view patterns

11 years agoRemove unused NoMatchContext construtor [Wed, 6 Oct 2010 11:52:51 +0000 (11:52 +0000)]
Remove unused NoMatchContext construtor

11 years agoRefactoring: mainly rename ic_env_tvs to ic_untch [Wed, 6 Oct 2010 10:28:30 +0000 (10:28 +0000)]
Refactoring: mainly rename ic_env_tvs to ic_untch

Plus remember to zonk the free_tvs in TcUnify.newImplication

11 years agoremove unnecessary/broken definition of mask_
Simon Marlow [Sat, 2 Oct 2010 19:51:18 +0000 (19:51 +0000)]
remove unnecessary/broken definition of mask_

11 years ago-fwarn-tabs: add "Warning" to the message
Simon Marlow [Sat, 2 Oct 2010 19:51:00 +0000 (19:51 +0000)]
-fwarn-tabs: add "Warning" to the message

11 years agogive a better error message in the non-threaded RTS for out-of-range FDs
Simon Marlow [Wed, 29 Sep 2010 21:29:16 +0000 (21:29 +0000)]
give a better error message in the non-threaded RTS for out-of-range FDs

# ./aw
aw: file descriptor 1027 out of range for select (0--1024).
Recompile with -threaded to work around this.

11 years agoFix a very rare crash in GHCi
Simon Marlow [Tue, 5 Oct 2010 14:47:35 +0000 (14:47 +0000)]
Fix a very rare crash in GHCi
When a BCO with a zero-length bitmap was right at the edge of
allocated memory, we were reading a word of non-existent memory.

This showed up as a segfault in T789(ghci) for me, but the crash was
extremely sensitive and went away with most changes.

Also, optimised scavenge_large_bitmap a bit while I was in there.

11 years agoUsing 'stdcall' when it is not supported is only a warning now (#3336)
Simon Marlow [Fri, 24 Sep 2010 15:24:45 +0000 (15:24 +0000)]
Using 'stdcall' when it is not supported is only a warning now (#3336)

11 years agoremove unnecessary stg_noForceIO (#3508)
Simon Marlow [Fri, 24 Sep 2010 15:02:02 +0000 (15:02 +0000)]
remove unnecessary stg_noForceIO (#3508)

11 years agoReplace an outputStr with putStrLn calls; fixes #4332
Ian Lynagh [Sun, 3 Oct 2010 12:57:07 +0000 (12:57 +0000)]
Replace an outputStr with putStrLn calls; fixes #4332

11 years agomake test and fulltest targets in the main Makefile; fixes #4297
Ian Lynagh [Thu, 30 Sep 2010 22:47:41 +0000 (22:47 +0000)]
make test and fulltest targets in the main Makefile; fixes #4297
You can now run "make test" in the root, and the fast testsuite will be
run with cleaning enabled. It will also put the summary in

11 years agoDon't show the loaded packages in ":show packages"; fixes #4300
Ian Lynagh [Thu, 30 Sep 2010 21:01:28 +0000 (21:01 +0000)]
Don't show the loaded packages in ":show packages"; fixes #4300
It's never worked properly, and the information is in ":show linker".

11 years agoHandle EXTRA_LIBRARIES when building programs
Ian Lynagh [Thu, 30 Sep 2010 19:25:52 +0000 (19:25 +0000)]
Handle EXTRA_LIBRARIES when building programs
And set hp2ps's EXTRA_LIBRARIES. Based on a patch from Sergei Trofimovich.

11 years agoFix the doc directory on Windows
Ian Lynagh [Wed, 29 Sep 2010 13:33:28 +0000 (13:33 +0000)]
Fix the doc directory on Windows

11 years agoRemove an unused import on Windows
Ian Lynagh [Wed, 29 Sep 2010 00:00:24 +0000 (00:00 +0000)]
Remove an unused import on Windows

11 years agoUse showCommandForUser when showing tracing commands
Ian Lynagh [Tue, 28 Sep 2010 23:58:44 +0000 (23:58 +0000)]
Use showCommandForUser when showing tracing commands

11 years agoFix hsc2hs docs: 'gcc' is now the default compiler, not 'ghc'; fixes #4341
Ian Lynagh [Tue, 28 Sep 2010 20:19:38 +0000 (20:19 +0000)]
Fix hsc2hs docs: 'gcc' is now the default compiler, not 'ghc'; fixes #4341

11 years agoUse an empty signal handler for SIGPIPE instead of SIG_IGN
Simon Marlow [Sat, 25 Sep 2010 19:35:48 +0000 (19:35 +0000)]
Use an empty signal handler for SIGPIPE instead of SIG_IGN

This is so that the SIGPIPE handler gets reset to the default
automatically on exec().

11 years agoFix the TH deps
Ian Lynagh [Sat, 25 Sep 2010 21:00:29 +0000 (21:00 +0000)]
Fix the TH deps

11 years agoCheck inplace doesn't exist before we try to create it
Ian Lynagh [Fri, 24 Sep 2010 19:18:58 +0000 (19:18 +0000)]
Check inplace doesn't exist before we try to create it
This fixes rerunning configure in a tree which already has an inplace
directory. Edward Z Yang ran into this; I guess whether it actually
fails depends on details of your installation, or we'd have run into
it sooner.

11 years agoFix an egregious bug: INLINE pragmas on monomorphic Ids were being ignored [Fri, 24 Sep 2010 15:58:15 +0000 (15:58 +0000)]
Fix an egregious bug: INLINE pragmas on monomorphic Ids were being ignored

I had do to some refactoring to make this work nicely
but now it does. I can't think how this escaped our
attention for so long!

11 years agoEta expand only lambdas that bind a non-dictionary Id [Fri, 24 Sep 2010 15:57:07 +0000 (15:57 +0000)]
Eta expand only lambdas that bind a non-dictionary Id

See Note [When to eta expand]. The idea is that dictionary
lambdas are invisible to the user, so we shouldn't eta
expand them.

11 years agoAdd a comment [Fri, 24 Sep 2010 15:56:20 +0000 (15:56 +0000)]
Add a comment

11 years agoAdd a debug print [Fri, 24 Sep 2010 15:56:14 +0000 (15:56 +0000)]
Add a debug print

11 years agoJust moving comments around [Fri, 24 Sep 2010 15:56:00 +0000 (15:56 +0000)]
Just moving comments around

11 years agouse putStrLn instead of Haskeline's outputStrLn
Simon Marlow [Fri, 24 Sep 2010 13:31:54 +0000 (13:31 +0000)]
use putStrLn instead of Haskeline's outputStrLn
use of the latter caused problems for Claus Reinke's macros that
redirect stdout.

11 years agoChange "OPTIONS" to "OPTIONS_GHC" in error messages; fixes #4327
Ian Lynagh [Fri, 24 Sep 2010 12:04:23 +0000 (12:04 +0000)]
Change "OPTIONS" to "OPTIONS_GHC" in error messages; fixes #4327

11 years agoAdd deps for TH uses in vector
Ian Lynagh [Thu, 23 Sep 2010 22:02:44 +0000 (22:02 +0000)]
Add deps for TH uses in vector

11 years agoBump Cabal dep
Ian Lynagh [Thu, 23 Sep 2010 14:32:41 +0000 (14:32 +0000)]
Bump Cabal dep

11 years agoUpdate Cabal's version number
Ian Lynagh [Thu, 23 Sep 2010 14:17:19 +0000 (14:17 +0000)]
Update Cabal's version number

11 years agoBuild primitive with stage2
Ian Lynagh [Thu, 23 Sep 2010 14:05:25 +0000 (14:05 +0000)]
Build primitive with stage2

11 years agoFix the Windows __chkstk build error (missing Linker symbol)
Simon Marlow [Fri, 24 Sep 2010 11:38:37 +0000 (11:38 +0000)]
Fix the Windows __chkstk build error (missing Linker symbol)

11 years agoemit a helpful error message for missing DPH packages
Simon Marlow [Thu, 23 Sep 2010 14:19:57 +0000 (14:19 +0000)]
emit a helpful error message for missing DPH packages

11 years agoFix computation of installed packages [Fri, 24 Sep 2010 08:47:37 +0000 (08:47 +0000)]
Fix computation of installed packages

This is a follow-on to Simon's patch yesterday, developed
with him.  It cleans up the computation of how packages
are installed, and installs the right ones.

11 years agoFix braino in WwLib/Literal patch [Fri, 24 Sep 2010 07:09:14 +0000 (07:09 +0000)]
Fix braino in WwLib/Literal patch

11 years agoFor now, switch off incomplete-pattern warnings in containers [Thu, 23 Sep 2010 13:01:17 +0000 (13:01 +0000)]
For now, switch off incomplete-pattern warnings in containers

Put it back on when my patch is applied to the containers repo.
(the one that removes two refuable lambdas)

11 years agoMake -funfolding-dict-threshold work properly [Thu, 23 Sep 2010 13:00:32 +0000 (13:00 +0000)]
Make -funfolding-dict-threshold work properly

and increase its default value. This makes overloaded functions
a bit keener to inline.  Which fixes Trac #4321

11 years agoImpredicative types is no longer deprecated [Thu, 23 Sep 2010 12:59:10 +0000 (12:59 +0000)]
Impredicative types is no longer deprecated

11 years agoDo not make FunctionalDependencies force MonoLocalBinds [Thu, 23 Sep 2010 12:59:00 +0000 (12:59 +0000)]
Do not make FunctionalDependencies force MonoLocalBinds

11 years agomove CHECKED settings to the right place
Simon Marlow [Thu, 23 Sep 2010 12:35:58 +0000 (12:35 +0000)]
move CHECKED settings to the right place

11 years agoturn off -Werror for primitive and vector
Simon Marlow [Thu, 23 Sep 2010 12:20:55 +0000 (12:20 +0000)]
turn off -Werror for primitive and vector

11 years agoAdd primitive and vector packages for DPH support
Simon Marlow [Thu, 23 Sep 2010 10:45:42 +0000 (10:45 +0000)]
Add primitive and vector packages for DPH support
DPH is now using the public vector package instead of its internal

vector and primitive are not "boot" packages; they aren't required to
build GHC, but they are required to validate (because we include DPH
when validating).

If you say './darcs-all get --no-dph' then you don't get DPH, vector,
or primitive.

11 years agoRefactoring and tidy up in the build system
Simon Marlow [Thu, 23 Sep 2010 09:56:42 +0000 (09:56 +0000)]
Refactoring and tidy up in the build system

Instead of the ghc-stage and ghc-stage2-package files in a package, we
now have a list of these in  There are other similar lists (of
boot-packages and non-installable packages), so this is not too bad,
and is simpler.

While poking around in the top-level file I spotted various
opportunities to clean up and re-order some of the cruft that has
accumulated over time.

11 years agoAllow absent State# RealWorld arguments [Thu, 23 Sep 2010 11:13:56 +0000 (11:13 +0000)]
Allow absent State# RealWorld arguments

11 years agoAdd notSCCNote, and use it [Thu, 23 Sep 2010 10:59:49 +0000 (10:59 +0000)]
Add notSCCNote, and use it

The point here is that SCCs get in the way of eta
expansion and we must treat them uniformly.

11 years agoRemove use of lambda with a refutable pattern [Thu, 23 Sep 2010 10:59:01 +0000 (10:59 +0000)]
Remove use of lambda with a refutable pattern

11 years agoAvoid ASSERT black hole [Thu, 23 Sep 2010 10:58:20 +0000 (10:58 +0000)]
Avoid ASSERT black hole

When this ASSERT tripped in CoreToStg it tried to print out
too much, which tripped the asssertion again.  Result: an
infinite loop with no output at all.  Hard to debug!

11 years agoRejig the absent-arg stuff for unlifted types [Thu, 23 Sep 2010 10:57:32 +0000 (10:57 +0000)]
Rejig the absent-arg stuff for unlifted types

This is what was giving the "absent entered" messages
See Note [Absent errors] in WwLib.  We now return a
suitable literal for absent values of unlifted type.

11 years agoRemove -fwarn-simple-patterns, and make -fwarn-incomplete-patterns include lambdas [Wed, 22 Sep 2010 13:39:34 +0000 (13:39 +0000)]
Remove -fwarn-simple-patterns, and make -fwarn-incomplete-patterns include lambdas

This makes
     \(x:xs) -> e
want when you have -fwarn-incomplete-patterns, which is consistent.

11 years agoGet rid of non-exhaustive lambda [Wed, 22 Sep 2010 13:38:01 +0000 (13:38 +0000)]
Get rid of non-exhaustive lambda

11 years agoFix an ASSERT failure with profiling [Wed, 22 Sep 2010 13:37:41 +0000 (13:37 +0000)]
Fix an ASSERT failure with profiling

The problem arose with this kind of thing

   x = (,) (scc "blah" Nothing)

Then 'x' is marked NoCafRefs by CoreTidy, becuase it has
arity 1, and doesn't mention any caffy things.

That in turns means that CorePrep must not float out the
sat binding to give

  sat = scc "blah" Nothing
  x = (,) sat

Rather we must generate

  x = \eta. let sat = scc "blah" Nothing
            in (,) sat eta

URGH! This Caf stuff is such a mess.

11 years agoRemove an out of date paragraph from the user guide; fixes #4331
Ian Lynagh [Wed, 22 Sep 2010 22:52:39 +0000 (22:52 +0000)]
Remove an out of date paragraph from the user guide; fixes #4331

11 years agoFix bindisttest when GhcProfiled = YES
Ian Lynagh [Tue, 21 Sep 2010 22:26:34 +0000 (22:26 +0000)]
Fix bindisttest when GhcProfiled = YES

11 years agoFixes for when HADDOCK_DOCS=NO
Ian Lynagh [Tue, 21 Sep 2010 21:39:16 +0000 (21:39 +0000)]
Fixes for when HADDOCK_DOCS=NO

11 years agoBump version to 7.1
Ian Lynagh [Tue, 21 Sep 2010 19:59:35 +0000 (19:59 +0000)]
Bump version to 7.1

11 years agoDon't use -march=i686 on powerpc-apple-darwin
Ian Lynagh [Tue, 21 Sep 2010 19:37:21 +0000 (19:37 +0000)]
Don't use -march=i686 on powerpc-apple-darwin
Thorikil ran into this when doing a PPC OS X build. We now also don't
use -m32 on PPC/OSX, but I don't think it should be necessary. We can
add it back if it does turn out to be.

11 years agoadd a simple trace facility to the build system
Simon Marlow [Tue, 21 Sep 2010 13:47:29 +0000 (13:47 +0000)]
add a simple trace facility to the build system


  make TRACE=1

prints most of the macro calls and their arguments.  It's easy to
trace new macros; see rules/

11 years agofix building with extra packages (packages were added to BUILD_DIRS twice)
Simon Marlow [Tue, 21 Sep 2010 10:01:53 +0000 (10:01 +0000)]
fix building with extra packages (packages were added to BUILD_DIRS twice)
Also add some comments about what extra-packages is doing

11 years agoadd extra packages to $(EXTRA_PACKAGES), so we avoid installing them by default
Simon Marlow [Mon, 20 Sep 2010 14:43:07 +0000 (14:43 +0000)]
add extra packages to $(EXTRA_PACKAGES), so we avoid installing them by default

11 years agoFix indexing error in archive loader
Ian Lynagh [Tue, 21 Sep 2010 12:16:42 +0000 (12:16 +0000)]
Fix indexing error in archive loader