In working with vertigo I've found the need to parameterize the struct
field I wish to examine. Unfortunately vertigo doesn't seem to like vars
in its macros. For example:
- - - -
;; vs is 'vertigo.structs and vc is 'vertigo.core
(vs/def-typed-struct mystruct :ints (vs/array vs/uint32 10))
(def ^:mystruct vert (vc/marshal-seq mystruct [{:ints (range 10)}]))
(vc/get-in vert [0 :ints 1])
1 ;; works, returns 1
(let [^clojure.lang.Keyword x :ints] (vc/get-in vert [0 x 1]))
CompilerException java.lang.IllegalArgumentException: 'x' is assumed to be
numeric, which isn't accepted by mystruct,
compiling:(form-init1370835477311955482.clj:1:38)
- - - -
I originally ran into this when using vc/over within vc/doreduce. I'm
using vertigo 0.1.3.
Thanks!
Ryan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.