Crate nickel_lang_core

source ·

Modules§

  • Source cache.
  • Closurization of terms.
  • Module for the Combine trait
  • Deserialization of an evaluated program to plain Rust types.
  • An environment for storing variables with scopes.
  • Error types and error reporting.
  • Evaluation of a Nickel term.
  • Utility module for formatting Nickel files using Topiary
  • Define the type of an identifier.
  • Define the type of labels.
  • Define types of positions and position spans.
  • Program handling, from file reading to evaluation.
  • The Nickel REPL.
  • Serialization of an evaluated program to various data format.
  • Load the Nickel standard library in strings at compile-time.
  • AST of a Nickel expression.
  • Program transformations.
  • Nickel static types.
  • Typechecking and type inference.

Macros§

  • Generate an implementation of fmt::Display for types that implement Pretty.
  • 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.
  • Multi-ary application for types implementing Into<RichTerm>.
  • 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.
  • Multi argument function for types implementing Into<Ident> (for the identifiers), and Into<RichTerm> for the body.
  • Multi-ary application for types implementing Into<RichTerm>.
  • 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 }.
  • Multi-ary arrow constructor for types implementing Into<TypeWrapper>.
  • Wrapper around mk_uty_enum_row! to build an enum type from an 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 |]`.
  • Wrapper around mk_uty_record! to build a record type from a 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.