Ludwig.Debug

Module Members

showValue

(Function)

Convert a value into a Ludwig.String. This function is provided for debug purposes ONLY. The output format is subject to change.

Example:

x: showValue(42) # => "42"

Type Signature

 fun (a) -> String
Argument: value

The value to convert to a Ludwig.String

Type: a

Returns:

The resulting Ludwig.String

Type: String

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)