123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566open!Stdppxopen!ImportopenLanguageopenTypedmoduletypeEnv=sigtypet(** An [Env.t] populated with initial bindings for [heap] and [stack] *)valinitial:tvalfind:t->'aIdentifier.t->'aValue.toptionvalfind_expanding_sets:t->'aIdentifier.t->'aValue.tNonempty_list.toption(** [bind env ~loc ~is_set pat value] adds a new binding to [pat] in [env]. [value] is
used for the [preserve_atoms] entry, and its fully expanded version for the
[expand_atoms_bound_to_sets] entry.
Produces an [Error] if binding against this pattern would shadow an identifier from
a different namespace, or if evaluating value while expanding identifiers produces
an error. *)valbind:t->loc:location->is_set:bool->'aPattern.t->'aValue.t->(t,Syntax_error.t)result(** [bind_set env ~loc ident values] adds a new set binding to [ident] in [env]. [ident]
is used as the [preserve_atoms] entry, and [values] as the
[expand_atoms_bound_to_sets] entry. *)valbind_set:t->loc:location->'aType.non_tuplePattern.t->'aType.non_tupleValue.tNonempty_list.t->(t,Syntax_error.t)result(** Evaluate an expression in the given environment. Unbound [Expression.Identifier]s
are evaluated as an equivalent [Value.Identifier] under the assumption that the
identifier will be interpreted by the OCaml compiler; if it is not, we let the
compiler report the error to the user. *)(** Evaluate a singleton expression without expanding identifiers bound to sets,
producing a single value. *)valeval_singleton:t->('a,Expression.singleton)Expression.tLoc.t->('aValue.t,Syntax_error.t)result(** Evaluate an expression that may contain unions, treating identifiers as determined
by [lookup]. Always produces a set of values. *)valeval:t->Attribute_handler.lookup->('a,Expression.set)Expression.tLoc.t->('aValue.tNonempty_list.t,Syntax_error.t)resultvalinstantiate:t->Attribute_handler.Poly.tExplicitness.With.tlist->((t*Value.Basic.packedlistExplicitness.With.tAxis.Map.t)Nonempty_list.t,Syntax_error.t)resultend