Package net.hydromatic.morel.compile
Class TypeResolver.TypeMap
- java.lang.Object
-
- net.hydromatic.morel.compile.TypeResolver.TypeMap
-
- Enclosing class:
- TypeResolver
public static class TypeResolver.TypeMap extends java.lang.ObjectThe result of type resolution, a map from AST nodes to types.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<AstNode,Unifier.Term>nodeTypeTerms(package private) Unifier.Substitutionsubstitution(package private) TypeSystemtypeSystem(package private) java.util.Map<java.lang.String,TypeVar>typeVars
-
Constructor Summary
Constructors Constructor Description TypeMap(TypeSystem typeSystem, java.util.Map<AstNode,Unifier.Term> nodeTypeTerms, Unifier.Substitution substitution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypegetType(AstNode node)Returns a type of an AST node.booleanhasType(AstNode node)Returns whether an AST node has a type.private TypetermToType(Unifier.Term term)
-
-
-
Field Detail
-
typeSystem
final TypeSystem typeSystem
-
nodeTypeTerms
final java.util.Map<AstNode,Unifier.Term> nodeTypeTerms
-
substitution
final Unifier.Substitution substitution
-
typeVars
final java.util.Map<java.lang.String,TypeVar> typeVars
-
-
Constructor Detail
-
TypeMap
TypeMap(TypeSystem typeSystem, java.util.Map<AstNode,Unifier.Term> nodeTypeTerms, Unifier.Substitution substitution)
-
-
Method Detail
-
termToType
private Type termToType(Unifier.Term term)
-
hasType
public boolean hasType(AstNode node)
Returns whether an AST node has a type.If it does not, perhaps it was ignored by the unification algorithm because it is not relevant to the program.
-
-