diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-01-24 08:08:58 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-01-24 08:08:58 -0600 |
commit | 4f3a5d390443573b60e583d1c965eb336d08ff68 (patch) | |
tree | 11fb2976853b264a2d22125ea7a660f6181085e1 /discocaml/eval.ml | |
parent | f290fca1afab9bf8aeb58ce0789b4d810abc9f66 (diff) |
No-good evaluation rules for letrec.
Diffstat (limited to 'discocaml/eval.ml')
-rw-r--r-- | discocaml/eval.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discocaml/eval.ml b/discocaml/eval.ml index 0d2e14d..9f94e41 100644 --- a/discocaml/eval.ml +++ b/discocaml/eval.ml @@ -135,7 +135,10 @@ let find_redex_cbv_in (ast : expr ast) : expr index -> unit = loop f; loop x | If (cond, _, _) -> loop cond - | Let (_, _, bound, _) -> loop bound + | Let (false, _, bound, _) -> loop bound + | Let (true, _, bound, body) -> + loop bound; + loop body | Prim (Add, (l, r)) | Prim (Sub, (l, r)) | Prim (Mul, (l, r)) -> loop l; loop r |