|
|
@ -35,12 +35,7 @@ type verdict =
|
|
|
|
| Goto of string
|
|
|
|
| Goto of string
|
|
|
|
|
|
|
|
|
|
|
|
type _ stmt =
|
|
|
|
type _ stmt =
|
|
|
|
| Match : {
|
|
|
|
| Match : (('a, 'b) match_op * 'a expr * 'b expr) -> unit stmt
|
|
|
|
left : 'a expr;
|
|
|
|
|
|
|
|
right : 'b expr;
|
|
|
|
|
|
|
|
op : ('a, 'b) match_op;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
-> unit stmt
|
|
|
|
|
|
|
|
| Counter : counter -> unit stmt
|
|
|
|
| Counter : counter -> unit stmt
|
|
|
|
| Verdict : verdict -> unit stmt
|
|
|
|
| Verdict : verdict -> unit stmt
|
|
|
|
| NoTrack : unit stmt
|
|
|
|
| NoTrack : unit stmt
|
|
|
@ -136,7 +131,7 @@ let json_of_verdict = function
|
|
|
|
| Goto s -> assoc_one "goto" (assoc_one "target" (`String s))
|
|
|
|
| Goto s -> assoc_one "goto" (assoc_one "target" (`String s))
|
|
|
|
|
|
|
|
|
|
|
|
let json_of_stmt : type a. a stmt -> Yojson.Basic.t = function
|
|
|
|
let json_of_stmt : type a. a stmt -> Yojson.Basic.t = function
|
|
|
|
| Match { left; right; op } ->
|
|
|
|
| Match (op, left, right) ->
|
|
|
|
assoc_one "match"
|
|
|
|
assoc_one "match"
|
|
|
|
(`Assoc
|
|
|
|
(`Assoc
|
|
|
|
[
|
|
|
|
[
|
|
|
|