Skip to content

Commit

Permalink
make sure unify-gensyms doesn't lose type-hints
Browse files Browse the repository at this point in the history
  • Loading branch information
ztellman committed Oct 7, 2012
1 parent 45360d9 commit 211a5d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,5 @@ pom.xml
*jar
lib
classes
.lein*
.lein*
target/**
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject potemkin "0.1.5"
(defproject potemkin "0.1.6"
:description "Some useful facades."
:dependencies [[org.clojure/clojure "1.3.0"]]
:repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"}
Expand Down
5 changes: 4 additions & 1 deletion src/potemkin/macros.clj
Expand Up @@ -26,7 +26,9 @@
(let [gensym* (memoize gensym)]
(postwalk
#(if (gensym? %)
(symbol (str (gensym* (str (un-gensym %) "__")) "__auto__"))
(with-meta
(symbol (str (gensym* (str (un-gensym %) "__")) "__auto__"))
(meta %))
%)
body)))

Expand All @@ -46,6 +48,7 @@
(let [args (first arity-form)]
`(~args ~@(f args (rest arity-form)))))
arity-forms)]
(prn arity-forms)
`(~(first form)
~(second form)
(fn* ~@arity-forms))))
Expand Down

0 comments on commit 211a5d4

Please sign in to comment.