From 951d2a0e821d9eecfcb3a60f1f4411cc4aa3a3c5 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Fri, 19 Jan 2024 10:39:43 -0600 Subject: Flattens the AST. --- discocaml/eval.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'discocaml/eval.ml') diff --git a/discocaml/eval.ml b/discocaml/eval.ml index 63dd6f7..816d269 100644 --- a/discocaml/eval.ml +++ b/discocaml/eval.ml @@ -1,8 +1,5 @@ open Ast -type path = int list -(** A path from the root of a term to a subterm. *) - -let find_redex_cbv : expr -> path option = function _ -> None -let find_redex_cbn : expr -> path option = function _ -> None -let reduce : expr -> path -> expr = fun e _ -> e +let find_redex_cbv : expr ast -> expr index option = function _ -> None +let find_redex_cbn : expr ast -> expr index option = function _ -> None +let reduce : expr ast -> expr index -> expr ast = fun e _ -> e -- cgit v1.2.3