Helpers for developers.

assert

Available since version 1.0 (alias of clojure.core/assert)

MACRO (assert x)  (assert x message)

Evaluates expr x and throws an exception with optional message if it does not evaluate to logical true.

assert-boolean

Available since version 1.0 (alias of clojure.bootstrap/assert-boolean)

not referred automatically

MACRO (assert-boolean form)  (assert-boolean form & more)

Evaluates given forms and throws if some of them do not yield result of primitive boolean type.

assert-int

Available since version 1.0 (alias of clojure.bootstrap/assert-int)

not referred automatically

MACRO (assert-int form)  (assert-int form & more)

Evaluates given forms and throws if some of them do not yield result of primitive int type.

assert-primitive

Available since version 1.0 (alias of clojure.bootstrap/assert-primitive)

not referred automatically

MACRO (assert-primitive form)  (assert-primitive form & more)

Evaluates given forms and throws if some of them do not yield result of primitive type.

not-implemented

Available since version 1.0 (view source)

MACRO (not-implemented)  (not-implemented m)

Macro for cases where some part of code is not implemented yet.

pt

Available since version 1.0 (alias of clojure.bootstrap/pt)

MACRO (pt x)

Returns keyword based on type of x. Used to determine whether value is of primitive type or not.

See also: assert-primitive

scratch

Available since version 1.0 (alias of clojure.bootstrap/scratch)

MACRO (scratch rq & body)

Like comment, but parses first form as an input to dunaj.lib/require!.

set-color!

Available since version 1.0 (view source)

Usage:
  • (set-color!)

  • (set-color! val)

Type signatures:
  • () → nil

  • (Any) → nil

Globally sets a color var so that any print! will use color mode by default. Used for debugging and development purposes.

set-trace!

Available since version 1.0 (view source)

Usage:
  • (set-trace!)

  • (set-trace! val)

Type signatures:
  • () → nil

  • (Any) → nil

Enables/toggles tracing. Used for debugging and development purposes.

See also: trace

time

Available since version 1.0 (alias of clojure.core/time)

MACRO (time expr)

Evaluates expr and prints the time it took. Returns the value of expr.

See also: trace

toggle-assert

Available since version 1.0 (view source)

not referred automatically

VAR of type clojure.lang.Var

A dynamic var which toggles assertions.

See also: assert

warn-on-reflection!

Available since version 1.0 (view source)

MACRO (warn-on-reflection!)

Starts emiting warnings when reflection is needed to resolve host method calls or field accesses.