(* Syntactic sugar to make the DSL more convenient to use as an embedded DSL *) open Imgdsl (* DSL definition *) let int x = LitInt x let load x = Load x let display x = Display x let it = It let ( +% ) x y = Binop (x,Add,y) let ( -% ) x y = Binop (x,Sub,y) let ( *% ) x y = Binop (x,Mul,y) let ( <% ) x y = Binop (x,Lt,y) let ( >% ) x y = Binop (x,Gt,y) let ( =% ) x y = Binop (x,Eq,y) let if_ t ont onf = If(t,ont,onf) let iterate e1 e2 = Iterate(e1,e2)