$ dhall-c/language

The Dhall subset

What the interpreter accepts and how it evaluates it.

Values

// scalars · records · lists · unions · optionals
  • Scalars — Natural, Integer, Double, Bool, Text (with ${} interpolation).
  • Records — record types { a : T }, literals { a = v }, field access, toMap, recursive merge /\, right-biased //, and with updates.
  • Lists — [a, b, c], list append #, and List/map, filter, fold, build, length, head, last, indexed, reverse.
  • Unions — < A : T | B : U > and < A = v | B : U >, plus merge.
  • Optionals — Optional T, Some x, None T, Optional/fold.

Binders & control

// let · lambda · forall · if/then/else
  • let bindings and chained lets.
  • Lambdas \(x : T) -> body and forall/Pi types.
  • Annotations e : T and if/then/else.
  • Multiline Text literals ('' … '') with standard indentation stripping.

Builtins

// arithmetic · comparison · natural/integer/double/text ops

Arithmetic + - * over Natural/Integer/Double, boolean logic && ||, and comparisons == != < <= > >=. Plus Natural/build, Natural/isZero, Integer/toDouble, Text/replace, Double/show, and more.

Round-trip Doubles: IEEE 754 Double printed with the shortest representation that round-trips; non-finite maps to null/nan/inf.