From 404a426540aef7f29b8dee73140b8ce897dc470f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 9 Apr 2009 18:23:23 +0200 Subject: [PATCH] Properly save state propagated flat functions. Previously, the propagated state was not properly saved, resulting in stateful functions being defined, while stateless versions were instantiated. --- Translator.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translator.hs b/Translator.hs index c4bcdbd..071e9d2 100644 --- a/Translator.hs +++ b/Translator.hs @@ -176,7 +176,7 @@ flattenBind hsfunc bind@(NonRec var expr) = do -- Propagate state variables let flatfunc' = propagateState hsfunc flatfunc -- Store the flat function in the session - modA tsFlatFuncs (Map.insert hsfunc flatfunc) + modA tsFlatFuncs (Map.insert hsfunc flatfunc') -- Flatten any functions used let used_hsfuncs = Maybe.mapMaybe usedHsFunc (flat_defs flatfunc') mapM_ resolvFunc used_hsfuncs -- 2.30.2