aboutsummaryrefslogtreecommitdiff
path: root/evaluator.ml
diff options
context:
space:
mode:
Diffstat (limited to 'evaluator.ml')
-rwxr-xr-xevaluator.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/evaluator.ml b/evaluator.ml
index c17a397..f2a49d9 100755
--- a/evaluator.ml
+++ b/evaluator.ml
@@ -280,8 +280,8 @@ let repr mapper value = begin
| ScTypes.Refs.Array1 l ->
(* Guess the list type from it's first defined element *)
let Result r = extract_value (Tools.List.find_map (fun x -> x) l) in
- let format_of = Data.format_of_value r in
- let type_of = Data.type_of_value r in
+ let format_of = Data.format_of_value r
+ and type_of = Data.type_of_value r in
(* Build the list with all the elements *)
let elems, format = List.fold_left (add_elem type_of) ([], format_of) l in
Result (Data.List (format, elems))
@@ -289,13 +289,13 @@ let repr mapper value = begin
(* Guess the list type from it's first defined element *)
let Result r = extract_value (Tools.List.find_map2 (fun x -> x) l) in
- let format_of = Data.format_of_value r in
- let type_of = Data.type_of_value r in
+ let format_of = Data.format_of_value r
+ and type_of = Data.type_of_value r in
(* Build the list with all the elements *)
let elems, format = List.fold_left (fun (result, format_of) elems ->
let elems, format = List.fold_left (add_elem type_of) ([], format_of) elems in
elems::result, (Data.most_generic_format format_of format)
- ) ([], format_of) l in
+ ) ([], format_of) l in
Result (Data.Matrix (format, elems))
end
@@ -308,7 +308,6 @@ let repr mapper value = begin
end
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))