diff options
| author | Sébastien Dailly <sebastien@chimrod.com> | 2016-11-21 17:06:19 +0100 | 
|---|---|---|
| committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-01-01 13:30:43 +0100 | 
| commit | 023c11470e32744a43b7e3c7c248f3c47ebdc687 (patch) | |
| tree | 832e04c2923295d5adf61e58d9a333afb5b26c77 /scTypes.mli | |
| parent | ef312564ca84a2b49fc291434d8fb2f8501bb618 (diff) | |
Use gadt for function catalog
Diffstat (limited to 'scTypes.mli')
| -rwxr-xr-x | scTypes.mli | 32 | 
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
 | 
