aboutsummaryrefslogtreecommitdiff
path: root/scTypes.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-11-24 09:22:24 +0100
committerSébastien Dailly <sebastien@chimrod.com>2017-11-24 09:23:38 +0100
commita6b5a6bdd138a5ccc6827bcc73580df1e9218820 (patch)
treeff577395c1a5951a61a7234322f927f6ead5ee29 /scTypes.mli
parentecb6fd62c275af03a07d892313ab3914d81cd40e (diff)
Moved all the code to src directory
Diffstat (limited to 'scTypes.mli')
-rwxr-xr-xscTypes.mli126
1 files changed, 0 insertions, 126 deletions
diff --git a/scTypes.mli b/scTypes.mli
deleted file mode 100755
index 348f4fe..0000000
--- a/scTypes.mli
+++ /dev/null
@@ -1,126 +0,0 @@
-(** All the types used in the spreadsheet. *)
-
-exception Error
-
-type cell = (int * int) * (bool * bool)
-
-type ident = UTF8.t
-
-type 'a dataFormat =
- | Date: DataType.Num.t dataFormat (* A date in julian day *)
- | Number: DataType.Num.t dataFormat (* Number *)
- | String: DataType.String.t dataFormat (* String *)
- | Bool: DataType.Bool.t dataFormat (* Boolean *)
-
-type 'a returnType =
- | Num : DataType.Num.t dataFormat option -> DataType.Num.t returnType (** A number *)
- | Str : DataType.String.t returnType (** A string *)
- | Bool : DataType.Bool.t returnType (** A boolean *)
-
-type numericType =
- | Date
- | Number
-
-val get_numeric_type: DataType.Num.t dataFormat -> numericType
-
-type 'a types = private
- | Num : DataType.Num.t dataFormat * DataType.Num.t -> DataType.Num.t types (** A number *)
- | Str : DataType.String.t -> DataType.String.t types (** A string *)
- | Bool : DataType.Bool.t -> DataType.Bool.t types (** A boolean *)
-
-val number: DataType.Num.t -> DataType.Num.t types
-val string: DataType.String.t -> DataType.String.t types
-val boolean: DataType.Bool.t -> DataType.Bool.t types
-val date: DataType.Num.t -> DataType.Num.t types
-
-
-(** Numeric (any format) *)
-val f_num: DataType.Num.t returnType
-
-(** Date *)
-val f_date: DataType.Num.t returnType
-
-(** Number *)
-val f_number: DataType.Num.t returnType
-
-(** Boolean result *)
-val f_bool: DataType.Bool.t returnType
-
-(** String *)
-val f_string: DataType.String.t returnType
-
-type refs =
- | Cell of cell (** A cell *)
- | Range of cell * cell (** An area of cells *)
-
-(** This is the cell content *)
-type expression =
- | Value : 'a types -> expression (** A direct value *)
- | Ref : refs -> expression (** A reference to another cell *)
- | Call : ident * expression list -> expression (** A call to a function *)
- | Expression : expression -> expression (** An expression *)
-
-(** Result from a computation *)
-type result =
- | Result : 'a types -> result
- | Error : exn -> result
-
-module DataFormat : sig
-
- type formats = F : 'a dataFormat -> formats [@@unboxed]
-
- val guess_format_result: 'a returnType -> (unit -> formats list) -> 'a dataFormat
-
-end
-
-module Type : sig
-
- type t = Value: 'a dataFormat * 'a -> t
-
- val (=) : 'a types -> 'b types -> bool
-
- val show: UTF8.Buffer.buffer -> 'a types -> unit
-
- val show_full: UTF8.Buffer.buffer -> 'a types -> unit
-
-end
-
-module Refs : sig
-
- 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
-
- 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]
-
- (** extract the content from a range.
-
- May raise Errors.TypeError if the range cannot be unified.
- *)
- val get_content : result option range -> refContent
-
-end
-
-val show_expr: UTF8.Buffer.buffer -> expression -> unit
-
-module Result : sig
-
- val (=) : result -> result -> bool
-
- val show: result -> UTF8.t
-
-end
-