[project @ 1998-12-22 16:31:28 by simonpj]
[ghc-hetmet.git] / ghc / compiler / simplCore / SimplCore.lhs
index e89e36b..be827a8 100644 (file)
@@ -195,10 +195,11 @@ simplifyPgm sw_chkr us binds
          (us1, us2) = splitUniqSupply us
 
 
-simplTopBinds []              = returnSmpl []
-simplTopBinds (bind1 : binds) = (simplBind bind1       $
-                                simplTopBinds binds)   `thenSmpl` \ (binds1', binds') ->
-                               returnSmpl (binds1' ++ binds')
+simplTopBinds binds = go binds         `thenSmpl` \ (binds', _) ->
+                     returnSmpl binds'
+                   where
+                     go []              = returnSmpl ([], ())
+                     go (bind1 : binds) = simplBind bind1 (go binds)
 \end{code}