Created
August 18, 2015 16:05
-
-
Save gsg/5a22d2e6a543c7aef006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type binop = Add | Sub | Mul | Div | |
type cmpop = Lt | Gt | LtEq | GtEq | Eq | NotEq | |
type 'a arith = AInt : int arith | AFloat : float arith | |
type 'a comparable = | |
| CBool : bool comparable | |
| Arith : 'a arith -> 'a comparable | |
type 'a expr = | |
| Bool : bool -> bool expr | |
| Int : int -> int expr | |
| Float : float -> float expr | |
| BinOp : 'a arith * binop * 'a expr * 'a expr -> 'a expr | |
| Cmp : 'a comparable * cmpop * 'a expr * 'a expr -> bool expr | |
| Not : bool expr -> bool expr | |
| And : bool expr * bool expr -> bool expr | |
| Or : bool expr * bool expr -> bool expr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment