diff options
Diffstat (limited to 'contrib/extraction/mlutil.mli')
| -rw-r--r-- | contrib/extraction/mlutil.mli | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/contrib/extraction/mlutil.mli b/contrib/extraction/mlutil.mli index 327ef5b949..7d5373a916 100644 --- a/contrib/extraction/mlutil.mli +++ b/contrib/extraction/mlutil.mli @@ -19,16 +19,23 @@ open Nametab val anonymous : identifier val prop_name : identifier -(* Utility functions over ML types. [update_args sp vl t] puts [vl] +(*s [collect_lambda MLlam(id1,...MLlam(idn,t)...)] returns + the list [idn;...;id1] and the term [t]. *) + +val collect_lams : ml_ast -> identifier list * ml_ast + +(*s [anonym_lams a n] creates [n] anonymous [MLlam] in front of [a] *) + +val anonym_lams : ml_ast -> int -> ml_ast + +(*s Utility functions over ML types. [update_args sp vl t] puts [vl] as arguments behind every inductive types [(sp,_)]. *) val update_args : section_path -> ml_type list -> ml_type -> ml_type -exception Found_sp - val sp_of_r : global_reference -> section_path -val parse_ml_type : section_path -> ml_type -> unit +val type_mem_sp : section_path -> ml_type -> bool (*s Utility functions over ML terms. [occurs n t] checks whether [Rel n] occurs (freely) in [t]. [ml_lift] is de Bruijn @@ -40,28 +47,13 @@ val ml_lift : int -> ml_ast -> ml_ast val ml_subst : ml_ast -> ml_ast -> ml_ast -val subst_glob_ast : global_reference -> ml_ast -> ml_ast -> ml_ast - -(*s [collect_lambda MLlam(id1,...MLlam(idn,t)...)] returns - the list [idn;...;id1] and the term [t]. *) - -val collect_lams : ml_ast -> identifier list * ml_ast - -(* [named_abstract] is the converse of [collect_lambda]. *) - -val named_lams : ml_ast -> identifier list -> ml_ast - -val anonym_lams : ml_ast -> int -> ml_ast - - -(*s Some transformations of ML terms. [normalize] and [normalize_decl] reduce +(*s Some transformations of ML terms. [normalize] simplify all beta redexes (when the argument does not occur, it is just thrown away; when it occurs exactly once it is substituted; otherwise a let in redex is created for clarity) and iota redexes, plus some other - optimizations. *) (* TO UPDATE *) + optimizations. *) val normalize : ml_ast -> ml_ast -val normalize_decl : ml_decl -> ml_decl (*s Optimization. *) |
