Uses of Class
net.hydromatic.morel.type.TypeSystem
Packages that use TypeSystem
Package
Description
Standard ML interpreter, implemented in Java.
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 TypeSystem in net.hydromatic.morel
Fields in net.hydromatic.morel declared as TypeSystemModifier and TypeFieldDescription(package private) final TypeSystemMain.typeSystemprivate final TypeSystemShell.SubShell.typeSystemConstructors in net.hydromatic.morel with parameters of type TypeSystemModifierConstructorDescription(package private)SubShell(int depth, int maxDepth, Shell.LineFn lineFn, boolean echo, TypeSystem typeSystem, Environment env, Consumer<String> outLines, Session session, File directory) -
Uses of TypeSystem in net.hydromatic.morel.ast
Fields in net.hydromatic.morel.ast declared as TypeSystemModifier and TypeFieldDescriptionprivate final TypeSystemFromBuilder.typeSystemprotected final TypeSystemShuttle.typeSystemMethods in net.hydromatic.morel.ast with parameters of type TypeSystemModifier and TypeMethodDescriptionCoreBuilder.andAlso(TypeSystem typeSystem, Iterable<Core.Exp> exps) CoreBuilder.andAlso(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.apply(Pos pos, TypeSystem typeSystem, BuiltIn builtIn, Core.Exp arg0, Core.Exp arg1, Core.Exp... args) Creates aCore.Applywith two or more arguments, packing the arguments into a tuple.private Core.ApplyCoreBuilder.call(TypeSystem typeSystem, BuiltIn builtIn, Core.Exp... args) Calls a built-in function.private Core.ApplyCalls a built-in function with one type parameter.Core.From.copy(TypeSystem typeSystem, Environment env, List<Core.FromStep> steps) Core.ListPat.copy(TypeSystem typeSystem, List<Core.Pat> args) Core.Tuple.copy(TypeSystem typeSystem, List<Core.Exp> args) Core.TuplePat.copy(TypeSystem typeSystem, List<Core.Pat> args) CoreBuilder.elem(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.equal(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.extent(TypeSystem typeSystem, Type type, com.google.common.collect.RangeSet<Comparable> rangeSet) Creates an extent.CoreBuilder.field(TypeSystem typeSystem, Core.Exp exp, int slot) Creates a reference to theslotth field of an expression, "#slot exp".CoreBuilder.from(TypeSystem typeSystem, List<Core.FromStep> steps) Derives the result type, then callsCoreBuilder.from(ListType, List).CoreBuilder.fromBuilder(TypeSystem typeSystem) Creates a builder that will create aCore.Frombut does not validate.CoreBuilder.fromBuilder(TypeSystem typeSystem, @Nullable Environment env) Creates a builder that will create aCore.From.private TypeCoreBuilder.fromElementType(TypeSystem typeSystem, List<Core.FromStep> steps) Returns the element type of aCore.Fromwith the given steps.CoreBuilder.functionLiteral(TypeSystem typeSystem, BuiltIn builtIn) Creates a function literal.CoreBuilder.greaterThan(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.greaterThanOrEqualTo(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.implicitYieldExp(TypeSystem typeSystem, List<Core.FromStep> steps) Returns what would be the yield expression if we created aCore.Fromfrom the given steps.CoreBuilder.intersect(TypeSystem typeSystem, Iterable<Core.Exp> exps) CoreBuilder.intersect(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.lessThan(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.list(TypeSystem typeSystem, Core.Exp arg0, Core.Exp... args) Creates a list with one or more elements.CoreBuilder.list(TypeSystem typeSystem, Type elementType, List<Core.Exp> args) Creates a list.CoreBuilder.listPat(TypeSystem typeSystem, List<Core.Pat> args) CoreBuilder.mergeExtents(TypeSystem typeSystem, List<? extends Core.Exp> exps, boolean intersect) CoreBuilder.notEqual(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.only(TypeSystem typeSystem, Pos pos, Core.Exp a0) CoreBuilder.orElse(TypeSystem typeSystem, Iterable<Core.Exp> exps) CoreBuilder.orElse(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.record(TypeSystem typeSystem, Map<String, ? extends Core.Exp> nameExps) Creates a record.CoreBuilder.recordSelector(TypeSystem typeSystem, RecordLikeType recordType, int slot) CoreBuilder.recordSelector(TypeSystem typeSystem, RecordLikeType recordType, String fieldName) (package private) Core.ExpCoreBuilder.simplify(TypeSystem typeSystem, Core.Exp exp) Simplifies an expression.CoreBuilder.tuple(TypeSystem typeSystem, Core.Exp... args) CoreBuilder.tuple(TypeSystem typeSystem, @Nullable RecordLikeType type, Iterable<? extends Core.Exp> args) AsCoreBuilder.tuple(RecordLikeType, Iterable), but derives type.CoreBuilder.tuplePat(TypeSystem typeSystem, List<Core.Pat> args) CoreBuilder.union(TypeSystem typeSystem, Iterable<Core.Exp> exps) CoreBuilder.union(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1) CoreBuilder.yield_(TypeSystem typeSystem, Core.Exp exp) Derives bindings, then callsCoreBuilder.yield_(List, Core.Exp).Constructors in net.hydromatic.morel.ast with parameters of type TypeSystemModifierConstructorDescription(package private)FromBuilder(TypeSystem typeSystem, @Nullable Environment env) Shuttle(TypeSystem typeSystem) Creates a Shuttle. -
Uses of TypeSystem in net.hydromatic.morel.compile
Fields in net.hydromatic.morel.compile declared as TypeSystemModifier and TypeFieldDescriptionprotected final TypeSystemCompiler.typeSystemprivate final TypeSystemCompiles.PatternBinder.typeSystem(package private) final TypeSystemEnvVisitor.typeSystemprivate final TypeSystemExtents.Extent.typeSystem(package private) final TypeSystemPatternCoverageChecker.typeSystemprivate final TypeSystemPretty.typeSystemfinal TypeSystemTypeMap.typeSystemprivate final TypeSystemTypeResolver.typeSystemFields in net.hydromatic.morel.compile with type parameters of type TypeSystemModifier and TypeFieldDescriptionprivate final Function<TypeSystem, Unifier.Term> TypeResolver.BindTypeEnv.termFactoryfinal Function<TypeSystem, Type> BuiltIn.typeFunctionDerives a type, in a particular type system, for this constant or function.Methods in net.hydromatic.morel.compile with parameters of type TypeSystemModifier and TypeMethodDescriptionstatic voidCompiles.acceptBinding(TypeSystem typeSystem, Core.Pat pat, List<Binding> bindings) Visits a pattern, adding bindings to a list.static Analyzer.AnalysisAnalyzer.analyze(TypeSystem typeSystem, Environment env, AstNode node) Analyzes an expression.static voidCompiles.bindDataType(TypeSystem typeSystem, List<Binding> bindings, DataType dataType) (package private) static Compiles.PatternBinderCompiles.binding(TypeSystem typeSystem, List<Binding> bindings) (package private) static voidCompiles.bindPattern(TypeSystem typeSystem, List<Binding> bindings, Core.DatatypeDecl datatypeDecl) (package private) static voidCompiles.bindPattern(TypeSystem typeSystem, List<Binding> bindings, Core.NamedPat namedPat) (package private) static voidCompiles.bindPattern(TypeSystem typeSystem, List<Binding> bindings, Core.Pat pat) (package private) static voidCompiles.bindPattern(TypeSystem typeSystem, List<Binding> bindings, Core.ValDecl valDecl) Richer thanCompiles.bindPattern(TypeSystem, List, Core.Pat)because we have the expression.private static voidCompiles.checkPatternCoverage(TypeSystem typeSystem, Core.Case kase, Consumer<CompileException> errorConsumer, Consumer<CompileException> warningConsumer) private static voidCompiles.checkPatternCoverage(TypeSystem typeSystem, Core.Decl decl, Consumer<CompileException> warningConsumer) Checks for exhaustive and redundant patterns, and throws if there are errors/warnings.static Extents.AnalysisExtents.create(TypeSystem typeSystem, Core.Pat pat, SortedMap<Core.NamedPat, Core.Exp> boundPats, Core.Exp exp) (package private) static TypeResolver.FieldExpanderTypeResolver.FieldExpander.create(TypeSystem typeSystem, Environment env) static voidBuiltIn.dataTypes(TypeSystem typeSystem, List<Binding> bindings) Defines built-indatatypeandeqtypeinstances, e.g.static TypeResolver.ResolvedTypeResolver.deduceType(Environment env, Ast.Decl decl, TypeSystem typeSystem) Deduces the datatype of a declaration.private static voidBuiltIn.defineDataType(TypeSystem ts, List<Binding> bindings, String name, boolean internal, int varCount, UnaryOperator<BuiltIn.DataTypeHelper> transform) private static voidBuiltIn.defineEqType(TypeSystem ts, String name, int varCount) private static EnvironmentEnvironments.env(Environment environment, TypeSystem typeSystem, @Nullable Session session, Map<String, ForeignValue> valueMap) Creates a compilation environment, including built-ins and foreign values.static EnvironmentEnvironments.env(TypeSystem typeSystem, @Nullable Session session, Map<String, ForeignValue> valueMap) Creates an environment containing built-ins and the given foreign values.Macro.expand(TypeSystem typeSystem, Environment env, Type argType) static 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 static voidEnvironments.foreignBindings(TypeSystem typeSystem, Map<String, ForeignValue> map, List<Binding> bindings) static Core.ExpExtents.generator(TypeSystem typeSystem, Core.Pat pat, Core.Exp exp) Returns an expression that generates the extent of a pattern.TypeResolver.BindTypeEnv.get(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) TypeResolver.EmptyTypeEnv.get(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) TypeResolver.TypeEnv.get(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) (package private) static booleanPatternCoverageChecker.isCoveredBy(TypeSystem typeSystem, List<Core.Pat> prevPatList, Core.Pat pat) Returns whether every possible value that could be matched by patternpatwould already have been matched by one or more ofprevPatList.(package private) static booleanPatternCoverageChecker.isExhaustive(TypeSystem typeSystem, List<Core.Pat> patList) Returns whether a list of patterns covers every possible value.private static AnalyzerAnalyzer.of(TypeSystem typeSystem, Environment env) Creates an Analyzer.static InlinerInliner.of(TypeSystem typeSystem, Environment env, Analyzer.Analysis analysis) Creates an Inliner.static RefCheckerRefChecker.of(TypeSystem typeSystem, Environment env) Creates a reference checker.static RelationalizerRelationalizer.of(TypeSystem typeSystem, Environment env) Creates a Relationalizer.private static CompiledStatementCompiles.prepareDecl(TypeSystem typeSystem, Session session, Environment env, @Nullable Calcite calcite, Ast.Decl decl, Consumer<CompileException> warningConsumer, Tracer tracer) Validates and compiles a declaration, and compiles it to code that can be evaluated by the interpreter.static CompiledStatementCompiles.prepareStatement(TypeSystem typeSystem, Session session, Environment env, AstNode statement, @Nullable Calcite calcite, Consumer<CompileException> warningConsumer, Tracer tracer) Validates and compiles a statement (expression or declaration), and compiles it to code that can be evaluated by the interpreter.private @Nullable Core.ExpSuchThatShuttle.rewriteElem(TypeSystem typeSystem, UnaryOperator<Core.NamedPat> mapper, SortedMap<Core.NamedPat, Core.Exp> boundPats, Map<Core.IdPat, Core.Exp> scans, List<Core.Exp> filters, Core.Exp a0, Core.Exp a1, List<Core.Exp> exps2) static TypeTypeResolver.toType(Ast.Type type, TypeSystem typeSystem) Converts a type AST to a type.Method parameters in net.hydromatic.morel.compile with type arguments of type TypeSystemModifier and TypeMethodDescriptionTypeResolver.BindTypeEnv.bind(String name, Function<TypeSystem, Unifier.Term> termFactory) TypeResolver.EmptyTypeEnv.bind(String name, Function<TypeSystem, Unifier.Term> termFactory) TypeResolver.TypeEnv.bind(String name, Function<TypeSystem, Unifier.Term> termFactory) Constructors in net.hydromatic.morel.compile with parameters of type TypeSystemModifierConstructorDescriptionprivateAnalyzer(TypeSystem typeSystem, Environment env, Map<Core.NamedPat, Analyzer.MutableUse> map, Deque<EnvVisitor.FromContext> fromStack) Private constructor.CalciteCompiler(TypeSystem typeSystem, Calcite calcite) Compiler(TypeSystem typeSystem) protectedEnvShuttle(TypeSystem typeSystem, Environment env) Creates an EnvShuttle.protectedEnvVisitor(TypeSystem typeSystem, Environment env, Deque<EnvVisitor.FromContext> fromStack) Creates an EnvVisitor.(package private)Extent(TypeSystem typeSystem, Core.Pat pat, SortedMap<Core.NamedPat, Core.Exp> boundPats) privateFieldExpander(TypeSystem typeSystem, Environment env, Deque<EnvVisitor.FromContext> fromStack) privateInliner(TypeSystem typeSystem, Environment env, Analyzer.Analysis analysis) Private constructor.(package private)PatternBinder(TypeSystem typeSystem, List<Binding> bindings) privatePatternCoverageChecker(TypeSystem typeSystem) Creates a PatternCoverageChecker.(package private)Pretty(TypeSystem typeSystem, int lineWidth, int printLength, int printDepth, int stringDepth) privateRefChecker(TypeSystem typeSystem, Environment env, Deque<EnvVisitor.FromContext> fromStack) protectedReferenceFinder(TypeSystem typeSystem, Environment env, Set<Core.NamedPat> set, Deque<EnvVisitor.FromContext> fromStack) privateRelationalizer(TypeSystem typeSystem, Environment env) Private constructor.(package private)SuchThatShuttle(TypeSystem typeSystem, Environment env) (package private)TypeMap(TypeSystem typeSystem, Map<AstNode, Unifier.Term> nodeTypeTerms, Unifier.Substitution substitution) privateTypeResolver(TypeSystem typeSystem) Constructor parameters in net.hydromatic.morel.compile with type arguments of type TypeSystemModifierConstructorDescription(package private)BindTypeEnv(String definedName, Function<TypeSystem, Unifier.Term> termFactory, TypeResolver.TypeEnv parent) privateBuiltIn(@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) -
Uses of TypeSystem in net.hydromatic.morel.eval
Methods in net.hydromatic.morel.eval with parameters of type TypeSystemModifier and TypeMethodDescriptiondefault FileFile.discoverField(TypeSystem typeSystem, String fieldName) Files.Directory.discoverField(TypeSystem typeSystem, String fieldName) Files.UnknownFile.discoverField(TypeSystem typeSystem, String fieldName) static EnvironmentCodes.env(TypeSystem typeSystem, Environment environment) Creates a compilation environment.private static Core.ExpCodes.sysEnv(TypeSystem typeSystem, Environment env, Type argType) -
Uses of TypeSystem in net.hydromatic.morel.foreign
Fields in net.hydromatic.morel.foreign declared as TypeSystemMethods in net.hydromatic.morel.foreign with parameters of type TypeSystemModifier and TypeMethodDescription(package private) static CalciteFunctions.MorelTableFunction.CompiledCalciteFunctions.MorelTableFunction.Compiled.create(String ml, String typeJson, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, Environment env, TypeSystem typeSystem, Session session) 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) Constructors in net.hydromatic.morel.foreign with parameters of type TypeSystemModifierConstructorDescription(package private)Compiled(String morelArgType, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, TypeSystem typeSystem) (package private)Compiled(Environment env, TypeSystem typeSystem, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, String ml, String typeJson) Context(Session session, Environment env, TypeSystem typeSystem, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) -
Uses of TypeSystem in net.hydromatic.morel.type
Fields in net.hydromatic.morel.type declared as TypeSystemMethods in net.hydromatic.morel.type with parameters of type TypeSystemModifier and TypeMethodDescriptionDataType.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) default TypedValueTypedValue.discoverField(TypeSystem typeSystem, String fieldName) Tries to expand the type to include the given field name.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.DataTypeKey.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.DataType.typeConstructors(TypeSystem typeSystem) Constructors in net.hydromatic.morel.type with parameters of type TypeSystem