diff options
author | Camil Staps | 2023-01-31 14:07:03 +0100 |
---|---|---|
committer | Camil Staps | 2023-01-31 14:07:03 +0100 |
commit | 4b7d499c3dbd5586aa855e54367d95930fd42a81 (patch) | |
tree | f4def722b898475cb191651b5cad0b5e69cd6f2f /snug-clean/src/Snug/Compile/Simulate.dcl | |
parent | Add compilation for symbols with arity 0 (diff) |
Minor improvements; implement saturated function and constructor applications
Diffstat (limited to 'snug-clean/src/Snug/Compile/Simulate.dcl')
-rw-r--r-- | snug-clean/src/Snug/Compile/Simulate.dcl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/snug-clean/src/Snug/Compile/Simulate.dcl b/snug-clean/src/Snug/Compile/Simulate.dcl index 9b938d5..a36dc0d 100644 --- a/snug-clean/src/Snug/Compile/Simulate.dcl +++ b/snug-clean/src/Snug/Compile/Simulate.dcl @@ -18,9 +18,16 @@ from Snug.Syntax import :: BasicValue simulate :: !(Simulator a) -> [Instruction] +//* Build a constructor node with *n* arguments and push it to the stack. buildCons :: !Label !Int -> Simulator () +//* Build a thunk node with *n* arguments and push it to the stack. buildThunk :: !Label !Int -> Simulator () +//* Push a basic value to the stack. pushBasicValue :: !BasicValue -> Simulator () +/** + * Overwrite the node currently under evaluation with an indirection to the + * node on top of the stack, and continue evaluating that node instead. + */ indirectAndEval :: Simulator () |