Optional typing in Clojure, as a library.
core.typed is separated into modules. You'll want the full type checker at development time, and the runtime dependencies in production.
In Clojure CLI's deps.edn, this will look something like this:
{:deps {org.clojure/core.typed.runtime.jvm {:mvn/version "0.7.2"}}
:aliases {:dev {:extra-deps {org.clojure/core.typed.checker.jvm {:mvn/version "0.7.2"}}}}}
You can then start a dev repl with clj -A:dev.
In Leiningen's project.clj, something like this:
(defproject a-project "0.0.1-SNAPSHOT"
:dependencies [[org.clojure/core.typed.runtime.jvm "0.7.2"]]
:profiles {:dev {:dependencies [[org.clojure/core.typed.checker.jvm "0.7.2"]]}})
Then, lein repl will automatically activate the :dev profile. Verify the type
checker is not included in uberjars with lein with-profile uberjar deps :tree.
Latest stable release is 0.7.2.
See modules for specific version coordinates:
core.typed supports Clojure 1.10.1 and JDK 1.8+.
Use the core.typed mailing list for core.typed discussion.
See wiki.
core.async Rock-paper-scissors
Thanks to the following people for contributing to core.typed:
Development is sponsored (via crowdfunding) by
YourKit is kindly supporting core.typed and other open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products:
Copyright © Ambrose Bonnaire-Sergeant, Rich Hickey & contributors.
Licensed under the EPL (see the file epl-v10.html).
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |