Ethyl (Ethyl v0.2.0) View Source
A non-general, purely functional subset of Elixir
Link to this section Summary
Functions
Compiles an ethyl reduction
Evaluates an ethyl expression in the given path with the given context
Transpiles an Elixir AST into an Ethyl AST
Link to this section Functions
Compiles an ethyl reduction
This can be used to write ethyl code inline in Elixir code
Specs
eval_file!(String.t(), Ethyl.Context.t(), Code.binding(), Keyword.t()) :: {term(), Code.binding()}
Evaluates an ethyl expression in the given path with the given context
This function is used under the hood by from_elixir_ast/2
when using
import
.
Note that this function calls out to Code.eval_quoted/3
which is
potentially dangerous: only use this function if you know ahead of
time that the contents of path
are safe to evaluate.
Specs
from_elixir_ast(ast :: tuple(), context :: Ethyl.Context.t()) :: ast :: tuple()
Transpiles an Elixir AST into an Ethyl AST