[commit: ghc] master: CallArity: Use not . null instead of length > 0 (331febf)

git at git.haskell.org git at git.haskell.org
Mon Jul 4 21:31:36 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/331febf084bb696061f550bbd76875104e427f3a/ghc

>---------------------------------------------------------------

commit 331febf084bb696061f550bbd76875104e427f3a
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Jul 4 14:36:24 2016 +0200

    CallArity: Use not . null instead of length > 0
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2381


>---------------------------------------------------------------

331febf084bb696061f550bbd76875104e427f3a
 compiler/simplCore/CallArity.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs
index e172aef..fda28a8 100644
--- a/compiler/simplCore/CallArity.hs
+++ b/compiler/simplCore/CallArity.hs
@@ -510,7 +510,7 @@ callArityAnal arity int (Let bind e)
 -- Which bindings should we look at?
 -- See Note [Which variables are interesting]
 isInteresting :: Var -> Bool
-isInteresting v = 0 < length (typeArity (idType v))
+isInteresting v = not $ null (typeArity (idType v))
 
 interestingBinds :: CoreBind -> [Var]
 interestingBinds = filter isInteresting . bindersOf



More information about the ghc-commits mailing list