@@ -173,6 +173,7 @@ evalVal :: Env -> Val -> M Answer E
|
|||||||
evalVal g (ValVar x) = var g x >>= fetch
|
evalVal g (ValVar x) = var g x >>= fetch
|
||||||
|
|
||||||
evalVal g (ValImm imm) = pure case imm of
|
evalVal g (ValImm imm) = pure case imm of
|
||||||
|
ImmLabel l -> error [i|#{l}|]
|
||||||
ImmInt n -> EInt n
|
ImmInt n -> EInt n
|
||||||
ImmBool b -> EBool b
|
ImmBool b -> EBool b
|
||||||
ImmUndefined -> EUndefined
|
ImmUndefined -> EUndefined
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ runtimeValues = ["stackify","wasm","cps","none"]
|
|||||||
runtimeReader = maybeReader \case
|
runtimeReader = maybeReader \case
|
||||||
"stackify" -> Just (Just Stackify)
|
"stackify" -> Just (Just Stackify)
|
||||||
"wasm" -> Just (Just Wasm)
|
"wasm" -> Just (Just Wasm)
|
||||||
"cps" -> Just (Just CPS)
|
"cps1" -> Just (Just CPS)
|
||||||
("cps2";"higher-order-cps") -> Just (Just CPS)
|
("cps";"higher-order-cps") -> Just (Just HigherOrderCPS)
|
||||||
"none" -> Just Nothing
|
"none" -> Just Nothing
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user