From f135a5fcb6c9827d07025a143b190cbbf8eddc15 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Fri, 13 Oct 2023 16:18:34 +0200 Subject: Made the interface more parametrized --- lib/syntax/S.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/syntax/S.ml') diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml index 3b24aff..e6c472d 100644 --- a/lib/syntax/S.ml +++ b/lib/syntax/S.ml @@ -24,6 +24,8 @@ type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option } If missing, the index should be considered as [0].*) +type ('a, 'b) clause = pos * 'a * 'b repr list + (** Represent the evaluation over an expression *) module type Expression = sig type t @@ -75,9 +77,13 @@ module type Instruction = sig val expression : expression -> t repr (** Raw expression *) - type clause = pos * expression * t repr list + val if_ : + pos -> + (expression, t) clause -> + elifs:(expression, t) clause list -> + else_:t repr list -> + t repr - val if_ : pos -> clause -> elifs:clause list -> else_:t repr list -> t repr val act : pos -> label:expression -> t repr list -> t repr val assign : -- cgit v1.2.3