Clojure-Contrib

clojure.contrib.trace/deftrace does not work with function definitions with doc-strings

Details

  • Type: Defect Defect
  • Status: In Progress In Progress
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Apparently, defttrace does not support functions with doc-strings. I tried replacing defn with deftrace in a function of mine (as the docs indicated) and I got the following error -

java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol
</code></pre>

Sample code to reproduce the error - 

<pre><code>(deftrace fact
  "Calculate the factorial of x"
  [x]
  (if (< x 1)
    1
    (* x (fact (- x 1)))))

Would be great if this bug is fixed, all my functions have doc-strings

Activity

Alex Miller made changes -
Field Original Value New Value
Approval Test [ 10013 ]

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated: