From dbf6ea3754fdaa833a8fa45617a351b92bc04eaf Mon Sep 17 00:00:00 2001 From: Paulo Rafael Feodrippe Date: Tue, 5 Apr 2022 22:34:06 -0300 Subject: [PATCH] Macro `bind-env` should be evaluated in CLJ only --- .../fr/jeremyschoffen/prose/alpha/eval/common.cljc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/fr/jeremyschoffen/prose/alpha/eval/common.cljc b/src/main/fr/jeremyschoffen/prose/alpha/eval/common.cljc index bd27448..de81001 100644 --- a/src/main/fr/jeremyschoffen/prose/alpha/eval/common.cljc +++ b/src/main/fr/jeremyschoffen/prose/alpha/eval/common.cljc @@ -22,15 +22,16 @@ Api providing tools to facilitate the evaluation of documents. :prose.alpha.evaluation/env-key key}))))) -(defmacro bind-env - "Utility allowing to merge kvs keys to the [[*evaluation-env*]] map. +#?(:clj + (defmacro bind-env + "Utility allowing to merge kvs keys to the [[*evaluation-env*]] map. Args: - `bindings`: a map that will be merged into [[*evaluation-env*]]. - `body`: code to execute in this new environment." - [bindings & body] - `(binding [*evaluation-env* (merge *evaluation-env* ~bindings)] - ~@body)) + [bindings & body] + `(binding [*evaluation-env* (merge *evaluation-env* ~bindings)] + ~@body))) (defn wrap-eval-form-exception