Now that Steve mentions it, I have fixed this kind of issue in my own defn macros. IIRC adding an inner loop form did the trick.
Thanks, Ambrose On Fri, Jul 25, 2014 at 10:35 PM, <adrian.med...@mail.yu.edu> wrote: > I do not believe this should be considered a bug. Recur is a special form > that rebinds the bindings at the point of recursion with new values. It > does not return a value. It does not get evaluated in the normal sense of > the word. You cannot type check a value on a valueless expression. Just > think about the implications of what a post condition on a recur form > means. Even if you wanted to give value semantics to the evaluation of a > recur form, there would be no single value it could check against. If you > wanted the post condition to only be evaluated on the termination of the > loop, or when the recur form is not conditionally present in the > expression, then you are essentially asking the impossible for the > compiler: it cannot know your intentions better than you do. > > > On Friday, July 25, 2014 10:12:14 AM UTC-4, Michael O'Keefe wrote: >> >> Thanks Bob, Steve, and Andy. I was trying to get logged into JIRA to file >> the bug report but I seem to be having a heck of a time -- I have a CA and >> am signed up at dev.clojure.org but when I try to log into JIRA, it >> gives me a nice "System Error" saying " user should not be null!". I've run >> out of time to deal with this right now but, Steve, if you get to it before >> me, feel free to submit the bug report. >> >> Thanks all for the helpful discussions! >> >> Michael >> >> On Friday, July 25, 2014 7:58:51 AM UTC-6, miner wrote: >>> >>> I will call it a bug. It's definitely surprising to the user, and >>> therefore worthy of a ticket. On first glance, it seems that the fix isn't >>> too hard. In core.clj where the macro fn is redefined, we just need to wrap >>> the section that handles the post condition either with a loop* or a fn* so >>> that the body has the proper recur target. I'll try to make a patch and a >>> test. If it works, I'll file a bug with the patch. >> >> -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > 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 clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.