Skip to content

Instantly share code, notes, and snippets.

@gsg
Created July 19, 2016 14:29
Show Gist options
  • Save gsg/d94658e2a428990294e0f69f2f01d5b9 to your computer and use it in GitHub Desktop.
Save gsg/d94658e2a428990294e0f69f2f01d5b9 to your computer and use it in GitHub Desktop.
type arith_op = Add | Sub | Mul | Div
type rel_op = And | Or
type _ term =
| Bool : bool -> bool term
| Int : int -> int term
| Arith : arith_op * int term * int term -> int term
| Rel : rel_op * bool term * bool term -> bool term
| If : bool term * 'a term * 'a term -> 'a term
type plainterm =
| Bool of bool
| Int of int
| Arith of arith_op * plainterm * plainterm
| Rel of rel_op * plainterm * plainterm
| If of plainterm * plainterm * plainterm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment