Navigation

Pretty

Pretty-printing for diagnostic Errors.

Exports: pathSegments : Error -> [String] pathString : Error -> String oneLine : Error -> String multiLine : Error -> String

Chain walkers recurse directly up to 500 frames, then fall through to a builtins.genericClosure slow path that WHNF-forces the next node at each step.

Pure data -> string; no effects.

multiLine

multiLine: render Error as a multi-line block — header line, blame path, detail fields rendered with renderValue, and the optional hint text indented under the leaf.

multiLine : Error -> String

oneLine

oneLine: render Error as a single-line diagnostic combining pathString, layer tag, msg, and (when present) hint text — suited for editor squigglies and terse log output.

oneLine : Error -> String

pathSegments

pathSegments: walk an Error from root to leaf collecting position tags as strings; stack-safe to kernel-descent depth via the same fast/slow split as the other chain walkers.

pathSegments : Error -> [String]

pathString

pathString: render Error's root-to-leaf positions as a dotted path (e.g. "DArgSort.PiCod.AppArg"); useful for log lines and one-line diagnostic summaries.

pathString : Error -> String

renderValue

renderValue: render an arbitrary detail value (term/type/payload) as a string suitable for inclusion in diagnostic output; centralises the formatting policy across oneLine/multiLine.

renderValue : Any -> String