Crate nickel_lang_core

Source

Modules§

bytecode
Experimental bytecode compiler, virtual machine, and their intermediate representations.
cache
Various caches for artifacts generated across the whole pipeline: source code, parsed representations, imports data (dependencies and reverse dependencies, etc.)
closurize
Closurization of terms.
combine
Module for the Combine trait
deserialize
Deserialization of an evaluated program to plain Rust types.
environment
An environment for storing variables with scopes.
error
Error types and error reporting.
eval
Evaluation of a Nickel term.
files
This module provides Files, a cheaply-clonable, persistent, codespan-compatible collection of files.
format
Utility module for formatting Nickel files using Topiary
identifier
Define the type of an identifier.
label
Define the type of labels.
package
This module contains the part of package management that’s needed by the evaluator.
parser
position
Define types of positions and position spans.
pretty
program
Program handling, from file reading to evaluation.
repl
The Nickel REPL.
serialize
Serialization of an evaluated program to various data format.
stdlib
Load the Nickel standard library in strings at compile-time.
term
AST of a Nickel expression.
transform
Program transformations.
traverse
Traversal of trees of objects.
typ
Nickel static types.
typecheck
Typechecking and type inference.

Macros§

app
Multi-ary application for types implementing Into<Ast>.
fun
Multi argument function for types implementing Into<Ident> (for the identifiers), and Into<RichTerm> for the body.
impl_display_from_bytecode_pretty
Generate an implementation of fmt::Display for types that implement Pretty.
impl_display_from_pretty
Generate an implementation of fmt::Display for types that implement Pretty.
match_sharedterm
Allows to match on SharedTerm without taking ownership of the matched part until the match. In the wildcard pattern, we don’t take ownership, so we can still use the richterm at that point.
mk_app
Multi-ary application for types implementing Into<RichTerm>.
mk_array
Array for types implementing Into<RichTerm> (for elements). The array’s attributes are a trailing (optional) ArrayAttrs, separated by a ;. mk_array!(Term::Num(42)) corresponds to \[42\]. Here the attributes are ArrayAttrs::default(), though the evaluated array may have different attributes.
mk_fun
Multi argument function for types implementing Into<Ident> (for the identifiers), and Into<RichTerm> for the body.
mk_opn
Multi-ary application for types implementing Into<RichTerm>.
mk_record
Multi field record for types implementing Into<Ident> (for the identifiers), and Into<RichTerm> for the fields. Identifiers and corresponding content are specified as a tuple: mk_record!(("field1", t1), ("field2", t2)) corresponds to the record { field1 = t1; field2 = t2 }.
mk_uty_arrow
Multi-ary arrow constructor for types implementing Into<TypeWrapper>.
mk_uty_enum
Wrapper around mk_uty_enum_row! to build an enum type from an enum row.
mk_uty_enum_row
Multi-ary enum row constructor for types implementing Into<TypeWrapper>. mk_uty_enum_row!(id1, .., idn; tail) correspond to [| 'id1, .., 'idn; tail |]. With the addition of algebraic data types (enum variants), individual rows can also take an additional type parameter, specified as a tuple: for example, mk_uty_enum_row!(id1, (id2, ty2); tail)is[| ’id1, ’id2 ty2; tail |]`.
mk_uty_record
Wrapper around mk_uty_record! to build a record type from a record row.
mk_uty_record_row
Multi-ary record row constructor for types implementing Into<TypeWrapper>. mk_uty_row!((id1, ty1), .., (idn, tyn); tail) correspond to {id1: ty1, .., idn: tyn; tail}. The tail can be omitted, in which case the empty row is uses as a tail instead.
primop_app
Multi-ary application for types implementing Into<RichTerm>.