cakeml
cakeml copied to clipboard
Add thunks to CakeML to help PureCake
This issue records our intent to add thunks to the CakeML semantics so that the PureCake compiler can generate thunks that CakeML's GC can be optimised for. The plan is to add thunks as stateful objects to the CakeML source semantics and all intermediate languages down to wordLang, where they will be realised as special form of mutable memory cells. The plan is allow already-evaluated thunks to be represented by their content directly and to have the CakeML GC do an on-the-fly inlining of the already-computed thunk values.