Step 1

previous next

Most recent rule applied

THUNK

Stack and Code

StackExpression
upd * main
worker_1 monadIO realWorld

Heap

VariableObject
main
BLACKHOLE
monadIO
CON(Monad returnIO thenIO)
poll
FUN(monad ->
       let {
          ret_thunk = THUNK(return_1 monad unit);
          poll_poll_thunk = THUNK(poll_1 monad)
       } in then_1 monad ret_thunk poll_poll_thunk)
realWorld
CON(RealWorld)
return
FUN(monad ->
       case monad of {
          Monad return then -> return
       })
returnIO
FUN(x s -> (# s, x #))
then
FUN(monad ->
       case monad of {
          Monad return then -> then
       })
thenIO
FUN(m k s ->
       case m_? s of {
          (# new_s, result #) -> k_? new_s
       })
unit
CON(Unit)
worker
FUN(monad ->
       let { loop = THUNK(let { worker_poll_thunk = THUNK(poll_1 monad) } in then_1 monad worker_poll_thunk loop) } in loop)