Browse files

make sure unify-gensyms doesn't lose type-hints

  • Loading branch information...
1 parent 45360d9 commit 211a5d4466a6141d092cf87fe895c0a4b1ff3d08 @ztellman committed Oct 7, 2012
Showing with 7 additions and 3 deletions.
  1. +2 −1 .gitignore
  2. +1 −1 project.clj
  3. +4 −1 src/potemkin/macros.clj
View
3 .gitignore
@@ -2,4 +2,5 @@ pom.xml
*jar
lib
classes
-.lein*
+.lein*
+target/**
View
2 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/"}
View
5 src/potemkin/macros.clj
@@ -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)))
@@ -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))))

0 comments on commit 211a5d4

Please sign in to comment.