Hi,
core.typed 0.2.3 is up, and comes with two new functions:
statistics returns a map of data on the results of type checking some namespaces. var-coverage is an example of how to leverage this data to write quick and easy aggregating functions.
This works well at the REPL, for example var-coverage accepts zero arguments for the current namespace.
clojure.core.typed.utils=> (t/var-coverage)
Start collecting clojure.core.typed.utils
Finished collecting clojure.core.typed.utils
Collected 1 namespaces in 347.052768 msecs
Checked 0 namespaces (approx. 0 lines) in 347.38633 msecs
Found 12 annotated vars out of 51 vars
23% var annotation coverage
nil
lein-typed 0.3.0 is also released, and supports a new
coverage command. It requires core.typed 0.2.3 or later to use.
$ lein typed coverage
Initializing core.typed ...
"Elapsed time: 4505.279024 msecs"
core.typed initialized.
Start collecting typed-demo.core
Finished collecting typed-demo.core
Collected 1 namespaces in 4619.570363 msecs
Checked 0 namespaces (approx. 0 lines) in 4621.945525 msecs
Start collecting typed-demo.nil
Finished collecting typed-demo.nil
Collected 1 namespaces in 20.48361 msecs
Checked 0 namespaces (approx. 0 lines) in 20.645363 msecs
Found 2 annotated vars out of 2 vars
100% var annotation coverage
This is all part of Brandon Bloom's ideal vision of how types should be used in Clojure. Thanks for the great idea!
Enjoy!
Ambrose