diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-01-19 10:39:43 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-01-19 10:39:43 -0600 |
commit | 951d2a0e821d9eecfcb3a60f1f4411cc4aa3a3c5 (patch) | |
tree | 580f9595bc8ffbfc963bff6175a54520f3ee1a28 /discocaml/eval.ml | |
parent | 729ddbe62a25675d5dcd993b6e42e26e4cd04c74 (diff) |
Flattens the AST.
Diffstat (limited to 'discocaml/eval.ml')
-rw-r--r-- | discocaml/eval.ml | 9 |
1 files changed, 3 insertions, 6 deletions
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 |