Add two new primops:
seq# :: a -> State# s -> (# State# s, a #) spark# :: a -> State# s -> (# State# s, a #) seq# is a version of seq that can be used in a State#-passing context. We will use it to implement Control.Exception.evaluate and thus fix #5129. Also we have plans to use it to fix #5262. spark# is to seq# as par is to pseq. That is, it creates a spark in a State#-passing context. We will use spark# and seq# to implement rpar and rseq respectively in an improved implementation of the Eval monad.
Showing
- compiler/codeGen/CgCase.lhs 19 additions, 0 deletionscompiler/codeGen/CgCase.lhs
- compiler/codeGen/CgExpr.lhs 7 additions, 0 deletionscompiler/codeGen/CgExpr.lhs
- compiler/codeGen/CgPrimOp.hs 20 additions, 0 deletionscompiler/codeGen/CgPrimOp.hs
- compiler/prelude/primops.txt.pp 15 additions, 0 deletionscompiler/prelude/primops.txt.pp
Loading
Please register or sign in to comment