aboutsummaryrefslogtreecommitdiff
path: root/evaluator.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-11-01 14:53:09 +0100
committerSébastien Dailly <sebastien@chimrod.com>2017-11-01 14:53:09 +0100
commit9fbc5e48ea8183dda8fdb652364c0c29f8a309d5 (patch)
tree052214454101b44d07918131ad500f0c451649eb /evaluator.ml
parentab721136f50914a21f6cca89f0fcfb055ba58cd2 (diff)
Made scTypes.types private.
Diffstat (limited to 'evaluator.ml')
-rwxr-xr-xevaluator.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/evaluator.ml b/evaluator.ml
index f2a49d9..46123cb 100755
--- a/evaluator.ml
+++ b/evaluator.ml
@@ -309,9 +309,12 @@ let repr mapper value = begin
in
let Result r = (extract value) in
begin match r with
- | Data.Bool b -> ScTypes.Result (ScTypes.Bool b)
- | Data.Num (format, n) -> ScTypes.Result (ScTypes.Num (format, n))
- | Data.String s -> ScTypes.Result (ScTypes.Str s)
+ | Data.Bool b -> ScTypes.Result (ScTypes.boolean b)
+ | Data.String s -> ScTypes.Result (ScTypes.string s)
+ | Data.Num (format, n) -> begin match ScTypes.get_numeric_type format with
+ | ScTypes.Date -> ScTypes.Result (ScTypes.date n)
+ | ScTypes.Number -> ScTypes.Result (ScTypes.number n)
+ end
| _ -> raise Errors.TypeError
end
end