on master help sign in
Laziness fix in case analysis
commit4c1db81d06942919c0e5dc7388914b9846d17835 authorDavid Christiansen <david@davidchristiansen.dk> dateWed 24 Apr 2013, 09:40 (14 years ago) parentcf75f6e
1 file changed+1−1
src/Core/Execute.hs+1−1
src/Core/Execute.hs+1−1
@@ -366,7 +366,7 @@ execCase' env ctxt amap (STerm tm) =
366366 Just <$> doExec (map (\(n, v) -> (n, Let EErased v)) amap ++ env) ctxt tm
367367execCase' env ctxt amap (Case n alts) | Just tm <- lookup n amap =
368368 do tm' <- tryForce tm
369− case chooseAlt tm alts of
369+ case chooseAlt tm' alts of
370370 Just (newCase, newBindings) ->
371371 let amap' = newBindings ++ (filter (\(x,_) -> not (elem x (map fst newBindings))) amap) in
372372 execCase' env ctxt amap' newCase