From 824f2987d47e87d58ee2a4a96d7be417aad6aeab Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 31 Jan 2018 13:20:20 +0100 Subject: API refactoring : made the GADT abstract, provide contructor for each case, and deported the expression with evaluation with module functors --- src/sheet.mli | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/sheet.mli') diff --git a/src/sheet.mli b/src/sheet.mli index d768b8f..14856d4 100755 --- a/src/sheet.mli +++ b/src/sheet.mli @@ -12,21 +12,21 @@ module Raw: sig (** Add a new value in the sheet. The previous value is replaced @return All the successors to update and the new sheet. *) - val add: cell -> Expression.t -> t -> Cell.Set.t * t + val add: cell -> Expression.t -> Functions.C.t -> t -> Cell.Set.t * t - val remove: cell -> t -> Cell.Set.t * t + val remove: cell -> Functions.C.t -> t -> Cell.Set.t * t (** Get the value content. @return None if the cell is not defined *) - val get_value: cell -> t -> ScTypes.result option + val get_value: cell -> t -> ScTypes.Result.t option val get_expr: cell -> t -> Expression.t val get_sink: cell -> t -> Cell.Set.t (** Fold over all the defined values *) - val fold: ('a -> cell -> (Expression.t * ScTypes.result ) -> 'a) -> 'a -> t -> 'a + val fold: ('a -> cell -> (Expression.t * ScTypes.Result.t ) -> 'a) -> 'a -> t -> 'a end @@ -37,11 +37,12 @@ type t = { selected: Selection.t; (* The selected cell *) data: Raw.t; history: history; (* Unlimited history *) - yank: yank list (* All the selected cells *) + yank: yank list; (* All the selected cells *) + catalog: Functions.C.t } type search = [ - | `Pattern of ScTypes.result option + | `Pattern of ScTypes.Result.t option | `Next | `Previous ] @@ -75,5 +76,5 @@ val paste: t -> t * int val add: Expression.t -> t -> Cell.Set.t * t (** Create an empty sheet *) -val create: Raw.t -> t +val create: Functions.C.t -> Raw.t -> t -- cgit v1.2.3