Package net.hydromatic.morel.compile
Class TypeResolver.EnvironmentTypeEnv
java.lang.Object
net.hydromatic.morel.compile.TypeResolver.EnvironmentTypeEnv
- All Implemented Interfaces:
TypeResolver.TypeEnv
- Enclosing class:
TypeResolver
Type environment based on an
Environment.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) Returns a term for the variable with a given name, creating if necessary.@Nullable TypegetTypeOpt(String name) Returns the datatype of a variable, or null if no type is known.booleanReturns whether a variable of the given name is defined in this environment.booleanhasOverloaded(String name) Returns whether a given name is overloaded in this environment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.hydromatic.morel.compile.TypeResolver.TypeEnv
bind, bind, bind, collectInstances, count, getKind
-
Field Details
-
env
-
parent
-
-
Constructor Details
-
EnvironmentTypeEnv
EnvironmentTypeEnv(Environment env, TypeResolver.TypeEnv parent)
-
-
Method Details
-
get
public Unifier.Term get(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) Description copied from interface:TypeResolver.TypeEnvReturns a term for the variable with a given name, creating if necessary.- Specified by:
getin interfaceTypeResolver.TypeEnv
-
has
Description copied from interface:TypeResolver.TypeEnvReturns whether a variable of the given name is defined in this environment.- Specified by:
hasin interfaceTypeResolver.TypeEnv
-
hasOverloaded
Description copied from interface:TypeResolver.TypeEnvReturns whether a given name is overloaded in this environment.- Specified by:
hasOverloadedin interfaceTypeResolver.TypeEnv
-
getTypeOpt
Description copied from interface:TypeResolver.TypeEnvReturns the datatype of a variable, or null if no type is known.Generally, type is known for built-in values but not for values in this compilation unit.
- Specified by:
getTypeOptin interfaceTypeResolver.TypeEnv
-