Uses of Interface
net.hydromatic.morel.type.Type
Packages that use Type
Package
Description
Abstract syntax tree.
Validates programs
(represented as
AstNode),
deduces their type,
and compiles them into code that can be evaluated.Evaluates expressions.
Provides access to external data sources.
Type system.
-
Uses of Type in net.hydromatic.morel.ast
Fields in net.hydromatic.morel.ast declared as TypeModifier and TypeFieldDescriptionfinal TypeCore.Aggregate.typefinal TypeCore.Exp.typefinal TypeCore.Pat.typeMethods in net.hydromatic.morel.ast that return TypeModifier and TypeMethodDescriptionprivate TypeCoreBuilder.fromElementType(TypeSystem typeSystem, List<Core.FromStep> steps) Returns the element type of aCore.Fromwith the given steps.Core.Exp.type()Returns the type.Core.Pat.type()Returns the type.Methods in net.hydromatic.morel.ast with parameters of type TypeModifier and TypeMethodDescriptionCreates aCore.Apply.private Core.ExpCoreBuilder.asPat(Type type, String name, NameGenerator nameGenerator, Core.Pat pat) Creates an AsPat with a given name, generating an ordinal to distinguish it from other declarations with the same name elsewhere in the program.private Core.ApplyCalls a built-in function with one type parameter.CoreBuilder.extent(TypeSystem typeSystem, Type type, com.google.common.collect.RangeSet<Comparable> rangeSet) Creates an extent.Creates an IdPat with a given name and ordinal.CoreBuilder.idPat(Type type, String name, NameGenerator nameGenerator) Creates an IdPat with a given name, generating an ordinal to distinguish it from other declarations with the same name elsewhere in the program.CoreBuilder.idPat(Type type, NameGenerator nameGenerator) Creates an IdPat with a system-generated unique name.CoreBuilder.list(TypeSystem typeSystem, Type elementType, List<Core.Exp> args) Creates a list.CoreBuilder.literalPat(Op op, Type type, Comparable value) CoreBuilder.wildcardPat(Type type) abstract Core.NamedPatConstructors in net.hydromatic.morel.ast with parameters of type TypeModifierConstructorDescription(package private)(package private)protected(package private)Case(Pos pos, Type type, Core.Exp exp, com.google.common.collect.ImmutableList<Core.Match> matchList) protectedMostly-private constructor.(package private)(package private)(package private)(package private)(package private)Literal(Op op, Type type, Comparable value) Creates a Literal.(package private)LiteralPat(Op op, Type type, Comparable value) (package private)(package private)(package private)(package private)WildcardPat(Type type) -
Uses of Type in net.hydromatic.morel.compile
Fields in net.hydromatic.morel.compile declared as TypeModifier and TypeFieldDescription(package private) final TypeCalciteCompiler.VarData.type(package private) final TypePretty.LabelVal.type(package private) final TypePretty.TypedVal.type(package private) final TypePretty.TypeVal.typeFields in net.hydromatic.morel.compile with type parameters of type TypeModifier and TypeFieldDescriptionfinal Function<TypeSystem, Type> BuiltIn.typeFunctionDerives a type, in a particular type system, for this constant or function.private final Map<Pair<Core.NamedPat, Type>, Core.NamedPat> Resolver.variantIdMapContains variable declarations whose type at the point they are used is different (more specific) than in their declaration.Methods in net.hydromatic.morel.compile that return TypeModifier and TypeMethodDescriptionCompiledStatement.getType()Returns the type of an AST node.TypeMap.getTypeOpt(AstNode node) Returns the type of an AST node, or null if no type is known.private TypeCalciteCompiler.removeTypeVars(Type type) Converts each type variable in a type to a dummy record type,{b: bool}.(package private) TypeTypeMap.termToType(Unifier.Term term) static TypeTypeResolver.toType(Ast.Type type, TypeSystem typeSystem) Converts a type AST to a type.private static TypePretty.unqualified(Type type) TypeMap.TermToTypeConverter.visit(Unifier.Sequence sequence) TypeMap.TermToTypeConverter.visit(Unifier.Variable variable) Methods in net.hydromatic.morel.compile with parameters of type TypeModifier and TypeMethodDescriptionvoidprivate ApplicableCompiler.compileApplicable(Compiler.Context cx, Core.Exp fn, Type argType, Pos pos) Compiles a function value to anApplicable, if possible, or returns null.protected Supplier<Codes.RowSink> Compiler.createRowSinkFactory(Compiler.Context cx0, com.google.common.collect.ImmutableList<Binding> bindings, List<Core.FromStep> steps, Type elementType) Macro.expand(TypeSystem typeSystem, Environment env, Type argType) protected CodeCalciteCompiler.finishCompileApply(Compiler.Context cx, Applicable fnValue, Code argCode, Type argType) protected CodeCalciteCompiler.finishCompileApply(Compiler.Context cx, Code fnCode, Code argCode, Type argType) protected CodeCompiler.finishCompileApply(Compiler.Context cx, Applicable fnValue, Code argCode, Type argType) protected CodeCompiler.finishCompileApply(Compiler.Context cx, Code fnCode, Code argCode, Type argType) protected CodeCalciteCompiler.finishCompileLet(Compiler.Context cx, List<Code> matchCodes_, Code resultCode_, Type resultType) protected CodeCompiler.finishCompileLet(Compiler.Context cx, List<Code> matchCodes, Code resultCode, Type resultType) private Ast.ExpTypeResolver.infix(TypeResolver.TypeEnv env, Ast.InfixCall call, Unifier.Variable v, Type type) Registers an infix operator whose type is a given type.private org.apache.calcite.rex.RexNodeCalciteCompiler.morelApply(CalciteCompiler.RelContext cx, Type type, Type argType, org.apache.calcite.rex.RexNode fn, org.apache.calcite.rex.RexNode arg) (package private) StringBuilderPretty.pretty(StringBuilder buf, Type type, Object value) Prints a value to a buffer.private StringBuilderPretty.pretty1(StringBuilder buf, int indent, int[] lineEnd, int depth, Type type, Object value, int leftPrec, int rightPrec) Prints a value to a buffer.private StringBuilderPretty.pretty2(StringBuilder buf, int indent, int[] lineEnd, int depth, Type type, Object value, int leftPrec, int rightPrec) private StringBuilderPretty.prettyType(StringBuilder buf, int indent, int[] lineEnd, int depth, Type type, Pretty.TypeVal typeVal, int leftPrec, int rightPrec) private StringBuilderPretty.printList(StringBuilder buf, int indent, int[] lineEnd, int depth, Type elementType, List<Object> list) private TypeCalciteCompiler.removeTypeVars(Type type) Converts each type variable in a type to a dummy record type,{b: bool}.private static booleanAn actual type subsumes an expected type if it is equal or if progressive record types have been expanded.private @Nullable ApplicableCompiler.toApplicable(Compiler.Context cx, Object o, Type argType, Pos pos) private Core.Patprivate Core.PatConverts a pattern to Core.(package private) CodeCalciteCompiler.toRel4(Environment env, Code code, Type type) private Unifier.TermTypeResolver.toTerm(Type type, TypeResolver.Subst subst) private static TypePretty.unqualified(Type type) Method parameters in net.hydromatic.morel.compile with type arguments of type TypeModifier and TypeMethodDescriptionstatic voidBuiltIn.forEach(TypeSystem typeSystem, BiConsumer<BuiltIn, Type> consumer) Calls a consumer once per value.static voidBuiltIn.forEachStructure(TypeSystem typeSystem, BiConsumer<BuiltIn.Structure, Type> consumer) Calls a consumer once per structure.voidEnvironment.forEachType(TypeSystem typeSystem, BiConsumer<String, Type> consumer) Calls a consumer for each variable and its type.private List<Unifier.Term> TypeResolver.toTerms(Iterable<? extends Type> types, TypeResolver.Subst subst) Constructors in net.hydromatic.morel.compile with parameters of type TypeModifierConstructorDescription(package private)(package private)(package private)(package private)Constructor parameters in net.hydromatic.morel.compile with type arguments of type TypeModifierConstructorDescriptionprivateBuiltIn(@Nullable String structure, String mlName, @Nullable String alias, Function<TypeSystem, Type> typeFunction) privateBuiltIn(@Nullable String structure, String mlName, @Nullable String alias, Function<TypeSystem, Type> typeFunction, @Nullable PrimitiveType preferredType, @Nullable Function<Session, Object> sessionValue) privateprivateBuiltIn(@Nullable String structure, String mlName, PrimitiveType preferredType, Function<TypeSystem, Type> typeFunction) privateResolver(TypeMap typeMap, NameGenerator nameGenerator, Map<Pair<Core.NamedPat, Type>, Core.NamedPat> variantIdMap, Environment env, @Nullable Session session) -
Uses of Type in net.hydromatic.morel.eval
Methods in net.hydromatic.morel.eval with parameters of type TypeModifier and TypeMethodDescriptionprivate static Core.ExpCodes.sysEnv(TypeSystem typeSystem, Environment env, Type argType) static ApplicableReturns an applicable that constructs an instance of a datatype. -
Uses of Type in net.hydromatic.morel.foreign
Fields in net.hydromatic.morel.foreign declared as TypeModifier and TypeFieldDescription(package private) final TypeConverters.FieldConverter.mlType(package private) final TypeConverters.C2m.morelTypeMethods in net.hydromatic.morel.foreign that return TypeModifier and TypeMethodDescriptionstatic TypeConverters.fieldType(org.apache.calcite.rel.type.RelDataTypeField field) private TypeCalciteForeignValue.toType(org.apache.calcite.schema.SchemaPlus schema, TypeSystem typeSystem) private TypeCalciteForeignValue.toType(org.apache.calcite.schema.Table table, TypeSystem typeSystem) CalciteForeignValue.type(TypeSystem typeSystem) ForeignValue.type(TypeSystem typeSystem) Methods in net.hydromatic.morel.foreign with parameters of type TypeModifier and TypeMethodDescriptionCalcite.code(Environment env, org.apache.calcite.rel.RelNode rel, Type type) Creates aCodethat evaluates a Calcite relational expression, converting it to Morel list typetype.(package private) static Converters.C2mConverters.C2m.forMorel(Type type, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, boolean nullable, boolean recordList) Creates a converter for a given Morel type, in the process deducing the corresponding Calcite type.Converters.fromEnumerable(org.apache.calcite.rel.RelNode rel, Type type) Converters.ofField2(Iterator<org.apache.calcite.rel.type.RelDataTypeField> fields, AtomicInteger ordinal, Type type) Converters.ofField3(org.apache.calcite.rel.type.RelDataTypeField field, AtomicInteger ordinal, Type type) Returns a function that converts from Morel objects to Calcite objects.Converters.toCalciteEnumerable(Type type, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) Returns a function that converts from Morel objects to an Enumerable over Calcite rows.static org.apache.calcite.rel.type.RelDataTypeConverters.toCalciteType(Type type, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) Returns a function that converts from Calcite objects to Morel objects.Method parameters in net.hydromatic.morel.foreign with type arguments of type TypeModifier and TypeMethodDescriptionConverters.ofRow3(Iterator<org.apache.calcite.rel.type.RelDataTypeField> fields, AtomicInteger ordinal, org.apache.calcite.linq4j.Enumerator<Type> types) Constructors in net.hydromatic.morel.foreign with parameters of type Type -
Uses of Type in net.hydromatic.morel.type
Subinterfaces of Type in net.hydromatic.morel.typeModifier and TypeInterfaceDescriptioninterfaceType that has a name.interfaceA type that has named fields, as a record type does.Classes in net.hydromatic.morel.type that implement TypeModifier and TypeClassDescription(package private) classAbstract implementation of Type.classAlgebraic type.enumType that is a place-holder for a type constructor that has no arguments; for example, "NONE" in "datatype 'a option = NONE | SOME of 'a" would have dummy type.classThe type of a function value.classUniversally quantified type.classThe type of a list value.classBase class for types that accept type parameters.enumPrimitive type.classProgressive record type.classRecord type.classThe type of a tuple value.classType variable (e.g.Fields in net.hydromatic.morel.type declared as TypeModifier and TypeFieldDescriptionfinal TypeListType.elementTypefinal TypeFnType.paramTypefinal TypeFnType.resultTypefinal TypeForallType.type(package private) final TypeKeys.ForallKey.typefinal TypeRangeExtent.typeFields in net.hydromatic.morel.type with type parameters of type TypeModifier and TypeFieldDescriptionRecordType.argNameTypesTupleType.argTypesDataType.argumentsTypeSystem.internalTypeByNameParameterizedType.parameterTypesTypeSystem.typeByKeyTypeSystem.typeByNameMethods in net.hydromatic.morel.type that return TypeModifier and TypeMethodDescriptionPrimitiveType.argType(int i) RecordLikeType.argType(int i) Returns the type of theith field, or throws.RecordType.argType(int i) TupleType.argType(int i) Type.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.TypeVar.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) Creates a data type scheme: a datatype if there are no type arguments (e.g.TypeSystem.ensureClosed(Type type) Converts a type into aForallTypeif it has free type variables.Creates a multi-step function type.TypeSystem.forallType(int typeCount, Function<TypeSystem.ForallHelper, Type> builder) Creates a "forall" type.Looks up a type by name.TypeSystem.lookupInternal(String name) Looks up an internal type by name.Looks up a type by name, returning null if not found.TypeSystem.ForallHelper.option(int i) Creates type`i option.Creates an "option" type.TypeSystem.recordOrScalarType(SortedMap<String, ? extends Type> argNameTypes) Creates a record type, or returns a scalar type ifargNameTypeshas one entry.ForallType.substitute(TypeSystem typeSystem, List<? extends Type> types) default TypeType.substitute(TypeSystem typeSystem, List<? extends Type> types) Returns a copy of this type, specialized by substituting type parameters.TypeVar.substitute(TypeSystem typeSystem, List<? extends Type> types) Keys.ApplyKey.toType(TypeSystem typeSystem) Keys.ForallKey.toType(TypeSystem typeSystem) Keys.NameKey.toType(TypeSystem typeSystem) Keys.OpKey.toType(TypeSystem typeSystem) Keys.OrdinalKey.toType(TypeSystem typeSystem) Keys.ProgressiveRecordKey.toType(TypeSystem typeSystem) Keys.RecordKey.toType(TypeSystem typeSystem) abstract TypeType.Key.toType(TypeSystem typeSystem) Converts this key to a type, and ensures that it is registered in the type system.Gets a type that matches a key, creating if necessary.TypeSystem.ForallHelper.vector(int i) Creates type`i vector.Creates a "vector" type.private TypeMethods in net.hydromatic.morel.type that return types with arguments of type TypeModifier and TypeMethodDescriptionPrimitiveType.argNameTypes()RecordLikeType.argNameTypes()RecordType.argNameTypes()TupleType.argNameTypes()TypeSystem.dataTypes(List<Keys.DataTypeKey> keys) Creates several data types simultaneously.DataType.typeConstructors(TypeSystem typeSystem) Converts a list of keys to a list of types.Converts a map of keys to a map of types.Methods in net.hydromatic.morel.type with parameters of type TypeModifier and TypeMethodDescriptionprivate com.google.common.collect.DiscreteDomain<? extends Comparable> RangeExtent.discreteDomain(Type type) TypeSystem.ensureClosed(Type type) Converts a type into aForallTypeif it has free type variables.Creates a function type.Creates a multi-step function type.static Type.KeyReturns a key that identifies aForallType.TypeSystem.forallType(int typeCount, Type type) Creates a "for all" type.Creates a list type.Creates an "option" type.private IterableRangeExtent.toIterable(Type type, com.google.common.collect.Range range) Returns the collection of values in the range.private IterableRangeExtent.toIterable(Type type, com.google.common.collect.RangeSet<?> rangeSet) Returns the collection of values in the range.Creates a tuple type from an array of types.Creates a "vector" type.private TypeMethod parameters in net.hydromatic.morel.type with type arguments of type TypeModifier and TypeMethodDescription(package private) static StringParameterizedType.computeMoniker(String name, List<? extends Type> typeVars) DataType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) DummyType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) FnType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) ForallType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) ListType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) PrimitiveType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) RecordType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) TupleType.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) Type.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.TypeVar.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) (package private) DataTypeTypeSystem.dataType(String name, List<? extends Type> argumentTypes, SortedMap<String, Type.Key> tyCons) Creates an algebraic type.TypeSystem.forallType(int typeCount, Function<TypeSystem.ForallHelper, Type> builder) Creates a "forall" type.TypeSystem.progressiveRecordType(SortedMap<String, ? extends Type> argNameTypes) Creates a progressive record type.TypeSystem.recordOrScalarType(SortedMap<String, ? extends Type> argNameTypes) Creates a record type, or returns a scalar type ifargNameTypeshas one entry.TypeSystem.recordType(SortedMap<String, ? extends Type> argNameTypes) Creates a record type.ForallType.substitute(TypeSystem typeSystem, List<? extends Type> types) Keys.OrdinalKey.substitute(List<? extends Type> types) (package private) Type.KeyType.Key.substitute(List<? extends Type> types) If this is a type variableordinal, returns theordinalth type in the list, otherwise this.default TypeType.substitute(TypeSystem typeSystem, List<? extends Type> types) Returns a copy of this type, specialized by substituting type parameters.TypeVar.substitute(TypeSystem typeSystem, List<? extends Type> types) TupleType.toArgNameTypeKeys(List<? extends Type> argTypes) Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1.key, "2" : t2.key, ...Converts a list of types to a list of keys.Converts a map of types to a map of keys.Creates a tuple type.Constructors in net.hydromatic.morel.type with parameters of type TypeModifierConstructorDescription(package private)(package private)(package private)ForallType(int parameterCount, Type type) (package private)RangeExtent(com.google.common.collect.RangeSet rangeSet, Type type) Creates a RangeExtent.Constructor parameters in net.hydromatic.morel.type with type arguments of type TypeModifierConstructorDescription(package private)DataType(String name, String moniker, List<? extends Type> arguments, SortedMap<String, Type.Key> typeConstructors) Creates a DataType.protectedDataType(Op op, String name, String moniker, List<? extends Type> arguments, SortedMap<String, Type.Key> typeConstructors) Called only from DataType constructor.(package private)ProgressiveRecordType(SortedMap<String, Type> argNameTypes) Creates a ProgressiveRecordType.(package private)RecordType(SortedMap<String, Type> argNameTypes) (package private)