Overview

Adapted from https://github.com/garyb/purescript-debug


Table of contents


spy (function)

Log any value and return it

Signature

export const spy = <A>(a: A): A => ...

Added in v1.0.0

trace (function)

Log any value to the console for debugging purposes and then return a value. This will log the value’s underlying representation for low-level debugging

Signature

export const trace = <A>(message: any, out: Lazy<A>): A => ...

Added in v1.0.0

traceA (function)

Log a message to the console for debugging purposes and then return the unit value of the Applicative F

Signature

export function traceA<F extends URIS3>(F: Applicative3<F>): <U, L>(message: any) => Type3<F, U, L, void>
export function traceA<F extends URIS3, U, L>(F: Applicative3C<F, U, L>): (message: any) => Type3<F, U, L, void>
export function traceA<F extends URIS2>(F: Applicative2<F>): <L>(message: any) => Type2<F, L, void>
export function traceA<F extends URIS2, L>(F: Applicative2C<F, L>): (message: any) => Type2<F, L, void>
export function traceA<F extends URIS>(F: Applicative1<F>): (message: any) => Type<F, void> { ... }

Added in v1.0.0

traceM (function)

Log any value to the console and return it in Monad useful when one has monadic chains

Signature

export function traceM<F extends URIS3>(F: Monad3<F>): <U, L, A>(a: A) => Type3<F, U, L, A>
export function traceM<F extends URIS3, U, L>(F: Monad3C<F, U, L>): <A>(a: A) => Type3<F, U, L, A>
export function traceM<F extends URIS2>(F: Monad2<F>): <L, A>(a: A) => Type2<F, L, A>
export function traceM<F extends URIS2, L>(F: Monad2C<F, L>): <A>(a: A) => Type2<F, L, A>
export function traceM<F extends URIS>(F: Monad1<F>): <A>(a: A) => Type<F, A> { ... }

Added in v1.0.0