Ludwig.Debug

Module Members

trace

(Function)

Print a string to stderr (default) or stdout.

Example:

x: trace {message: "Hello world!\n"}

Type Signature

 fun { message: String,
       output: Optional<Output> } -> 0-tuple
Argument: message

The string to print.

Type: String

Argument: output

Whether to print to STDERR (default) or STDOUT

Type: Optional<Output>

Returns:
Type: 0-tuple

traceValue

(Function)

Print a Ludwig value to stderr (default) or stdout.

Example:

x:
    let v: Optional({field: 123})
    Debug.traceValue {value: v} # => Optional({field: 123})

Type Signature

 fun { value: a,
       output: Optional<Output> } -> 0-tuple
Argument: value
Type: a
Argument: output

Whether to print to STDERR (default) or STDOUT

Type: Optional<Output>

Returns:
Type: 0-tuple

Output

(Type)

type Output:
  | STDOUT
  | STDERR

STDERR

(Constructor)

STDOUT

(Constructor)