Thanks for the help. The problem was fixed when I both removed the ~ in front of parser-m and changed ~product-expr to ~...@product-expr.
Why is it, though, that parser-m should not be unquoted? If it was unquoted, would it not just pass in the value of parser-m at macro- expansion time? On Apr 30, 8:47 am, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > Am 30.04.2009 um 17:39 schrieb samppi: > > > (defmacro complex > > [steps & product-expr] > > `(domonad ~parser-m ~steps ~product-expr)) > > Just leave out the ~ in front of parser-m. And > I'm not sure how you want to handle product-expr. > Maybe a @ is also missing here. > > (defmacro complex > [steps & product-expr] > `(domonad parser-m ~steps ~...@product-expr)) > > The difference is the following. Without @: > > => (macroexpand-1 '(complex [...] foo bar baz)) > (domonad parser-m [...] (foo bar baz)) > > With @: > > => (macroexpand-1 '(complex [...] foo bar baz)) > (domonad parser-m [...] foo bar baz) > > > It's giving me this kind of error: > > Exception in thread "main" java.lang.ExceptionInInitializerError > > (test_parse.clj:0) > > Look at the stacktrace and scroll very far to the > end. Normally there is a "Caused by" sentence, > which probably is more informative. At least > that is my experience. > > Hope this helps. > > Sincerely > Meikel > > smime.p7s > 5KViewDownload --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---