Asttypes(3) OCaml library Asttypes(3)

# [NAME](#NAME)

Asttypes - Auxiliary AST types used by parsetree and typedtree.

# [Module](#Module)

Module Asttypes

# [Documentation](#Documentation)

Module **Asttypes**  
: **sig end**

Auxiliary AST types used by parsetree and typedtree.

Warning: this module is unstable and part of **Compiler\_libs** .

*type constant* =  
| Const\_int **of** **int**  
| Const\_char **of** **char**  
| Const\_string **of** **string * Location.t * string option**  
| Const\_float **of** **string**  
| Const\_int32 **of** **int32**  
| Const\_int64 **of** **int64**  
| Const\_nativeint **of** **nativeint**

*type rec\_flag* =  
| Nonrecursive  
| Recursive

*type direction\_flag* =  
| Upto  
| Downto

*type private\_flag* =  
| Private  
| Public

*type mutable\_flag* =  
| Immutable  
| Mutable

*type virtual\_flag* =  
| Virtual  
| Concrete

*type override\_flag* =  
| Override  
| Fresh

*type closed\_flag* =  
| Closed  
| Open

*type label* = **string**

*type arg\_label* =  
| Nolabel  
| Labelled **of** **string**  
(* **label:T -&gt; ...**

\*)  
| Optional **of** **string**  
(* **?label:T -&gt; ...**

\*)

*type* **'a** *loc* = **'a Location.loc** = {  
txt : **'a** ;  
loc : **Location.t** ;  
}

*type variance* =  
| Covariant  
| Contravariant  
| NoVariance

*type injectivity* =  
| Injective  
| NoInjectivity

2026-09-15 OCamldoc

---

Document: Asttypes(3o) from ocaml-4 4.14.4-r3 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
