Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : supercompiler
http://hackage.haskell.org/trac/ghc/changeset/7181cc09f46ed51c54821cc01fb4939bfe2b4670 >--------------------------------------------------------------- commit 7181cc09f46ed51c54821cc01fb4939bfe2b4670 Author: Max Bolingbroke <batterseapo...@hotmail.com> Date: Thu Oct 4 14:58:53 2012 +0100 Revert state in MSG if binderisation fails >--------------------------------------------------------------- compiler/supercompile/Supercompile/Drive/MSG.hs | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/compiler/supercompile/Supercompile/Drive/MSG.hs b/compiler/supercompile/Supercompile/Drive/MSG.hs index 6fcb4e4..3736fc0 100644 --- a/compiler/supercompile/Supercompile/Drive/MSG.hs +++ b/compiler/supercompile/Supercompile/Drive/MSG.hs @@ -233,7 +233,8 @@ msgPendStackBinder x_looped x_l x_r = State.state $ \(iss, known) -> let x0 = za msgPend :: RnEnv2 -> Var -> Pending -> MSG Var {- partial loop -} msgPend rn2 x0 pending = MSG $ \e s0 -> case lookupUpdatePending s0 of Right x -> (s0, pure x) - Left (mb_eq, binderise, mk_s) -> res + Left (mb_eq, binderise, mk_s) -> case res of (_, Left msg) -> (s0, Left msg) + (s3, Right x) -> (s3, Right x) -- NB: must revert state or else x_looped will be in the msgKnownVars, and pulling on it will fail the irrefutible pattern match where -- The use of s here is necessary to ensure we only allocate a given common var once extra_iss | Just eq <- mb_eq , eq `elemInScopeSet` msgCommonHeapVars (msgMode e) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc