ghc-hetmet.git
11 years agoDon't look through SCC in exprIsConApp_maybe
simonpj@microsoft.com [Tue, 26 Oct 2010 08:07:54 +0000 (08:07 +0000)]
Don't look through SCC in exprIsConApp_maybe

By not taking account of SCC notes we were inadvertently
discarding some, which led to mis-counted entries with -O

Should fix (part of) Trac #4414

11 years agoMake isIrrefutableHsPat say True for existentials; fixes Trac #4439
simonpj@microsoft.com [Tue, 26 Oct 2010 07:04:05 +0000 (07:04 +0000)]
Make isIrrefutableHsPat say True for existentials; fixes Trac #4439

At last. A bug that is really easy to fix.

11 years agoSerialise nested unfoldings across module boundaries
simonpj@microsoft.com [Mon, 25 Oct 2010 15:28:17 +0000 (15:28 +0000)]
Serialise nested unfoldings across module boundaries

As Roman reported in #4428, nested let-bindings weren't
being recorded with their unfoldings.  Needless to say,
fixing this had more knock-on effects than I expected.

11 years agoDo not (ever) use substExprSC in the simplifier
simonpj@microsoft.com [Mon, 25 Oct 2010 15:26:22 +0000 (15:26 +0000)]
Do not (ever) use substExprSC in the simplifier

"Short-cut" substitution means "do nothing if the substitution
is empty". We *never* want do to that in the simplifier because
even though the substitution is empty, the in-scope set has
useful information:

 * We get up-to-date unfoldings; and that in turn may
   reduce the number of iterations of the simplifier

 * We avoid space leaks, because failing to substitute may
   hang on to old Ids from a previous iteration

