aboutsummaryrefslogtreecommitdiff
path: root/discocaml
diff options
context:
space:
mode:
Diffstat (limited to 'discocaml')
-rw-r--r--discocaml/.ocamlformat0
-rw-r--r--discocaml/ast.ml3
-rw-r--r--discocaml/dune9
-rw-r--r--discocaml/eval.ml7
4 files changed, 16 insertions, 3 deletions
diff --git a/discocaml/.ocamlformat b/discocaml/.ocamlformat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/discocaml/.ocamlformat
diff --git a/discocaml/ast.ml b/discocaml/ast.ml
new file mode 100644
index 0000000..009ea87
--- /dev/null
+++ b/discocaml/ast.ml
@@ -0,0 +1,3 @@
+type expr = Foo [@@deriving show { with_path = false }]
+
+let expr_of_parsetree : Parsetree.expression -> expr = function _ -> Foo
diff --git a/discocaml/dune b/discocaml/dune
index 961fe70..50b12c2 100644
--- a/discocaml/dune
+++ b/discocaml/dune
@@ -2,14 +2,17 @@
(name discocaml)
(inline_tests)
(libraries compiler-libs.common yojson)
- (modules discocaml)
+ (modules ast discocaml eval)
(package discocaml)
(preprocess
(pps ppx_deriving.show ppx_deriving_yojson ppx_expect)))
+(env
+ (release
+ (link_flags
+ (:standard -cclib -static -cclib -lm -O3))))
+
(executable
- (flags
- (:standard -cclib -static -cclib -lm))
(libraries discocaml yojson)
(modules main)
(name main)
diff --git a/discocaml/eval.ml b/discocaml/eval.ml
new file mode 100644
index 0000000..68bb637
--- /dev/null
+++ b/discocaml/eval.ml
@@ -0,0 +1,7 @@
+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