diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-27 18:07:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-27 18:07:26 +0100 |
commit | a2ae0d777d7cef8900cdf7bbaeb7517fce070af8 (patch) | |
tree | f72ed3f96d3776b6e26cec83d2f412251c6e2282 /compiler/simplCore/SimplUtils.lhs | |
parent | 4a088f806736b8e7c55be334a946f134ba9a30b6 (diff) | |
download | haskell-a2ae0d777d7cef8900cdf7bbaeb7517fce070af8.tar.gz |
Revert "Refactoring in CoreUtils/CoreArity"
This reverts commit e3f8557c2aca04cf64eec6a1aacde6e01c0944ff.
Sigh. Seg fault.
Diffstat (limited to 'compiler/simplCore/SimplUtils.lhs')
-rw-r--r-- | compiler/simplCore/SimplUtils.lhs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index 0b6c66e126..7bb4289cd3 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -1161,10 +1161,10 @@ findArity dflags bndr rhs old_arity -- we stop right away (since arities should not decrease) -- Result: the common case is that there is just one iteration where - init_cheap_app :: FunAppAnalyser + init_cheap_app :: CheapAppFun init_cheap_app fn n_val_args | fn == bndr = True -- On the first pass, this binder gets infinite arity - | otherwise = isHNFApp fn n_val_args + | otherwise = isCheapApp fn n_val_args go :: Arity -> Arity go cur_arity @@ -1180,10 +1180,10 @@ findArity dflags bndr rhs old_arity where new_arity = exprEtaExpandArity dflags cheap_app rhs - cheap_app :: FunAppAnalyser + cheap_app :: CheapAppFun cheap_app fn n_val_args | fn == bndr = n_val_args < cur_arity - | otherwise = isHNFApp fn n_val_args + | otherwise = isCheapApp fn n_val_args \end{code} Note [Eta-expanding at let bindings] @@ -1246,7 +1246,7 @@ argument type CheapFun = CoreExpr -> Maybe Type -> Bool used to decide if an expression is cheap enough to push inside a lambda. And exprIsCheap' in turn takes an argument - type FunAppAnalyser = Id -> Int -> Bool + type CheapAppFun = Id -> Int -> Bool which tells when an application is cheap. This makes it easy to write the analysis loop. |