aboutsummaryrefslogtreecommitdiff
path: root/src/expressions/sym_expr.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2018-01-31 13:20:20 +0100
committerSébastien Dailly <sebastien@chimrod.com>2018-02-07 13:42:36 +0100
commit824f2987d47e87d58ee2a4a96d7be417aad6aeab (patch)
treebfbaca8d1c13a2eb1e5568f363cdcd6c94f1786f /src/expressions/sym_expr.ml
parent112ab4b1c396fc2117191297227d8e411f9b9bb3 (diff)
API refactoring : made the GADT abstract, provide contructor for each case, and deported the
expression with evaluation with module functors
Diffstat (limited to 'src/expressions/sym_expr.ml')
-rwxr-xr-xsrc/expressions/sym_expr.ml31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/expressions/sym_expr.ml b/src/expressions/sym_expr.ml
new file mode 100755
index 0000000..5ff828e
--- /dev/null
+++ b/src/expressions/sym_expr.ml
@@ -0,0 +1,31 @@
+module type SYM_EXPR = sig
+
+ module T:Sym_type.SYM_TYPE
+
+ module R:Sym_ref.SYM_REF
+
+ type t
+
+ type repr
+
+ type obs
+
+ val value : 'a T.t -> t -> repr
+
+ val ref : 'a R.t -> t -> repr
+
+ val call0 : UTF8.t -> t -> repr
+
+ val call1 : UTF8.t -> repr -> t -> repr
+
+ val call2 : UTF8.t -> repr -> repr -> t -> repr
+
+ val call3 : UTF8.t -> repr -> repr -> repr -> t -> repr
+
+ val callN: UTF8.t -> repr list -> t -> repr
+
+ val expression : repr -> t -> repr
+
+ val observe : repr -> obs
+
+end