diff options
author | Chimrod <> | 2023-10-13 16:18:34 +0200 |
---|---|---|
committer | Chimrod <> | 2023-10-18 09:49:47 +0200 |
commit | f135a5fcb6c9827d07025a143b190cbbf8eddc15 (patch) | |
tree | 6dd0ce2c1ab0a827872289336c732378f04f81fd /lib/syntax/S.ml | |
parent | 4b47c572fc7122154813c8bb5da477c0f152f002 (diff) |
Made the interface more parametrized
Diffstat (limited to 'lib/syntax/S.ml')
-rw-r--r-- | lib/syntax/S.ml | 10 |
1 files changed, 8 insertions, 2 deletions
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 : |