Uses of Class
net.hydromatic.morel.compile.Environment
-
Packages that use Environment Package Description 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. -
-
Uses of Environment in net.hydromatic.morel.compile
Subclasses of Environment in net.hydromatic.morel.compile Modifier and Type Class Description private static classEnvironments.EmptyEnvironmentEmpty environment.(package private) static classEnvironments.SubEnvironmentEnvironment that inherits from a parent environment and adds one binding.Fields in net.hydromatic.morel.compile declared as Environment Modifier and Type Field Description private static EnvironmentEnvironments. BASIC_ENVIRONMENTAn environment with the only the built-in stuff.private EnvironmentEnvironments.SubEnvironment. parentMethods in net.hydromatic.morel.compile that return Environment Modifier and Type Method Description EnvironmentEnvironment. bind(java.lang.String name, Type type, java.lang.Object value)Creates an environment that is the same as a given environment, plus one more variable.private EnvironmentEnvironment. bind(Binding binding)EnvironmentEnvironment. bindAll(java.lang.Iterable<Binding> bindings)Creates an environment that is the same as this, plus the given bindings.static EnvironmentCompiles. createEnvironment(TypeSystem typeSystem, java.util.Map<java.lang.String,ForeignValue> valueMap)Creates an environment containing the given foreign values.static EnvironmentEnvironments. empty()Creates an empty environment.private static EnvironmentEnvironments. getBind()Methods in net.hydromatic.morel.compile with parameters of type Environment Modifier and Type Method Description CodeCompiler. compile(Environment env, Ast.Exp expression)private CodeCompiler. compileAggregate(Environment env, Ast.Aggregate aggregate)private ApplicableCompiler. compileApplicable(Environment env, Ast.Exp fn)Compiles a function value to anApplicable, if possible, or returns null.private voidCompiler. compileDatatypeDecl(Environment env, Ast.DatatypeDecl datatypeDecl, java.util.List<Binding> bindings, java.util.List<Compiler.Action> actions)private voidCompiler. compileDecl(Environment env, Ast.Decl decl, java.util.List<Code> varCodes, java.util.List<Binding> bindings, java.util.List<Compiler.Action> actions)private CodeCompiler. compileInfix(Environment env, Ast.InfixCall call)private CodeCompiler. compileLet(Environment env, java.util.List<Ast.Decl> decls, Ast.Exp e)private CodeCompiler. compileLet(Environment env, Ast.Decl decl, Ast.Exp e)private CodeCompiler. compileMatchList(Environment env, java.lang.Iterable<Ast.Match> matchList)Compiles amatchexpression.(package private) CompiledStatementCompiler. compileStatement(Environment env, Ast.Decl decl)private voidCompiler. compileTyCon(Environment env, Type dataType, Ast.TyCon tyCon, java.util.List<Binding> bindings)private CodeCompiler. compileUnary(Environment env, Ast.Exp call)private voidCompiler. compileValBind(Environment env, Ast.ValBind valBind, java.util.List<Code> varCodes, java.util.List<Binding> bindings, java.util.List<Compiler.Action> actions)private voidCompiler. compileValDecl(Environment env, Ast.ValDecl valDecl, java.util.List<Code> varCodes, java.util.List<Binding> bindings, java.util.List<Compiler.Action> actions)static TypeResolver.ResolvedTypeResolver. deduceType(Environment env, Ast.Decl decl, TypeSystem typeSystem)Deduces the type of a declaration.private TypeResolver.ResolvedTypeResolver. deduceType_(Environment env, Ast.Decl decl)voidCompiledStatement. eval(Environment environment, java.util.List<java.lang.String> output, java.util.List<Binding> bindings)Evaluates this statement, adding lines of feedback tooutputand writing bindings (values to variables, and types definitions) tobindings.Ast.ExpMacro. expand(Environment env)private static CompiledStatementCompiles. prepareDecl(TypeSystem typeSystem, Environment env, Ast.Decl decl)Validates and compiles an declaration, and compiles it to code that can be evaluated by the interpreter.static CompiledStatementCompiles. prepareStatement(TypeSystem typeSystem, Environment env, AstNode statement)Validates and compiles a statement (expression or declaration), and compiles it to code that can be evaluated by the interpreter.Constructors in net.hydromatic.morel.compile with parameters of type Environment Constructor Description SubEnvironment(Environment parent, Binding binding) -
Uses of Environment in net.hydromatic.morel.eval
Methods in net.hydromatic.morel.eval that return Environment Modifier and Type Method Description static EnvironmentCodes. env(TypeSystem typeSystem, Environment environment)Creates a compilation environment.Methods in net.hydromatic.morel.eval with parameters of type Environment Modifier and Type Method Description static ApplicableCodes. aggregate(Environment env, Code aggregate, Code argumentCode)static EvalEnvCodes. emptyEnvWith(Environment env)Creates an evaluation environment that contains the bound values from a compilation environment.static EnvironmentCodes. env(TypeSystem typeSystem, Environment environment)Creates a compilation environment.
-