- 19 Sep, 2010 1 commit
-
-
Edward Z. Yang authored
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.
-
- 13 Oct, 2010 3 commits
-
-
Ian Lynagh authored
-
benl@ouroborus.net authored
-
benl@ouroborus.net authored
-
- 12 Oct, 2010 1 commit
-
-
Ian Lynagh authored
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 versions).
-
- 10 Oct, 2010 1 commit
-
-
Ian Lynagh authored
-
- 06 Oct, 2010 4 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
The default language is now Haskell2010, so this was a little odd. Also, --make is now on by default, so this was largely irrelevant.
-
Ian Lynagh authored
-
Ian Lynagh authored
This means most code doesn't get caught by monomorphic local bindings.
-
- 08 Oct, 2010 7 commits
-
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
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
-
simonpj@microsoft.com authored
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]
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
Note [Avoid unecessary constraint simplification] in TcSimplify
-
Simon Marlow authored
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%
-
simonpj@microsoft.com authored
The error cascade caused puzzling errors in T4093b, and suppressing some seems like a good plan. Very few test outputs change.
-
- 07 Oct, 2010 12 commits
-
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
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
-
simonpj@microsoft.com authored
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.
-
simonpj@microsoft.com authored
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.
-
simonpj@microsoft.com authored
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].
-
simonpj@microsoft.com authored
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]
-
simonpj@microsoft.com authored
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.
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
(At least, I don't think there is anything else.)
-
simonpj@microsoft.com authored
I added a lot of comments too, to explain the preconditions; esp Note [FamInstEnv]
-
simonpj@microsoft.com authored
-
- 06 Oct, 2010 3 commits
-
-
simonpj@microsoft.com authored
The tag2Enum rule wasn't doing the right thing for enumerations with a phantom type parameter, like data T a = A | B
-
simonpj@microsoft.com authored
-
dimitris@microsoft.com authored
-
- 04 Oct, 2010 1 commit
-
-
dimitris@microsoft.com authored
-
- 23 Sep, 2010 1 commit
-
-
dimitris@microsoft.com authored
-
- 06 Oct, 2010 3 commits
-
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
Plus remember to zonk the free_tvs in TcUnify.newImplication
-
- 02 Oct, 2010 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 24 Sep, 2010 1 commit
-
-
Simon Marlow authored
-