Public Vars

Back

with-loading-context (clj)

(source)

macro

(with-loading-context & body)

Examples

frenchy64/fully-satisfies
(ns io.github.frenchy64.fully-satisfies.non-leaky-macros.clojure.core
  "Implementations of clojure.core macros that don't leak implementation details."
  (:refer-clojure :exclude [locking binding with-bindings sync with-local-vars
                            with-in-str dosync with-precision with-loading-context
                            with-redefs delay vswap! lazy-seq lazy-cat future
                            pvalues])
  (:require [clojure.core :as cc]))

(defmacro non-leaky-with-loading-context
  "Like clojure.core/with-loading-context, except body cannot leak try/catch syntax."
  [& body]
  `(cc/with-loading-context
     (do ~@body)))

(defmacro with-loading-context
  [& args]
  `(non-leaky-with-loading-context ~@args))