Ludwig.StackTrace

Table of Contents

Module Members

prettyTrace

(Function)

Pretty-printed stack trace of a Ludwig value. Stack traces are attached to constructors. For any other values the result is an empty list.

Note: the colorization of the output is controled by –color/–no-color flags

Example:

x: IntWrap(123)
t: StackTrace.prettyTrace{value: x, header: "x"} # =>
      x:

        1| x: IntWrap(123)
              ^^^^^^^^^^^^

      In call to IntWrap at "St.lw" (line 1, column 4)

Type Signature

 fun { value: a,
       header: String,
       indent: Optional<Int>,
       dropFrames: Optional<Int> } -> String
Argument: value

Ludwig value

Type: a

Argument: header

Stack trace header

Type: String

Argument: indent

Additional indentation

Type: Optional<Int>

Argument: dropFrames

Number of frames to pop from the stack

Type: Optional<Int>

Returns:

List of pretty-printed items in the trace

Type: String