~jack/misc

9e971cb1acdffc053f57073170ee4b0d3d74386a — Jack Kelly a month ago 8f8781e
stg: fix definition of `double` in example
2 files changed, 2 insertions(+), 1 deletions(-)

M stg/src/Language/STG.hs
M stg/src/Language/STG/Eval.hs
M stg/src/Language/STG.hs => stg/src/Language/STG.hs +1 -1
@@ 21,7 21,7 @@ stgMain =
      lfArgVars = [],
      lfExpr =
        Let
          [ ("double", LF [] U ["x"] $ PrimApp IntMul [ALit 2, AVar "x"]),
          [ ("double", LF [] N ["x"] $ PrimApp IntMul [ALit 2, AVar "x"]),
            ( "list",
              LF [] N [] $
                Let [("t3", LF [] N [] $ ConApp "Nil" [])] $

M stg/src/Language/STG/Eval.hs => stg/src/Language/STG/Eval.hs +1 -0
@@ 311,6 311,7 @@ enterUpdatableClosureRule s = case sCode s of
  Enter a -> do
    HeapEnt LF {..} wsf <- M.lookup a $ sHeap s
    guard $ lfUpdateFlag == U
    guard $ null lfArgVars
    let p = M.fromList $ zip lfFreeVars wsf
    Just $
      s