aboutsummaryrefslogtreecommitdiff
path: root/scTypes.mli
diff options
context:
space:
mode:
Diffstat (limited to 'scTypes.mli')
-rwxr-xr-xscTypes.mli32
1 files changed, 19 insertions, 13 deletions
diff --git a/scTypes.mli b/scTypes.mli
index 642ecd2..deef1a0 100755
--- a/scTypes.mli
+++ b/scTypes.mli
@@ -7,23 +7,22 @@ type cell = (int * int) * (bool * bool)
type ident = UTF8.t
type types =
- | Num : Num.num * (UTF8.t option) -> types (** A number *)
- | Str : UTF8.t -> types (** A string *)
- | Date : Num.num -> types (** A date in julian day *)
+ | Num of Num.num * (UTF8.t option) (** A number *)
+ | Str of UTF8.t (** A string *)
+ | Date of Num.num (** A date in julian day *)
- | Undefined : types (** The content is not defined *)
- | Bool : bool -> types (** A boolean *)
- | List : types list -> types (** List with heterogenous datas *)
+ | Undefined (** The content is not defined *)
+ | Bool of bool (** A boolean *)
type refs =
- | Cell of cell (** A cell *)
- | Range of cell * cell (** An area of cells *)
+ | Cell of cell (** A cell *)
+ | Range of cell * cell (** An area of cells *)
type expression =
- | Value of types (** A direct value *)
- | Ref of refs (** A reference to another cell *)
- | Call of ident * expression list (** A call to a function *)
- | Expression of expression (** An expression *)
+ | Value of types (** A direct value *)
+ | Ref of refs (** A reference to another cell *)
+ | Call of ident * expression list (** A call to a function *)
+ | Expression of expression (** An expression *)
(** Result from a computation *)
type result =
@@ -40,7 +39,14 @@ end
module Refs : sig
- val collect: refs -> (int * int) list
+ type 'a range =
+ | Single of 'a
+ | Array1 of 'a list
+ | Array2 of 'a list list
+
+ val collect: refs -> (int * int) range
+
+ val map: ('a -> 'b) -> 'a range -> 'b range
val shift: (int * int) -> refs -> refs