Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file ast.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)moduletypeId=sigtypet(** The type of identifiers *)typenamespace(** The type of namespaces for identifiers *)valterm:namespace(** The naemspace for terms, types, and pretty much everything *)valmk:namespace->string->t(** Make identifiers from a namespace and a string. *)endmoduletypeTerm=sigtypet(** The type of terms. *)typeid(** The type of identifiers *)typelocation(** The type of locations attached to terms. *)valtType:?loc:location->unit->tvalprop:?loc:location->unit->tvalty_int:?loc:location->unit->tvalwildcard:?loc:location->unit->tvaltrue_:?loc:location->unit->tvalfalse_:?loc:location->unit->t(** Standard pre-defined constants. *)valquoted:?loc:location->string->t(** Create an attribute from a quoted string. *)valconst:?loc:location->id->t(** Create a new constant. *)valint:?loc:location->string->t(** Create an integer constant from a string. *)valapply:?loc:location->t->tlist->t(** Application of terms. *)valcolon:?loc:location->t->t->t(** Juxtaposition of terms, usually used for annotating terms with types. *)valarrow:?loc:location->t->t->t(** Arow, i.e function type constructor, currifyed. *)valeq:?loc:location->t->t->t(** Make an equality between terms. *)valneq:?loc:location->tlist->t(** Make an disequality between terms. *)valnot_:?loc:location->t->tvalor_:?loc:location->tlist->tvaland_:?loc:location->tlist->tvalimply:?loc:location->t->t->tvalequiv:?loc:location->t->t->t(** Usual propositional functions. *)valite:?loc:location->t->t->t->t(** Conditional construction. *)valpi:?loc:location->tlist->t->t(** Dependant product, or polymorphic type quantification.
Used to build polymorphic function types such as,
[Pi [a] (Arrow a a)]. *)valletin:?loc:location->tlist->t->t(** Local term binding. *)valforall:?loc:location->tlist->t->t(** Universal propositional quantification. *)valexists:?loc:location->tlist->t->t(** Existencial propositional qantification. *)valmatch_:?loc:location->t->(t*t)list->t(** Pattern matching. The first term is the term to match,
and each tuple in the list is a match case, which is a pair
of a pattern and a match branch. *)vallambda:?loc:location->tlist->t->t(** Create a lambda. *)valuminus:?loc:location->t->t(** Arithmetic unary minus. *)valadd:?loc:location->t->t->t(** Arithmetic addition. *)valsub:?loc:location->t->t->t(** Arithmetic substraction. *)valmult:?loc:location->t->t->t(** Arithmetic multiplication. *)vallt:?loc:location->t->t->t(** Arithmetic "lesser than" comparison (strict). *)valleq:?loc:location->t->t->t(** Arithmetic "lesser or equal" comparison. *)valgt:?loc:location->t->t->t(** Arithmetic "greater than" comparison (strict). *)valgeq:?loc:location->t->t->t(** Arithmetic "greater or equal" comparison. *)endmoduletypeStatement=sigtypet(** The type of statements. *)typeid(** The type of identifiers *)typeterm(** The type of terms used in statements. *)typelocation(** The type of locations attached to statements. *)valimport:?loc:location->string->tvaldata:?loc:location->?attrs:termlist->tlist->tvaldefs:?loc:location->?attrs:termlist->tlist->tvalrewrite:?loc:location->?attrs:termlist->term->tvalgoal:?loc:location->?attrs:termlist->term->tvalassume:?loc:location->?attrs:termlist->term->tvallemma:?loc:location->?attrs:termlist->term->tvaldecl:?loc:location->?attrs:termlist->id->term->tvaldefinition:?loc:location->?attrs:termlist->id->term->termlist->tvalinductive:?loc:location->?attrs:termlist->id->termlist->(id*termlist)list->tend