On Tue, Nov 28, 2017 at 3:22 PM, Khalid Jebbari <khalid.jebb...@gmail.com> wrote:
> Specs in docs are nice, great addition. > > 2 things related to them : > - what is `quotable` ? Couldn't find its docs in the page > All of the core specs are defined in an external library (so we can update it more frequently than Clojure): https://github.com/clojure/core.specs.alpha In this case, quotable is a helper function (refer-clojure and import are particularly weird in source/spec as they are designed to be used both directly at the repl and inside the ns macro): https://github.com/clojure/core.specs.alpha/blob/master/src/main/clojure/clojure/core/specs/alpha.clj#L222 We use the short form description in the docs (s/describe) rather than the long-form fully-qualified version (s/form) for readability. This is a tradeoff as it omits information but I think usually wins. It would be better if we could easily link to the definition of the spec source, which is possible to add. > - I suppose `:closure.core.spec.alpha/exclude` refers to a spec, but > again it's absent from the docs. As this is defined in another project you won't see it here. FYI, you can use `doc` to look at any spec by name at the repl: user=> (doc :clojure.core.specs.alpha/exclude) ------------------------- :clojure.core.specs.alpha/exclude Spec (coll-of simple-symbol?) A quick search in clojure.core and spec.alpha repos didn't reveal it. Where > are they defined ? It would be nice if they where included in docs and/or > were clickable directly from docstrings. > Agreed and you would see it here (but not clickable) if it was defined in this project. You can see an example of this in the java.jdbc docs: http://clojure.github.io/java.jdbc/#:clojure.java.jdbc.spec/as-arrays? It would be a nice enhancement to support an external http source for those external specs in the doc generator. -- 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.