[#89] use :namespaces option for clojure.core rather than :bindings
This commit is contained in:
parent
2ca0e676cc
commit
9729c6ff5d
3 changed files with 8 additions and 21 deletions
2
sci
2
sci
|
|
@ -1 +1 @@
|
|||
Subproject commit 52ed6f4f9885d3a28b007ccf2e116d8270f35f4b
|
||||
Subproject commit 4faa54908377fbcabe6bb093eda6c66f8a637e3a
|
||||
|
|
@ -6,39 +6,26 @@
|
|||
[_ _ & body]
|
||||
`(~'future-call (fn [] ~@body)))
|
||||
|
||||
(def core-bindings
|
||||
{'atom atom
|
||||
'swap! swap!
|
||||
'swap-vals! swap-vals!
|
||||
'reset! reset!
|
||||
'add-watch add-watch
|
||||
'future-call future-call
|
||||
(def core-extras
|
||||
{'future-call future-call
|
||||
'future (with-meta future {:sci/macro true})
|
||||
'future-cancel future-cancel
|
||||
'future-cancelled? future-cancelled?
|
||||
'future-done? future-done?
|
||||
'future? future?
|
||||
'deref deref
|
||||
'agent agent
|
||||
'send send
|
||||
'send-off send-off
|
||||
'promise promise
|
||||
'deliver deliver
|
||||
'shutdown-agents shutdown-agents
|
||||
'run! run!
|
||||
'slurp slurp
|
||||
'spit spit
|
||||
'pmap pmap
|
||||
'pr pr
|
||||
'pr-str pr-str
|
||||
'prn prn
|
||||
'prn-str prn-str
|
||||
'print-str print-str
|
||||
'print print
|
||||
'println println
|
||||
'println-str println-str
|
||||
'flush flush
|
||||
'ex-info ex-info
|
||||
'ex-data ex-data
|
||||
'read-line read-line
|
||||
'namespace namespace})
|
||||
'read-line read-line})
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
[babashka.impl.System :refer [system-bindings]]
|
||||
[babashka.impl.Thread :refer [thread-bindings]]
|
||||
[babashka.impl.async :refer [async-namespace]]
|
||||
[babashka.impl.clojure.core :refer [core-bindings]]
|
||||
[babashka.impl.clojure.core :refer [core-extras]]
|
||||
[babashka.impl.clojure.java.io :refer [io-namespace]]
|
||||
[babashka.impl.clojure.stacktrace :refer [print-stack-trace]]
|
||||
[babashka.impl.conch :refer [conch-namespace]]
|
||||
|
|
@ -143,8 +143,7 @@ Everything after that is bound to *command-line-args*."))
|
|||
(throw (Exception. (str "File does not exist: " file))))))
|
||||
|
||||
(def bindings
|
||||
(merge core-bindings
|
||||
system-bindings
|
||||
(merge system-bindings
|
||||
file-bindings
|
||||
thread-bindings
|
||||
integer-bindings
|
||||
|
|
@ -198,7 +197,8 @@ Everything after that is bound to *command-line-args*."))
|
|||
io clojure.java.io
|
||||
conch me.raynes.conch.low-level
|
||||
async clojure.core.async}
|
||||
:namespaces {'clojure.tools.cli tools-cli-namespace
|
||||
:namespaces {'clojure.core core-extras
|
||||
'clojure.tools.cli tools-cli-namespace
|
||||
'clojure.edn {'read-string edn/read-string}
|
||||
'clojure.java.shell {'sh shell/sh}
|
||||
'babashka.wait {'wait-for-port wait/wait-for-port
|
||||
|
|
|
|||
Loading…
Reference in a new issue