Uses of Class
net.hydromatic.morel.type.TypeSystem
-
Packages that use TypeSystem Package Description net.hydromatic.morel Standard ML interpreter, implemented in Java.net.hydromatic.morel.ast Abstract syntax tree.net.hydromatic.morel.compile Validates programs (represented asAstNode), deduces their type, and compiles them into code that can be evaluated.net.hydromatic.morel.eval Evaluates expressions.net.hydromatic.morel.foreign Provides access to external data sources.net.hydromatic.morel.type Type system. -
-
Uses of TypeSystem in net.hydromatic.morel
Fields in net.hydromatic.morel declared as TypeSystem Modifier and Type Field Description (package private) TypeSystemMain. typeSystemprivate TypeSystemShell.SubShell. typeSystemConstructors in net.hydromatic.morel with parameters of type TypeSystem Constructor Description 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 TypeSystem Modifier and Type Field Description private TypeSystemFromBuilder. typeSystemprotected TypeSystemShuttle. typeSystemMethods in net.hydromatic.morel.ast with parameters of type TypeSystem Modifier and Type Method Description Core.ExpCoreBuilder. andAlso(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)private Core.ApplyCoreBuilder. call(TypeSystem typeSystem, BuiltIn builtIn, Core.Exp... args)Calls a built-in function.private Core.ApplyCoreBuilder. call(TypeSystem typeSystem, BuiltIn builtIn, Type type, Pos pos, Core.Exp... args)Calls a built-in function with one type parameter.Core.ExpCore.From. copy(TypeSystem typeSystem, Environment env, List<Core.FromStep> steps)Core.ListPatCore.ListPat. copy(TypeSystem typeSystem, List<Core.Pat> args)Core.PatCore.RecordPat. copy(TypeSystem typeSystem, Set<String> argNames, List<Core.Pat> args)Core.TupleCore.Tuple. copy(TypeSystem typeSystem, List<Core.Exp> args)Core.TuplePatCore.TuplePat. copy(TypeSystem typeSystem, List<Core.Pat> args)Core.ExpCoreBuilder. elem(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)Core.ExpCoreBuilder. equal(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)Core.ExpCoreBuilder. field(TypeSystem typeSystem, Core.Exp exp, int slot)Creates a reference to theslotth field of an expression, "#slot exp".Core.FromCoreBuilder. from(TypeSystem typeSystem, List<Core.FromStep> steps)Derives the result type, then callsCoreBuilder.from(ListType, List).FromBuilderCoreBuilder. fromBuilder(TypeSystem typeSystem)Creates a builder that will create aCore.Frombut does not validate.FromBuilderCoreBuilder. fromBuilder(TypeSystem typeSystem, @Nullable Environment env)Creates a builder that will create aCore.From.(package private) static TypeCoreBuilder. fromElementType(TypeSystem typeSystem, List<Core.FromStep> steps)Returns the element type of aCore.Fromwith the given steps.Core.LiteralCoreBuilder. functionLiteral(TypeSystem typeSystem, BuiltIn builtIn)Creates a function literal.Core.ExpCoreBuilder. greaterThan(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)Core.ExpCoreBuilder. implicitYieldExp(TypeSystem typeSystem, List<Core.FromStep> steps)Returns what would be the yield expression if we created aCore.Fromfrom the given steps.Core.ExpCoreBuilder. lessThan(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)Core.ExpCoreBuilder. list(TypeSystem typeSystem, Type elementType, List<Core.Exp> args)Creates a list.Core.ListPatCoreBuilder. listPat(TypeSystem typeSystem, List<Core.Pat> args)Core.ExpCoreBuilder. only(TypeSystem typeSystem, Pos pos, Core.Exp a0)Core.ExpCoreBuilder. orElse(TypeSystem typeSystem, Core.Exp a0, Core.Exp a1)Core.ExpCoreBuilder. record(TypeSystem typeSystem, Map<String,? extends Core.Exp> nameExps)Creates a record.Core.PatCoreBuilder. recordPat(TypeSystem typeSystem, Set<String> argNames, List<Core.Pat> args)Core.RecordSelectorCoreBuilder. recordSelector(TypeSystem typeSystem, RecordLikeType recordType, int slot)Core.RecordSelectorCoreBuilder. recordSelector(TypeSystem typeSystem, RecordLikeType recordType, String fieldName)Core.TupleCoreBuilder. tuple(TypeSystem typeSystem, @Nullable RecordLikeType type, Iterable<? extends Core.Exp> args)AsCoreBuilder.tuple(RecordLikeType, Iterable), but derives type.Core.TuplePatCoreBuilder. tuplePat(TypeSystem typeSystem, List<Core.Pat> args)Core.YieldCoreBuilder. yield_(TypeSystem typeSystem, Core.Exp exp)Derives bindings, then callsCoreBuilder.yield_(List, Core.Exp).Constructors in net.hydromatic.morel.ast with parameters of type TypeSystem Constructor Description 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 TypeSystem Modifier and Type Field Description protected TypeSystemCompiler. typeSystemprivate TypeSystemCompiles.PatternBinder. typeSystem(package private) TypeSystemEnvVisitor. typeSystem(package private) TypeSystemPatternCoverageChecker. typeSystemprivate TypeSystemPretty. typeSystemTypeSystemTypeMap. typeSystemprivate TypeSystemTypeResolver. typeSystemFields in net.hydromatic.morel.compile with type parameters of type TypeSystem Modifier and Type Field Description private Function<TypeSystem,Unifier.Term>TypeResolver.BindTypeEnv. termFactoryFunction<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 TypeSystem Modifier and Type Method Description static 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 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 type 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, Map<String,ForeignValue> valueMap)Creates a compilation environment, including built-ins and foreign values.static EnvironmentEnvironments. env(TypeSystem typeSystem, Map<String,ForeignValue> valueMap)Creates an environment containing built-ins and the given foreign values.Core.ExpMacro. 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.private static voidEnvironments. foreignBindings(TypeSystem typeSystem, Map<String,ForeignValue> map, List<Binding> bindings)Unifier.TermTypeResolver.BindTypeEnv. get(TypeSystem typeSystem, String name, Function<String,RuntimeException> exceptionFactory)Unifier.TermTypeResolver.EmptyTypeEnv. get(TypeSystem typeSystem, String name, Function<String,RuntimeException> exceptionFactory)Unifier.TermTypeResolver.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, boolean isDecl, 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.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 TypeSystem Modifier and Type Method Description TypeResolver.TypeEnvTypeResolver.BindTypeEnv. bind(String name, Function<TypeSystem,Unifier.Term> termFactory)TypeResolver.TypeEnvTypeResolver.EmptyTypeEnv. bind(String name, Function<TypeSystem,Unifier.Term> termFactory)TypeResolver.TypeEnvTypeResolver.TypeEnv. bind(String name, Function<TypeSystem,Unifier.Term> termFactory)Constructors in net.hydromatic.morel.compile with parameters of type TypeSystem Constructor Description Analyzer(TypeSystem typeSystem, Environment env, Map<Core.NamedPat,Analyzer.MutableUse> map, Deque<EnvVisitor.FromContext> fromStack)Private constructor.CalciteCompiler(TypeSystem typeSystem, Calcite calcite)Compiler(TypeSystem typeSystem)EnvShuttle(TypeSystem typeSystem, Environment env)Creates an EnvShuttle.EnvVisitor(TypeSystem typeSystem, Environment env, Deque<EnvVisitor.FromContext> fromStack)Creates an EnvVisitor.Inliner(TypeSystem typeSystem, Environment env, Analyzer.Analysis analysis)Private constructor.PatternBinder(TypeSystem typeSystem, List<Binding> bindings)PatternCoverageChecker(TypeSystem typeSystem)Creates a PatternCoverageChecker.Pretty(TypeSystem typeSystem, int lineWidth, int printLength, int printDepth, int stringDepth)RefChecker(TypeSystem typeSystem, Environment env, Deque<EnvVisitor.FromContext> fromStack)ReferenceFinder(TypeSystem typeSystem, Environment env, Set<Core.NamedPat> set, Deque<EnvVisitor.FromContext> fromStack)Relationalizer(TypeSystem typeSystem, Environment env)Private constructor.TypeMap(TypeSystem typeSystem, Map<AstNode,Unifier.Term> nodeTypeTerms, Unifier.Substitution substitution)TypeResolver(TypeSystem typeSystem)Constructor parameters in net.hydromatic.morel.compile with type arguments of type TypeSystem Constructor Description BindTypeEnv(String definedName, Function<TypeSystem,Unifier.Term> termFactory, TypeResolver.TypeEnv parent)BuiltIn(@Nullable String structure, String mlName, @Nullable String alias, Function<TypeSystem,Type> typeFunction)BuiltIn(@Nullable String structure, String mlName, @Nullable String alias, Function<TypeSystem,Type> typeFunction, @Nullable PrimitiveType preferredType)BuiltIn(@Nullable String structure, String mlName, Function<TypeSystem,Type> typeFunction)BuiltIn(@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 TypeSystem Modifier and Type Method Description 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 TypeSystem Modifier and Type Field Description TypeSystemCalciteFunctions.Context. typeSystemMethods in net.hydromatic.morel.foreign with parameters of type TypeSystem Modifier and Type Method Description (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)TypeCalciteForeignValue. type(TypeSystem typeSystem)TypeForeignValue. type(TypeSystem typeSystem)Constructors in net.hydromatic.morel.foreign with parameters of type TypeSystem Constructor Description Compiled(String morelArgType, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, TypeSystem typeSystem)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 TypeSystem Modifier and Type Field Description private TypeSystemTypeShuttle. typeSystemMethods in net.hydromatic.morel.type with parameters of type TypeSystem Modifier and Type Method Description TypeApplyType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)DataTypeDataType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)DummyTypeDummyType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)FnTypeFnType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)ForallTypeForallType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)ListTypeListType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)PrimitiveTypePrimitiveType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)RecordTypeRecordType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)TemporaryTypeTemporaryType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)TupleTypeTupleType. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)TypeType. 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.TypeTypeVar. copy(TypeSystem typeSystem, UnaryOperator<Type> transform)TypeDataType. substitute(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)default TypeType. substitute(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)Returns a copy of this type, specialized by substituting type parameters.TypeTypeVar. substitute(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)protected TypeDataType. substitute2(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)Second part of the implementation ofDataType.substitute(TypeSystem, List, TypeSystem.Transaction), called if there is not already a type of the given description.protected TypeTemporaryType. substitute2(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)TypeKeys.ApplyKey. toType(TypeSystem typeSystem)DataTypeKeys.DataTypeDef. toType(TypeSystem typeSystem)TypeKeys.DataTypeKey. toType(TypeSystem typeSystem)TypeKeys.ForallKey. toType(TypeSystem typeSystem)TypeKeys.ForallTypeApplyKey. toType(TypeSystem typeSystem)TypeKeys.NameKey. toType(TypeSystem typeSystem)TypeKeys.OpKey. toType(TypeSystem typeSystem)TypeKeys.OrdinalKey. toType(TypeSystem typeSystem)TypeKeys.RecordKey. toType(TypeSystem typeSystem)DataTypeType.Def. toType(TypeSystem typeSystem)TypeType.Key. toType(TypeSystem typeSystem)Constructors in net.hydromatic.morel.type with parameters of type TypeSystem Constructor Description TypeShuttle(TypeSystem typeSystem)
-