Asttypes(3)
okay so bestie, welcome to Asttypes(3) from the OCaml library manual π. This page is about the auxiliary AST types used by parsetree and typedtree, and yes, it's giving compiler-internals main character energy.
πΈ NAME πΈ
Asttypes β Auxiliary AST types used by parsetree and typedtree.
π¦ MODULE π¦
Module: Asttypes
π DOCUMENTATION π
Module: Asttypes
Module Asttypes
: sig end
Auxiliary AST types used by parsetree and typedtree.
Warning: this module is unstable and part of Compiler_libs .
Here's every type and constructor, preserved exactly, no cap:
type constant
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
type rec_flag =
| Nonrecursive
| Recursive
type direction_flag
type direction_flag =
| Upto
| Downto
type private_flag
type private_flag =
| Private
| Public
type mutable_flag
type mutable_flag =
| Immutable
| Mutable
type atomic_flag
type atomic_flag =
| Nonatomic
| Atomic
type virtual_flag
type virtual_flag =
| Virtual
| Concrete
type override_flag
type override_flag =
| Override
| Fresh
type closed_flag
type closed_flag =
| Closed
| Open
type label = string
type label = string
type arg_label
type arg_label =
| Nolabel
| Labelled of string
(* label:T -> ...
*)
| Optional of string
(* ?label:T -> ...
*)
type 'a loc
type 'a loc = 'a Location.loc = {
txt : 'a ;
loc : Location.t ;
}
type variance
type variance =
| Covariant
| Contravariant
| NoVariance
| Bivariant
type injectivity
type injectivity =
| Injective
| NoInjectivity
val string_of_label
val string_of_label : arg_label -> string
alright bestie, that's the whole page. source/version: OCamldoc; date: 2026-06-22; header title: Asttypes(3). mwah πβ¨
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms