- 13 Jan, 2012 13 commits
-
-
Simon Peyton Jones authored
I'm experimenting with making GHC a bit more aggressive about a) dropping case expressions if the result is unused Simplify.rebuildCase, CaseElim equation b) floating case expressions inwards FloatIn.fiExpr, AnnCase In both cases the new behaviour is gotten with a static (debug) flag -faggressive-primops. The extra "aggression" is to allow discarding and floating in for side-effecting operations. See the new, extensive Note [PrimOp can_fail and has_side_effects] in PrimoOp. When discarding a case with unused binders, in the lifted-type case it's definitely ok if the scrutinee terminates; previously we were checking exprOkForSpeculation, which is significantly worse. So I wanted a new function CoreUtils.exprCertainlyTerminates. In doing this I ended up with a significant refactoring in CoreUtils. The new structure has quite a lot of nice sharing: exprIsCheap = exprIsCheap' isHNFApp exprIsExpandable = exprIsCheap' isConLikeApp exprIsHNF = exprIsHNFlike isHNFApp exprIsConLike = exprIsHNFlike isConLikeApp exprCertainlyTerminates = exprIsHNFlike isTerminatingApp
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
There was a trivial typo which meant that important newly-added rules would never fire!
-
dterei authored
-
dterei authored
-
dterei authored
-
dterei authored
is used for optimisation. (enabled by default)
-
dterei authored
-
dterei authored
-
dterei authored
-
dterei authored
-
Ian Lynagh authored
-
- 12 Jan, 2012 11 commits
-
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Two changes here * The main change here is to enhance the FloatIn pass so that it can float case-bindings inwards. In particular the case bindings for array indexing. * Also change the code in Simplify, to allow a case on array indexing (ie can_fail is true) to be discarded altogether if its results are unused. Lots of new comments in PrimOp about can_fail and has_side_effects Some refactoring to share the FloatBind data structure between FloatIn and FloatOut
-
-
-
Simon Peyton Jones authored
This patch implements the idea of deferring (most) type errors to runtime, instead emitting only a warning at compile time. The basic idea is very simple: * The on-the-fly unifier in TcUnify never fails; instead if it gets stuck it emits a constraint. * The constraint solver tries to solve the constraints (and is entirely unchanged, hooray). * The remaining, unsolved constraints (if any) are passed to TcErrors.reportUnsolved. With -fdefer-type-errors, instead of emitting an error message, TcErrors emits a warning, AND emits a binding for the constraint witness, binding it to (error "the error message"), via the new form of evidence TcEvidence.EvDelayedError. So, when the program is run, when (and only when) that witness is needed, the program will crash with the exact same error message that would have been given at compile time. Simple really. But, needless to say, the exercise forced me into some major refactoring. * TcErrors is almost entirely rewritten * EvVarX and WantedEvVar have gone away entirely * ErrUtils is changed a bit: * New Severity field in ErrMsg * Renamed the type Message to MsgDoc (this change touches a lot of files trivially) * One minor change is that in the constraint solver we try NOT to combine insoluble constraints, like Int~Bool, else all such type errors get combined together and result in only one error message! * I moved some definitions from TcSMonad to TcRnTypes, where they seem to belong more
-
Simon Marlow authored
-
dterei authored
TBAA allows us to specify a type hierachy in metadata with the property that nodes on different branches don't alias. This should somewhat improve the optimizations LLVM does that rely on alias information.
-
dterei authored
-
dterei authored
-
- 11 Jan, 2012 9 commits
-
-
Ian Lynagh authored
On XCode 4.1, we use /usr/bin/gcc-4.2 as it makes better code than /usr/bin/gcc for us. However, gcc-4.2 doesn't exist in XCode 4.2, so we need to use /usr/bin/gcc there. As the installer can be used on either, we make it always use /usr/bin/gcc.
-
Ian Lynagh authored
It was removed in 4.2.
-
gwright@antiope.com authored
-
Ian Lynagh authored
The libraries get configured during "make", so plain old "make clean" should clean up the configure droppings. Also fixed another wildcard/patsubst problem.
-
Ian Lynagh authored
We were applying $(wildcard ...) to the literal string libraries/%/*.buildinfo, which of course had no matches.
-
-
http://darcs.haskell.org/ghcIan Lynagh authored
-
Ian Lynagh authored
-
Ian Lynagh authored
-
- 10 Jan, 2012 6 commits
-
-
Ian Lynagh authored
-
dterei authored
Patch from Karel Gardas!
-
-
dterei authored
-
dterei authored
-
- 09 Jan, 2012 1 commit
-
-