stringify fns and bugfixes
This commit is contained in:
parent
70bff13eea
commit
608ab4ab67
|
@ -221,9 +221,11 @@
|
|||
", "))
|
||||
|
||||
(defn- stringify* [value]
|
||||
(def typed? (when (dictionary? value) (value :^type)))
|
||||
(def type (if typed? typed? (type value)))
|
||||
(print "stringifying " (string value))
|
||||
(def typed? (when (dictionary? value)
|
||||
(print "value is a dictionary")
|
||||
(value :^type)))
|
||||
(def type (if typed? typed? (type value)))
|
||||
(case type
|
||||
:nil ""
|
||||
:number (string value)
|
||||
|
@ -238,6 +240,7 @@
|
|||
:set
|
||||
(string/join (map stringify (keys value)) ", ")
|
||||
:ref (stringify (value :^value))
|
||||
:fn (string "fn " (value :name))
|
||||
# XXX: pkg, fn
|
||||
))
|
||||
|
||||
|
@ -502,10 +505,9 @@
|
|||
|
||||
(do
|
||||
(set source `
|
||||
fn foo () -> :foo
|
||||
let bar = #{foo}
|
||||
bar :foo ()
|
||||
#{:a 1, :b 2}
|
||||
`)
|
||||
(def result (run))
|
||||
(stringify result)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user