This commit is contained in:
Michiel Borkent 2021-02-25 11:58:03 +01:00
parent bdfc6e09b6
commit f1a830abc4
2 changed files with 11 additions and 1 deletions

View file

@ -1,11 +1,19 @@
(ns babashka.impl.malli
{:no-doc true}
(:require [malli.core :as m]
[malli.error :as me]
[sci.core :as sci :refer [copy-var]]))
(def mns (sci/create-ns 'malli.core nil))
(def ens (sci/create-ns 'malli.core nil))
(def malli-namespace
{'validate (copy-var m/validate mns)
'validator (copy-var m/validator mns)
'explain (copy-var m/explain mns)
})
(def malli-error-namespace
{'humanize (copy-var me/humanize ens)
})

View file

@ -425,7 +425,9 @@ Use -- to separate script command line args from bb command line args.
'clojure.spec.gen.alpha @(resolve 'babashka.impl.spec/gen-namespace)
'clojure.spec.test.alpha @(resolve 'babashka.impl.spec/test-namespace)))
features/malli? (assoc 'malli.core
@(resolve 'babashka.impl.malli/malli-namespace))))
@(resolve 'babashka.impl.malli/malli-namespace)
'malli.error
@(resolve 'babashka.impl.malli/malli-error-namespace))))
(def imports
'{ArithmeticException java.lang.ArithmeticException