(** All the types used in the spreadsheet. *) exception Error 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 *) | Undefined : types (** The content is not defined *) | Bool : bool -> types (** A boolean *) | List : types list -> types (** List with heterogenous datas *) type refs = | 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 *) (** Result from a computation *) type result = | Result of types | Error of exn module Type : sig val (=) : types -> types -> bool val show: UTF8.Buffer.buffer -> types -> unit end module Refs : sig val collect: refs -> (int * int) list val shift: (int * int) -> refs -> refs end val show_expr: UTF8.Buffer.buffer -> expression -> unit module Result : sig val (=) : result -> result -> bool val show: result -> UTF8.t end