Vik.Compiler (Vik v0.0.1-rc1)
View SourceCompiles the Shards into actual Elixir modules living in the Erlang VM.
Summary
Types
Functions
@spec eval(Vik.Shard.t()) :: {:ok, term(), [Vik.export()], [slug()]} | {:error, term()}
Compiles the given Vik.Shard
.
Returns the resulting module and any exports.
@spec eval!(Vik.Shard.t()) :: {term(), [module()], [slug()]}
Same as eval/1
, but raises if something crashes
during compilation.
@spec extract_exports(Vik.Shard.t()) :: [module()]
Extracts the list of module names that the given
Vik.Shard
exports.
@spec extract_includes(Vik.Shard.t()) :: [slug()]
@spec extract_includes(source()) :: [slug()]
Extracts a list of slugs for the shards that
the given Vik.Shard
depends on.
Generates a module name from a unique slug.