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