Skip to content

Prelude

enum Bool

False comes first so that the derived Ord gives False < True.

  • False
  • True
enum Option[A]

A value that is present (Some) or absent (None).

  • Some(A)
  • None
enum Ordering

The result of a comparison (Ord.compare).

  • Less
  • Equal
  • Greater
error ParseError(input: String)

The input of a parse was not in the expected form ([lib.api-rules]). input is the whole input.

  • input: String
fn panic(message: String) -> Never

Raises a defect whose description is message.

fn todo() -> Never

A placeholder for unwritten code. Raises a not yet implemented defect.

fn dbg[A](value: A) -> A

Prints the debug display of value to stderr on one line and returns the value. For debugging. Any value: a type that satisfies Show is shown like inspect, any other as it is constructed in source (Plain(name: <a>, f: <fn>)), its parts that satisfy Show through Show.

fn inspect[A: Show](value: A) -> String

The debug display of a value: its Show, with a String quoted even at the top level (inspect("a") is "a" with the quotes).