summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmLayout.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-20 00:43:34 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-20 00:43:34 +0100
commit05a0a6474338af410a90296cff9dfea50773f4ca (patch)
treec8cb62304dc204ca6e8ae8d22fb5d05c562a342b /compiler/codeGen/StgCmmLayout.hs
parentaa6bc700cc07e21a8b6aa5816a8c63201b9b260e (diff)
downloadhaskell-05a0a6474338af410a90296cff9dfea50773f4ca.tar.gz
Change some "else return ()"s to use when/unless
Diffstat (limited to 'compiler/codeGen/StgCmmLayout.hs')
-rw-r--r--compiler/codeGen/StgCmmLayout.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs
index 69a0d1a0cf..fa80edc96c 100644
--- a/compiler/codeGen/StgCmmLayout.hs
+++ b/compiler/codeGen/StgCmmLayout.hs
@@ -61,6 +61,7 @@ import Util
import Data.List
import Outputable
import FastString
+import Control.Monad
------------------------------------------------------------------------
-- Call and return sequences
@@ -86,7 +87,7 @@ emitReturn results
do { adjustHpBackwards
; emit (mkReturnSimple dflags results updfr_off) }
AssignTo regs adjust ->
- do { if adjust then adjustHpBackwards else return ()
+ do { when adjust adjustHpBackwards
; emitMultiAssign regs results }
; return AssignedDirectly
}