Clojure: How do I get the file/line number on which a map was defined?
I know I can get the :line and :file from the metadata on a var; however, I'm building a system where the user can pass me raw maps and I will end up "linking" the data together at a later time. When this linkage fails, I'd like to report the file/line in which they specified the map. E.g.: (defn generate-stuff [] (make-thing { :k (make-thing { :k v }) })) (link (generate-stuff) (other-generator)) ;; outputs file/line of the map containing the errant :k/v pair I assume that writing a macro to associate file/line with the collection's metadata is almost certainly the way to go, but since there