Skip to content

Commit

Permalink
Fixes that help a small amount with space leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
robdockins committed Apr 13, 2021
1 parent aac42f4 commit 29c5bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cryptol/Backend/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,15 @@ modifyCallStack f m =
Eval $ \stk ->
do let stk' = f stk
-- putStrLn $ unwords ["Pushing call stack", show (displayCallStack stk')]
runEval stk' m
seq stk' (runEval stk' m)
{-# INLINE modifyCallStack #-}

-- | Execute the given evaluation action.
runEval :: CallStack -> Eval a -> IO a
runEval _ (Ready a) = return a
runEval stk (Eval x) = x stk
runEval _ (Thunk tv) = unDelay tv
{-# INLINE runEval #-}

{-# INLINE evalBind #-}
evalBind :: Eval a -> (a -> Eval b) -> Eval b
Expand Down

0 comments on commit 29c5bc9

Please sign in to comment.