diff options
author | Samuel Mimram <smimram@debian.org> | 2006-06-16 14:41:51 +0000 |
---|---|---|
committer | Samuel Mimram <smimram@debian.org> | 2006-06-16 14:41:51 +0000 |
commit | 35335c0605a84770f93965ea6b315cd369e9b731 (patch) | |
tree | 87b219b3275f8e21e88ed2970da3c056bc8f19e6 /dev/ocamlweb-doc/ast.ml | |
parent | fe730babfe0c01baa6c6da62460938f8839aa7c6 (diff) | |
parent | e978da8c41d8a3c19a29036d9c569fbe2a4616b0 (diff) |
Merge commit 'upstream/8.0pl3+8.1beta' into 8.1
Diffstat (limited to 'dev/ocamlweb-doc/ast.ml')
-rw-r--r-- | dev/ocamlweb-doc/ast.ml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dev/ocamlweb-doc/ast.ml b/dev/ocamlweb-doc/ast.ml new file mode 100644 index 00000000..2153ef47 --- /dev/null +++ b/dev/ocamlweb-doc/ast.ml @@ -0,0 +1,47 @@ + +type constr_ast = + Pair of constr_ast * constr_ast +| Prod of binder list * constr_ast +| Lambda of binder list * constr_ast +| Let of string * constr_ast * constr_ast +| LetCase of binder list * constr_ast * constr_ast +| IfCase of constr_ast * constr_ast * constr_ast +| Eval of red_fun * constr_ast +| Infix of string * constr_ast * constr_ast +| Prefix of string * constr_ast +| Postfix of string * constr_ast +| Appl of constr_ast * constr_arg list +| ApplExpl of string list * constr_ast list +| Scope of string * constr_ast +| Qualid of string list +| Prop | Set | Type +| Int of string +| Hole +| Meta of string +| Fixp of fix_kind * + (string * binder list * constr_ast * string option * constr_ast) list * + string +| Match of case_item list * constr_ast option * + (pattern list * constr_ast) list + +and red_fun = Simpl + +and binder = string * constr_ast + +and constr_arg = string option * constr_ast + +and fix_kind = Fix | CoFix + +and case_item = constr_ast * (string option * constr_ast option) + +and pattern = + PatAs of pattern * string +| PatType of pattern * constr_ast +| PatConstr of string * pattern list +| PatVar of string + +let mk_cast c t = + if t=Hole then c else Infix(":",c,t) + +let mk_lambda bl t = + if bl=[] then t else Lambda(bl,t) |