diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2015-11-08 00:20:26 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-08 00:54:05 +0100 |
commit | bd69f6f4b5b334c5e98aba665bcff63587a5d38d (patch) | |
tree | 0da8ee2aca7fc9d8efcb91561fc6c090f5ccb957 /compiler/codeGen/StgCmmExpr.hs | |
parent | 8262c954ac3084f0dfcb6d5fa6e6172afd22eae7 (diff) | |
download | haskell-bd69f6f4b5b334c5e98aba665bcff63587a5d38d.tar.gz |
minor: use unless instead of (when . not)
Reviewers: bgamari, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1438
Diffstat (limited to 'compiler/codeGen/StgCmmExpr.hs')
-rw-r--r-- | compiler/codeGen/StgCmmExpr.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index 29db20a765..de23443f40 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -47,7 +47,7 @@ import Util import FastString import Outputable -import Control.Monad (when,void) +import Control.Monad (unless,void) import Control.Arrow (first) #if __GLASGOW_HASKELL__ >= 709 @@ -295,7 +295,7 @@ cgCase (StgOpApp (StgPrimOp op) args _) bndr (AlgAlt tycon) alts -- If the binder is not dead, convert the tag to a constructor -- and assign it. - ; when (not (isDeadBinder bndr)) $ do + ; unless (isDeadBinder bndr) $ do { dflags <- getDynFlags ; tmp_reg <- bindArgToReg (NonVoid bndr) ; emitAssign (CmmLocal tmp_reg) @@ -401,7 +401,7 @@ cgCase (StgApp v []) bndr alt_type@(PrimAlt _) alts || reps_compatible = -- assignment suffices for unlifted types do { dflags <- getDynFlags - ; when (not reps_compatible) $ + ; unless reps_compatible $ panic "cgCase: reps do not match, perhaps a dodgy unsafeCoerce?" ; v_info <- getCgIdInfo v ; emitAssign (CmmLocal (idToReg dflags (NonVoid bndr))) |