Frontend.Environment
Type environments used during typechecking. Maps from strings to function or variable information
Origin blocks, to keep track of where variables are declared
Information available for each variable
type info = {
type_ : Middle.UnsizedType.t;
kind : [ `Variable of varinfo
| `UserDeclared of Middle.Location_span.t
| `StanMath
| `UserDefined ];
}
val stan_math_environment : t
A type environment which contains the Stan math library functions
val add :
t ->
string ->
Middle.UnsizedType.t ->
[ `UserDeclared of Middle.Location_span.t
| `StanMath
| `UserDefined
| `Variable of varinfo ] ->
t
Add a new item to the type environment. Does not overwrite existing, but shadows
val mem : t -> string -> bool
val nearest_ident : t -> string -> string option
The nearest identifier by edit distance, capped at edit distance 3 (if one exists)