From 4f3a5d390443573b60e583d1c965eb336d08ff68 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Wed, 24 Jan 2024 08:08:58 -0600 Subject: No-good evaluation rules for letrec. --- discocaml/eval.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'discocaml/eval.ml') 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 -- cgit v1.2.3