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 datatype of an element 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.Calls a built-in function with one type parameter.private static booleanReturns whether you can assign a value offromTypeto a variable of typetoType.CoreBuilder.extent(TypeSystem typeSystem, Type type, com.google.common.collect.RangeSet rangeSet) Creates an extent.CoreBuilder.extent(TypeSystem typeSystem, Type type, Map<String, com.google.common.collect.ImmutableRangeSet> rangeSetMap) CoreBuilder.from(Type type, List<Core.FromStep> steps) CoreBuilder.functionLiteral(Type type, BuiltIn builtIn) Creates a function literal.Creates an IdPat with a given name and ordinal.CoreBuilder.idPat(Type type, String name, ToIntFunction<String> 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.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.NamedPatReturns a copy of this pattern with a given type; or this pattern if the type is the same.Constructors 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)From(Type type, com.google.common.collect.ImmutableList<Core.FromStep> steps) (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)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 an AST node's data type.private @Nullable TypeTypeResolver.getType(TypeResolver.TypeEnv env, Ast.Exp exp) @Nullable TypeTypeMap.getTypeOpt(AstNode node) Returns an AST node's data type, or null if no type is known.@Nullable TypeTypeResolver.BindTypeEnv.getTypeOpt(String name) @Nullable TypeTypeResolver.EmptyTypeEnv.getTypeOpt(String name) @Nullable TypeTypeResolver.EnvironmentTypeEnv.getTypeOpt(String name) @Nullable TypeTypeResolver.TypeEnv.getTypeOpt(String name) Returns the datatype of a variable, 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.TypeMap.TermToTypeConverter.visit(Unifier.Sequence sequence) TypeMap.TermToTypeConverter.visit(Unifier.Variable variable) Methods in net.hydromatic.morel.compile with parameters of type TypeModifier and TypeMethodDescriptionvoidTypeResolver.TypeEnvHolder.accept(String name, Binding.Kind kind, Type type) private static booleanPretty.canPrintTabular(Type type) Can print a type in tabular format if it is a list of records.private ApplicableCompiler.compileApplicable(Compiler.Context cx, Core.Exp fn, Type argType, Pos pos) Compiles a function value to anApplicable, if possible, or returns null.private Core.IdPatprotected Supplier<Codes.RowSink> Compiler.createRowSinkFactory(Compiler.Context cx0, Core.StepEnv stepEnv, List<Core.FromStep> steps, Type elementType) private booleanPretty.customPrint(@NonNull StringBuilder buf, int indent, int[] lineEnd, int depth, Type type, Object o) Tries to print a value using a custom formatter.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(@NonNull StringBuilder buf, @NonNull Type type, @NonNull Object value) Prints a value to a buffer.private StringBuilderPretty.pretty1(@NonNull StringBuilder buf, int indent, int[] lineEnd, int depth, @NonNull Type type, @NonNull Object value, int leftPrec, int rightPrec) Prints a value to a buffer.private StringBuilderPretty.pretty2(@NonNull StringBuilder buf, int indent, int[] lineEnd, int depth, @NonNull Type type, @NonNull Object value, int leftPrec, int rightPrec) private StringBuilderPretty.prettyCollectionType(StringBuilder buf, int[] lineEnd, int depth, Type type, Pretty.TypeVal typeVal, int leftPrec, int rightPrec, int indent2, String typeName) Prints "list" and "bag" types in a similar way.private StringBuilderPretty.prettyType(StringBuilder buf, int indent, int[] lineEnd, int depth, Type type, Pretty.TypeVal typeVal, int leftPrec, int rightPrec) private StringBuilderPretty.printList(@NonNull StringBuilder buf, int indent, int[] lineEnd, int depth, @NonNull Type elementType, @NonNull List<Object> list) private TypeCalciteCompiler.removeTypeVars(Type type) Converts each type variable in a type to a dummy record type,{b: bool}.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 Function<TypeSystem, Unifier.Term> TypeResolver.TypeEnvHolder.typeToTerm(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, TriConsumer<String, Binding.Kind, Type> consumer) Calls a consumer for each variable and its type.private List<Unifier.Term> TypeResolver.toTerms(Collection<? extends Type> types, TypeResolver.Subst subst) private List<Unifier.Term> TypeResolver.toTerms(List<? 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, @NonNull PrimitiveType preferredType, Function<TypeSystem, Type> typeFunction) privateResolver(TypeMap typeMap, NameGenerator nameGenerator, Map<Pair<Core.NamedPat, Type>, Core.NamedPat> variantIdMap, Map<String, Pair<Core.IdPat, List<Core.IdPat>>> resolvedOverloads, Environment env, @Nullable Session session, @Nullable Core.Exp current) -
Uses of Type in net.hydromatic.morel.eval
Methods in net.hydromatic.morel.eval with parameters of type TypeModifier and TypeMethodDescription(package private) ComparatorComparators.ComparatorBuilder.comparatorFor(Type t2) static ComparatorComparators.comparatorFor(TypeSystem typeSystem, Type type) Returns a comparator for a given type.private ComparatorComparators.ComparatorBuilder.comparatorFor1(Type type) private ComparatorComparators.ComparatorBuilder.comparatorFor2(Type type) private Comparator<List> Comparators.ComparatorBuilder.listComparator(Type elementType) private static Core.ExpCodes.sysEnv(TypeSystem typeSystem, Environment env, Type argType) static ApplicableReturns an applicable that constructs an instance of a datatype.Codes.Comparer.withType(TypeSystem typeSystem, Type type) Codes.Typed.withType(TypeSystem typeSystem, Type type) -
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(List<String> tablePath, org.apache.calcite.schema.Table table, TypeSystem typeSystem) private TypeCalciteForeignValue.toType(org.apache.calcite.schema.SchemaPlus schema, 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.private static Converters.C2mConverters.C2m.forMorelCollection(Type type, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, boolean nullable, boolean recordList) 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.classOverloaded type.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.arguments(package private) final Map<BuiltIn.BuiltInType, Type> TypeSystem.builtInTypesParameterizedType.parameterTypesTypeSystem.typeByKeyTypeSystem.typeByNameMultiType.typesTypeUnifier.variablesMethods in net.hydromatic.morel.type that return TypeModifier and TypeMethodDescriptionDataType.arg(int i) ListType.arg(int i) default TypeType.arg(int i) Returns theith type parameter.PrimitiveType.argType(int i) RecordLikeType.argType(int i) Returns the type of theith field, or throws.RecordType.argType(int i) TupleType.argType(int i) Creates a "bag" type.TypeSystem.ForallHelper.bag(int i) Creates type`i bag.Creates a bag type.MultiType.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) Creates a data type scheme: a datatype if there are no type arguments (e.gTypeSystem.descending()Returns the "descending" built-in data type.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.lookup(BuiltIn.BuiltInType builtInType) Looks up a built-in type.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.order()Returns the "order" built-in data type.TypeSystem.recordOrScalarType(Collection<Map.Entry<String, 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.FnKey.toType(TypeSystem typeSystem) Keys.ForallKey.toType(TypeSystem typeSystem) Keys.ListKey.toType(TypeSystem typeSystem) Keys.MultiTypeKey.toType(TypeSystem typeSystem) Keys.NameKey.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.unqualified(Type type) Removes any "forall" qualifier of a type, and renumbers the remaining type variables.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()Returns a map of the field types, keyed by field names.RecordType.argNameTypes()TupleType.argNameTypes()RecordLikeType.argTypes()Returns a list of field types, ordered by field names.TupleType.argTypes()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 TypeMethodDescriptionCreates a "bag" type.Creates a bag type.booleanFnType.canCallArgOf(Type type) booleanForallType.canCallArgOf(Type type) default booleanType.canCallArgOf(Type type) Whether this type is a function that can call an argument of given 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 a multi-type from an array of types.Creates an "option" type.private <E extends Comparable<E>>
booleanRangeExtent.populate(TypeSystem typeSystem, Type type, String path, Map<String, com.google.common.collect.ImmutableRangeSet> rangeSetMap, Consumer<E> consumer) Populates a list (or other consumer) with all values of this type.booleanDataType.specializes(Type type) booleanListType.specializes(Type type) booleanPrimitiveType.specializes(Type type) booleanRecordType.specializes(Type type) booleanTupleType.specializes(Type type) default booleanType.specializes(Type type) Whether this type is the same as, or a specialization of, a given type.booleanTypeVar.specializes(Type type) private <E extends Comparable<E>>
Iterable<E> RangeExtent.toList(Type type, TypeSystem typeSystem) Derives the collection of values in the range, or returns empty if the range is infinite.(package private) booleanCreates a tuple type from an array of types.TypeSystem.unqualified(Type type) Removes any "forall" qualifier of a type, and renumbers the remaining type variables.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) MultiType.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, com.google.common.collect.ImmutableList<Type> argumentTypes, com.google.common.collect.ImmutableMap<String, Type.Key> tyCons) Creates an algebraic type.TypeSystem.forallType(int typeCount, Function<TypeSystem.ForallHelper, Type> builder) Creates a "forall" type.Creates a multi-type.TypeSystem.progressiveRecordType(Collection<Map.Entry<String, Type>> argNameTypes) Creates a progressive record type.TypeSystem.progressiveRecordType(SortedMap<String, Type> argNameTypes) Creates a progressive record type.TypeSystem.recordOrScalarType(Collection<Map.Entry<String, Type>> argNameTypes) Creates a record type, or returns a scalar type ifargNameTypeshas one entry.TypeSystem.recordType(Collection<Map.Entry<String, Type>> argNameTypes) Creates a record type.TypeSystem.recordType(SortedMap<String, ? extends Type> argNameTypes) Creates a record type.ForallType.substitute(TypeSystem typeSystem, List<? extends Type> types) (package private) Type.KeyKeys.DataTypeKey.substitute(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) 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(TypeSystem typeSystem, Type type, Map<String, com.google.common.collect.ImmutableRangeSet> rangeSetMap) Creates a RangeExtent.Constructor parameters in net.hydromatic.morel.type with type arguments of type TypeModifierConstructorDescriptionprotectedDataType(String name, String moniker, com.google.common.collect.ImmutableList<Type> arguments, com.google.common.collect.ImmutableMap<String, Type.Key> typeConstructors) Creates a DataType.(package private)(package private)ProgressiveRecordType(SortedMap<String, Type> argNameTypes) Creates a ProgressiveRecordType.(package private)RecordType(SortedMap<String, Type> argNameTypes) (package private)