aboutsummaryrefslogtreecommitdiffstats
path: root/lib/drl/ast.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/drl/ast.ml')
-rw-r--r--lib/drl/ast.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/drl/ast.ml b/lib/drl/ast.ml
index f94965d..2beb010 100644
--- a/lib/drl/ast.ml
+++ b/lib/drl/ast.ml
@@ -8,6 +8,13 @@ type value =
| Bool of bool
[@@deriving sexp]
+(** Convert an AST value to an AbstractValue.t (Obj.t) via Obj.repr *)
+let value_to_abstract : value -> Conventions.AbstractValue.t = function
+ | Int n -> Obj.repr n
+ | Float f -> Obj.repr f
+ | Str s -> Obj.repr s
+ | Bool b -> Obj.repr b
+
type direction = Asc | Desc
[@@deriving sexp]