(** All the types used in the spreadsheet. *) exception Error type cell = (int * int) * (bool * bool) type ident = UTF8.t type types = | Num of Num.num * (UTF8.t option) (** A number *) | Str of UTF8.t (** A string *) | Date of Num.num (** A date in julian day *) | Bool of bool (** A boolean *) 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 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 end val show_expr: UTF8.Buffer.buffer -> expression -> unit module Result : sig val (=) : result -> result -> bool val show: result -> UTF8.t end