| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
DDC.Core.Salt.Transfer
Documentation
transferModule :: Module (AnTEC a Name) Name -> Either (Error (AnTEC a Name)) (Module (AnTEC a Name) Name) Source
Add control transfer primops to function bodies. For example:
fun [x : Int32#] : Int32#
= case ... of
... -> add# [Int32] ...
... -> fun x
=> fun [x : Int32#] : Int32#
= case ... of
... -> return# [Int32#] (add# [Int32] ...)
... -> tailcall1# [Int32#] [Int32#] fun x
The control primops return tell us how to transfer control after we've finished with the current function.