aboutsummaryrefslogtreecommitdiff
path: root/src/scTypes.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/scTypes.ml')
-rwxr-xr-xsrc/scTypes.ml18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/scTypes.ml b/src/scTypes.ml
index 48e4d3c..fc6dd1f 100755
--- a/src/scTypes.ml
+++ b/src/scTypes.ml
@@ -234,13 +234,10 @@ module Refs = struct
Tools.Tuple2.printb ~first:"" ~last:"" ~sep:":" Cell.to_buffer Cell.to_buffer buffer (f,t)
end
- type 'a content =
- | Value: 'a dataFormat * 'a -> 'a content
- | List: 'a dataFormat * 'a list -> 'a list content
- | Matrix: 'a dataFormat * 'a list list -> 'a list list content
-
- type refContent =
- | C: 'a content -> refContent [@@unboxed]
+ type content =
+ | Value: 'a dataFormat * 'a -> content
+ | List: 'a dataFormat * 'a list -> content
+ | Matrix: 'a dataFormat * 'a list list -> content
(** Add one element in a typed list.
@@ -266,7 +263,8 @@ module Refs = struct
| Single None -> raise Errors.TypeError
| Single (Some (Error x)) -> raise x
| Single (Some (Result r)) ->
- let Type.Value (format, c) = Type.get_content r in C (Value (format, c))
+ let Type.Value (format, c) = Type.get_content r in
+ Value (format, c)
| Array1 l ->
(* Get the first element in the list in order to get the format *)
let Type.Value (format, _) =
@@ -276,7 +274,7 @@ module Refs = struct
end in
(* Then build an unified list (if we can) *)
let format, values = List.fold_left add_elem (format, []) l in
- C (List(format, List.rev values))
+ List(format, List.rev values)
| Array2 l ->
(* Get the first element in the list *)
let Type.Value (format, _) =
@@ -289,7 +287,7 @@ module Refs = struct
let format, elems = List.fold_left add_elem (format, []) elems in
(format, List.rev (elems::result))
)(format, []) l in
- C (Matrix(format, List.rev values))
+ Matrix(format, List.rev values)
end
end