(This is what was causing the late inlining of foo in
Trac #4428.)

11 years agoUse new showMultiLineString to fix Trac #4436
simonpj@microsoft.com [Mon, 25 Oct 2010 15:12:36 +0000 (15:12 +0000)]
Use new showMultiLineString to fix Trac #4436

There is an accompanying patch for libraries
    base
    template-haskell

11 years agoFor a non-recursive let, make sure we extend the value environment
simonpj@microsoft.com [Mon, 25 Oct 2010 14:31:08 +0000 (14:31 +0000)]
For a non-recursive let, make sure we extend the value environment

This has been wrong for a long time.  Fixes Trac #4431.

11 years agoinstance Outputable IntMap
simonpj@microsoft.com [Mon, 25 Oct 2010 14:07:04 +0000 (14:07 +0000)]
instance Outputable IntMap

11 years agoMake the ffi.h->ffitarget.h dep a proper dep, rather than an order-only dep
Ian Lynagh [Sun, 24 Oct 2010 13:40:52 +0000 (13:40 +0000)]
Make the ffi.h->ffitarget.h dep a proper dep, rather than an order-only dep

11 years agolibffi: missing dependency on ffitarget.h
pho@cielonegro.org [Sun, 17 Oct 2010 11:33:21 +0000 (11:33 +0000)]
libffi: missing dependency on ffitarget.h
dist-install/build/ffi.h should have a dependency on ffitarget.h as *_stub.c requires it during the stage-2 build.

11 years agoRemove the need to explicitly flatten the dynflags
Ian Lynagh [Sat, 23 Oct 2010 21:04:42 +0000 (21:04 +0000)]
Remove the need to explicitly flatten the dynflags

11 years agoFollow GHC.Bool/GHC.Types merge
Ian Lynagh [Sat, 23 Oct 2010 16:54:22 +0000 (16:54 +0000)]
Follow GHC.Bool/GHC.Types merge

11 years agoDon't build packages that need TH if we are making a profiling compiler
Ian Lynagh [Sat, 23 Oct 2010 14:56:00 +0000 (14:56 +0000)]
Don't build packages that need TH if we are making a profiling compiler
You can't use TH with a profiling compiler.

11 years agoOS X uninstaller: Pass create-links its argument
Ian Lynagh [Sat, 23 Oct 2010 12:44:00 +0000 (12:44 +0000)]
OS X uninstaller: Pass create-links its argument

11 years agoTweak the OS X installer uninstaller script
Ian Lynagh [Sat, 23 Oct 2010 00:09:51 +0000 (00:09 +0000)]
Tweak the OS X installer uninstaller script

11 years agoImprove the OS X installer
Ian Lynagh [Fri, 22 Oct 2010 22:31:04 +0000 (22:31 +0000)]
Improve the OS X installer
Major changes are:
* Version number now includes full GHC version and arch
* Uninstaller copes with multiple versions

11 years agoOptimised the representation of Inert Sets to use Maps to get to the relevant inert...
dimitris@microsoft.com [Fri, 22 Oct 2010 12:58:40 +0000 (12:58 +0000)]
Optimised the representation of Inert Sets to use Maps to get to the relevant inert constraint faster.

11 years agoAdd rebindable syntax for if-then-else
simonpj@microsoft.com [Fri, 22 Oct 2010 14:34:00 +0000 (14:34 +0000)]
Add rebindable syntax for if-then-else

There are two main changes

 * New LANGUAGE option RebindableSyntax, which implies NoImplicitPrelude

 * if-the-else becomes rebindable, with function name "ifThenElse"
   (but case expressions are unaffected)

Thanks to Sam Anklesaria for doing most of the work here

11 years agoLint should check for duplicate top-level bindings with same qualified name
simonpj@microsoft.com [Fri, 22 Oct 2010 07:24:05 +0000 (07:24 +0000)]
Lint should check for duplicate top-level bindings with same qualified name

This would have produced a more civilised error for Trac #4396

11 years agoFix unused import warning on OS X
Ian Lynagh [Fri, 22 Oct 2010 13:40:24 +0000 (13:40 +0000)]
Fix unused import warning on OS X

11 years agoSwitch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupply
Ian Lynagh [Thu, 21 Oct 2010 14:28:24 +0000 (14:28 +0000)]
Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupply

11 years agoWhitespace only
Ian Lynagh [Thu, 21 Oct 2010 13:55:51 +0000 (13:55 +0000)]
Whitespace only

11 years agoWhitespace only
Ian Lynagh [Thu, 21 Oct 2010 13:44:04 +0000 (13:44 +0000)]
Whitespace only

11 years agoWhitespace only
Ian Lynagh [Thu, 21 Oct 2010 13:41:33 +0000 (13:41 +0000)]
Whitespace only

11 years agoWindows installer improvements from Claus
Ian Lynagh [Thu, 21 Oct 2010 12:29:42 +0000 (12:29 +0000)]
Windows installer improvements from Claus
- add link to inno setup docs, so readers don't have to guess what
  ghc.iss might be

- add Task section, and associated most Registry actions with separate
  (sub)tasks, so that file associations, default action, and PATH
  setting can be optional

- copy license file into doc directory

- install icon file again, so that DefaultIcon is no longer a dangling
  pointer (#4352)

- only delete ghc_haskell key if empty (in case there were other tools
  using it)

- add versioned GHCi to right-click menu (to allow for multiple tool installs)

11 years agoFix Trac #4396, by localising pattern binders in the desugarer
simonpj@microsoft.com [Thu, 21 Oct 2010 17:03:24 +0000 (17:03 +0000)]
Fix Trac #4396, by localising pattern binders in the desugarer

See Note [Localise pattern binders]

11 years agoWhite space only
simonpj@microsoft.com [Thu, 21 Oct 2010 17:02:32 +0000 (17:02 +0000)]
White space only

11 years agoAdd an assertion
simonpj@microsoft.com [Thu, 21 Oct 2010 17:02:22 +0000 (17:02 +0000)]
Add an assertion

11 years agoUse takeUniqFromSupply in ByteCodeGen
Ian Lynagh [Thu, 21 Oct 2010 12:14:54 +0000 (12:14 +0000)]
Use takeUniqFromSupply in ByteCodeGen

11 years agoFix some whitespace
Ian Lynagh [Thu, 21 Oct 2010 12:10:59 +0000 (12:10 +0000)]
Fix some whitespace

11 years agoUse takeUniqFromSupply in emitProcWithConvention
Ian Lynagh [Thu, 21 Oct 2010 12:08:53 +0000 (12:08 +0000)]
Use takeUniqFromSupply in emitProcWithConvention
We were using the supply's unique, and then passing the same supply to
initUs_, which sounds like a bug waiting to happen.

11 years agoUse takeUniqFromSupply in IfaceEnv
Ian Lynagh [Thu, 21 Oct 2010 12:03:04 +0000 (12:03 +0000)]
Use takeUniqFromSupply in IfaceEnv
This is a little nicer than having to explicitly split supplies and
throw half of them away.

11 years agoDefine takeUniqFromSupply
Ian Lynagh [Thu, 21 Oct 2010 11:58:22 +0000 (11:58 +0000)]
Define takeUniqFromSupply

11 years agoRemove some extraneous whitespace
Ian Lynagh [Thu, 21 Oct 2010 11:56:00 +0000 (11:56 +0000)]
Remove some extraneous whitespace

11 years agoAdd a comment on why some seq's are done
Ian Lynagh [Thu, 21 Oct 2010 11:34:04 +0000 (11:34 +0000)]
Add a comment on why some seq's are done

11 years agoTidy up RuntimeUnkSkols a bit more
simonpj@microsoft.com [Thu, 21 Oct 2010 10:06:40 +0000 (10:06 +0000)]
Tidy up RuntimeUnkSkols a bit more

11 years agoFix haddock markup
simonpj@microsoft.com [Thu, 21 Oct 2010 08:54:20 +0000 (08:54 +0000)]
Fix haddock markup

11 years agoImprove rule checking, to fix panic Trac #4398
simonpj@microsoft.com [Thu, 21 Oct 2010 08:54:02 +0000 (08:54 +0000)]
Improve rule checking, to fix panic Trac #4398

Lots of comments with decomposeRuleLhs

11 years agoImprove the simple expression optimiser so it does simple beta reduction
simonpj@microsoft.com [Thu, 21 Oct 2010 08:50:30 +0000 (08:50 +0000)]
Improve the simple expression optimiser so it does simple beta reduction

11 years agoTemplate Haskell: add view patterns (Trac #2399)
Reiner Pope [Sun, 10 Oct 2010 13:17:20 +0000 (13:17 +0000)]
Template Haskell: add view patterns (Trac #2399)

11 years agoTidy-up sweep, following the Great Skolemisation Simplification
simonpj@microsoft.com [Thu, 21 Oct 2010 07:08:37 +0000 (07:08 +0000)]
Tidy-up sweep, following the Great Skolemisation Simplification

11 years agoFix haddock markup
Ian Lynagh [Wed, 20 Oct 2010 15:19:52 +0000 (15:19 +0000)]
Fix haddock markup

11 years agoTweak the haddock rules; no functional change
Ian Lynagh [Wed, 20 Oct 2010 15:16:36 +0000 (15:16 +0000)]
Tweak the haddock rules; no functional change

11 years agoDon't seq unfoldings
Ian Lynagh [Wed, 20 Oct 2010 14:37:10 +0000 (14:37 +0000)]
Don't seq unfoldings
We generate intermediate unfoldings which are just thrown away, so
evaluating them is a waste of time.

11 years agoAvoid hanging on to old unfoldings; fixes #4367 (compiler space regression)
Ian Lynagh [Wed, 20 Oct 2010 13:15:39 +0000 (13:15 +0000)]
Avoid hanging on to old unfoldings; fixes #4367 (compiler space regression)

11 years agoComments and layout only
simonpj@microsoft.com [Wed, 20 Oct 2010 13:24:38 +0000 (13:24 +0000)]
Comments and layout only

11 years agoLook for sources in Cabal's autogen directory too
Ian Lynagh [Wed, 20 Oct 2010 10:47:59 +0000 (10:47 +0000)]
Look for sources in Cabal's autogen directory too

11 years agoFollow Cabal change: Use usedExtensions rather than extensions
Ian Lynagh [Wed, 20 Oct 2010 10:47:39 +0000 (10:47 +0000)]
Follow Cabal change: Use usedExtensions rather than extensions

11 years agofix markup
Simon Marlow [Wed, 20 Oct 2010 12:31:16 +0000 (12:31 +0000)]
fix markup

11 years agoremove xref to hasktags
Simon Marlow [Wed, 20 Oct 2010 12:31:06 +0000 (12:31 +0000)]
remove xref to hasktags

11 years agoUpdate the documentation on using DLL's from Windows, fixing several errors, in parti...
Neil Mitchell [Sun, 10 Oct 2010 10:07:09 +0000 (10:07 +0000)]
Update the documentation on using DLL's from Windows, fixing several errors, in particular those relating to bug 3605

11 years ago(1) More lenient kind checking, (2) Fixed orientation problems and avoiding double...
dimitris@microsoft.com [Wed, 20 Oct 2010 11:55:26 +0000 (11:55 +0000)]
(1) More lenient kind checking, (2) Fixed orientation problems and avoiding double unifications, (3) Comments

11 years agoMidstream changes to deal with spontaneous solving and flatten skolem equivalence...
dimitris@microsoft.com [Tue, 19 Oct 2010 17:15:14 +0000 (17:15 +0000)]
Midstream changes to deal with spontaneous solving and flatten skolem equivalence classes

11 years agohasktags was dropped in GHC 6.12, remove it from the docs
Simon Marlow [Mon, 18 Oct 2010 08:44:01 +0000 (08:44 +0000)]
hasktags was dropped in GHC 6.12, remove it from the docs

11 years agoRefactor, plus fix Trac #4418
simonpj@microsoft.com [Wed, 20 Oct 2010 09:09:46 +0000 (09:09 +0000)]
Refactor, plus fix Trac #4418

We weren't doing fundeps for derived superclasses

11 years agoAdd a comment, connecting the seq to the test (#4367) that shows its usefulness
simonpj@microsoft.com [Wed, 20 Oct 2010 07:59:41 +0000 (07:59 +0000)]
Add a comment, connecting the seq to the test (#4367) that shows its usefulness

11 years agoDefine setIdUnfoldingLazily, and use it in Vectorise
Ian Lynagh [Tue, 19 Oct 2010 20:15:37 +0000 (20:15 +0000)]
Define setIdUnfoldingLazily, and use it in Vectorise
Fixes a loop in the compiler, when running the dph tests

11 years agoEvaluate the results in coreToStgApp
Ian Lynagh [Tue, 19 Oct 2010 17:05:32 +0000 (17:05 +0000)]
Evaluate the results in coreToStgApp

11 years agoRetab CoreToStg, and remove trailing whitespace
Ian Lynagh [Tue, 19 Oct 2010 15:55:30 +0000 (15:55 +0000)]
Retab CoreToStg, and remove trailing whitespace

11 years agoseq the unfolding in setUnfoldingInfo
Ian Lynagh [Tue, 19 Oct 2010 15:45:52 +0000 (15:45 +0000)]
seq the unfolding in setUnfoldingInfo
Contrary to the comment, for the module in #4367 at least, it is a big
improvement. Without it we get a huge spike of drag.

11 years agoComments only
simonpj@microsoft.com [Tue, 19 Oct 2010 15:35:31 +0000 (15:35 +0000)]
Comments only

11 years agoFix debugger
simonpj@microsoft.com [Tue, 19 Oct 2010 15:35:22 +0000 (15:35 +0000)]
Fix debugger

A bit yukky; see Note [Runtime skolems] in TcErrors.
But it works, and the debugger just is yukky in places.

11 years agoFix IPRun by fixing the inferred quantification mechanism
simonpj@microsoft.com [Tue, 19 Oct 2010 09:02:20 +0000 (09:02 +0000)]
Fix IPRun by fixing the inferred quantification mechanism

11 years agoRecover after an error in an implication constraint
simonpj@microsoft.com [Tue, 19 Oct 2010 09:02:02 +0000 (09:02 +0000)]
Recover after an error in an implication constraint

11 years agoReject programs with equality superclasses for now
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:40 +0000 (09:01 +0000)]
Reject programs with equality superclasses for now

11 years agoLayout and tiny refactoring only
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:24 +0000 (09:01 +0000)]
Layout and tiny refactoring only

11 years agoClean up the debugger code
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:00 +0000 (09:01 +0000)]
Clean up the debugger code

In particular there is much less fiddly skolemisation now
Things are not *quite* right (break001 and 006 still fail),
but they are *much* better than before.

11 years agoAdd new VarEnv functions minusVarEnv, intersectsVarEnv, unionInScope
simonpj@microsoft.com [Tue, 19 Oct 2010 08:56:09 +0000 (08:56 +0000)]
Add new VarEnv functions minusVarEnv, intersectsVarEnv, unionInScope

11 years agoMajor pass through type checker:(1) prioritizing equalities, (2) improved Derived...
dimitris@microsoft.com [Mon, 18 Oct 2010 15:15:10 +0000 (15:15 +0000)]
Major pass through type checker:(1) prioritizing equalities, (2) improved Derived mechanism, (3) bugfixes

11 years ago(1) Caching FD improvements for efficiency, (2) preventing cascading deriveds from...
dimitris@microsoft.com [Fri, 15 Oct 2010 16:44:21 +0000 (16:44 +0000)]
(1) Caching FD improvements for efficiency, (2) preventing cascading deriveds from entering the inert, (3) Fixing bugs in the creation of FlexiTcS variables

11 years agoMidstream changes for performance improvement related to superclasses and functional...
dimitris@microsoft.com [Thu, 14 Oct 2010 14:38:11 +0000 (14:38 +0000)]
Midstream changes for performance improvement related to superclasses and functional dependencies.

11 years agoMinor
dimitris@microsoft.com [Tue, 12 Oct 2010 08:09:51 +0000 (08:09 +0000)]
Minor

11 years agoCommentary changes
dimitris@microsoft.com [Mon, 11 Oct 2010 14:22:35 +0000 (14:22 +0000)]
Commentary changes

11 years agoKind checking bugfix (#4356) and preventing wanteds from rewriting wanteds
dimitris@microsoft.com [Fri, 8 Oct 2010 17:37:00 +0000 (17:37 +0000)]
Kind checking bugfix (#4356) and preventing wanteds from rewriting wanteds

11 years agoFix a retainer profiling segfault
Ian Lynagh [Tue, 19 Oct 2010 13:27:27 +0000 (13:27 +0000)]
Fix a retainer profiling segfault
The bitmap type wasn't big enough to hold large bitmaps on 64 bit
platforms. Profiling GHC was segfaulting when retainStack was handling a
size 33 bitmap.

11 years agoFix -auto-all: Add SCCs to IDs which have a monotype too
Ian Lynagh [Mon, 18 Oct 2010 15:39:57 +0000 (15:39 +0000)]
Fix -auto-all: Add SCCs to IDs which have a monotype too

11 years agoDefine SpecConstrAnnotation in GHC.Exts, and import it from there
simonpj@microsoft.com [Mon, 18 Oct 2010 13:57:46 +0000 (13:57 +0000)]
Define SpecConstrAnnotation in GHC.Exts, and import it from there

Reason: avoid having to link the entire ghc package in modules
that use compile-time annotations:

     import GHC.Exts( SpecConstrAnnotation )
     {-# ANN type T ForceSpecConstr #-}

It's a kind of bug that the package exporting SpecConstrAnnotation
is linked even though it is only needed at compile time, but putting
the data type declaration in GHC.Exts is a simple way to sidestep
the problem

See See Note [SpecConstrAnnotation] in SpecConstr

11 years agoFix warnings in AsmCodeGen
David Terei [Thu, 7 Oct 2010 14:35:59 +0000 (14:35 +0000)]
Fix warnings in AsmCodeGen

11 years agoLLVM: Fix compilation of writebarrier, #4308
David Terei [Mon, 4 Oct 2010 15:38:43 +0000 (15:38 +0000)]
LLVM: Fix compilation of writebarrier, #4308

11 years agoChange how the OS X installer's create-links finds the versin number
Ian Lynagh [Sun, 17 Oct 2010 12:23:52 +0000 (12:23 +0000)]
Change how the OS X installer's create-links finds the versin number
It now gets created by configure, rather than trying to work out the
version number at runtime.

11 years agoAdd more quoting to distrib/MacOS/installer-scripts/create-links
Ian Lynagh [Sun, 17 Oct 2010 11:26:48 +0000 (11:26 +0000)]
Add more quoting to distrib/MacOS/installer-scripts/create-links

11 years agochange os x installer to allow multiple installed versions
Evan Laforge [Wed, 29 Sep 2010 23:45:38 +0000 (23:45 +0000)]
change os x installer to allow multiple installed versions
This puts the ghc version into the package name so they are considered separate
packages.

11 years agoOnly put the boot packages in the haddock contents/index
Ian Lynagh [Sat, 16 Oct 2010 18:00:31 +0000 (18:00 +0000)]
Only put the boot packages in the haddock contents/index
We don't install dph etc, so don't put them in the doc index.

11 years agoCorrect the regexp used to search for extra packages
Ian Lynagh [Sat, 16 Oct 2010 12:34:21 +0000 (12:34 +0000)]
Correct the regexp used to search for extra packages
We weren't ignoring comment lines

11 years agoNew member "archiveMemberName" for struct _ObjectCode
pho@cielonegro.org [Mon, 27 Sep 2010 22:41:45 +0000 (22:41 +0000)]
New member "archiveMemberName" for struct _ObjectCode

struct _ObjectCode should be able to retain the name of archive members.
Though currently the only use of those names are for debugging outputs.

11 years agoAdd a -fghci-sandbox flag so that we can en/disable the ghci sandbox
Ian Lynagh [Fri, 15 Oct 2010 17:27:46 +0000 (17:27 +0000)]
Add a -fghci-sandbox flag so that we can en/disable the ghci sandbox
It's on by default (which matches the previous behaviour).

Motivation:
GLUT on OS X needs to run on the main thread. If you
try to use it from another thread then you just get a
white rectangle rendered. For this, or anything else
with such restrictions, you can turn the GHCi sandbox off
and things will be run in the main thread.

11 years agoFix boot; it was failing if darcs-all or validate were missing
Ian Lynagh [Fri, 15 Oct 2010 16:45:49 +0000 (16:45 +0000)]
Fix boot; it was failing if darcs-all or validate were missing
(which is the case in sdists)

11 years agoComments and layout
simonpj@microsoft.com [Fri, 15 Oct 2010 13:19:24 +0000 (13:19 +0000)]
Comments and layout

11 years agoMake (Located a) an instance of Eq, Ord
simonpj@microsoft.com [Fri, 15 Oct 2010 13:18:57 +0000 (13:18 +0000)]
Make (Located a) an instance of Eq, Ord

Fulfils Trac #4369

11 years agoGive user-defined rules precedence over built-in rules
simonpj@microsoft.com [Fri, 15 Oct 2010 13:18:14 +0000 (13:18 +0000)]
Give user-defined rules precedence over built-in rules

This fixes Trac #4397.  See comments with 'isMoreSpecific'.

11 years agoFix Trac #4401: meta-tyvars allocated by the constraint solver are always touchable
simonpj@microsoft.com [Fri, 15 Oct 2010 13:08:18 +0000 (13:08 +0000)]
Fix Trac #4401: meta-tyvars allocated by the constraint solver are always touchable

  See Note [Touchable meta type variables] in TcSMonad

11 years agoRemove GHC.extendGlobalRdrScope, GHC.extendGlobalTypeScope
simonpj@microsoft.com [Wed, 13 Oct 2010 09:11:07 +0000 (09:11 +0000)]
Remove GHC.extendGlobalRdrScope, GHC.extendGlobalTypeScope

These functions were added by

   Tue Apr 18 03:36:06 BST 2006  Lemmih <lemmih@gmail.com>
   * Make the initial rdr and type scope available in the ghc-api

The are extremely dubious, because they extend the Rdr and Type
env for every compilation.  The right thing to do is to use
the InteractiveContext for temporary extensions.

So far as we know, no one uses them.  And if they are being used
it's probably a mistake.  So we're backing them out.

11 years agoInlinePrag needs an arity only for INLINE, not INLINABLE
Simon Marlow [Fri, 15 Oct 2010 09:49:25 +0000 (09:49 +0000)]
InlinePrag needs an arity only for INLINE, not INLINABLE
This doesn't fix anything (we think), but it's morally correct.

11 years agoFix #4346 (INLINABLE pragma not behaving consistently)
Simon Marlow [Fri, 15 Oct 2010 09:48:36 +0000 (09:48 +0000)]
Fix #4346 (INLINABLE pragma not behaving consistently)
Debugged thanks to lots of help from Simon PJ: we weren't updating the
UnfoldingGuidance when the unfolding changed.
Also, a bit of refactoring and additinoal comments.

11 years agoHave boot check that we have the dph packages when validating
Ian Lynagh [Thu, 14 Oct 2010 14:05:56 +0000 (14:05 +0000)]
Have boot check that we have the dph packages when validating

11 years agoAdd more documentation for interruptible foreign calls
Simon Marlow [Thu, 14 Oct 2010 08:42:53 +0000 (08:42 +0000)]
Add more documentation for interruptible foreign calls

11 years agominor refactoring
Simon Marlow [Sun, 26 Sep 2010 10:58:19 +0000 (10:58 +0000)]
minor refactoring

11 years agoFix for interruptible FFI handling
Simon Marlow [Sat, 25 Sep 2010 19:34:42 +0000 (19:34 +0000)]
Fix for interruptible FFI handling
Set tso->why_blocked before calling maybePerformBlockedException(), so
that throwToSingleThreaded() doesn't try to unblock the current thread
(it is already unblocked).

11 years agointerruptible FFI: more robust handling of the exception case in the interpreter
Simon Marlow [Sat, 25 Sep 2010 19:33:17 +0000 (19:33 +0000)]
interruptible FFI: more robust handling of the exception case in the interpreter

11 years agoDon't interrupt when task blocks exceptions, don't immediately start exception.
Edward Z. Yang [Sat, 25 Sep 2010 03:30:26 +0000 (03:30 +0000)]
Don't interrupt when task blocks exceptions, don't immediately start exception.

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
interruptibility.

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
Windows.

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