{% do-not-edit-xml-comment %}
Optional typing in Clojure, as a library.
Typed Clojure 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 {{◊typedclojure-group-id◊}/typed.clj.runtime {:mvn/version "{◊typedclojure-stable-mvn-version◊}"}}
:aliases {:dev {:extra-deps {{◊typedclojure-group-id◊}/typed.clj.checker {:mvn/version "{◊typedclojure-stable-mvn-version◊}"}}}}}
You can then start a dev repl with clj -A:dev
.
In Leiningen's project.clj
, it will look something like this:
(defproject com.my-domain/a-project "1.0.0-SNAPSHOT"
:dependencies [[{◊typedclojure-group-id◊}/typed.clj.runtime "{◊typedclojure-stable-mvn-version◊}"]]
:profiles {:dev {:dependencies [[{◊typedclojure-group-id◊}/typed.clj.checker "{◊typedclojure-stable-mvn-version◊}"]]}})
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 {◊typedclojure-stable-mvn-version◊}.
See modules for specific version coordinates:
- typed.clj.checker: The JVM type checker
- typed.clj.runtime: JVM Runtime dependencies
- typed.clj.analyzer: Analyzer for JVM Clojure
- typed.clj.annotator: Automatic annotator
- typed.clj.refactor: Refactoring for JVM Clojure (unreleased)
- typed.clj.reader: Reader for JVM Clojure (unreleased)
- typed.clj.lang: Extensible languages
- typed.clj.spec: Type-like specs.
- typed.clj.malli: Malli integration.
- typed.cljs.analyzer: Analyzer for JS Clojure (unreleased)
- typed.cljs.checker: The JS type checker (unreleased)
- typed.cljc.analyzer: Implementation-agnostic base for Clojure analyzers
- typed.lib.clojure: Base type annotations
- typed.lib.core.async: Annotations for core.async
- typed.lib.spec.alpha: Annotations for spec.alpha
Typed Clojure supports Clojure {◊clojure-mvn-version◊} and JDK 1.8+.
Use the core.typed mailing list for Typed Clojure discussion.
#core-typed on Clojurians Slack (most active, for short announcements and questions)
#typedclojure on ZulipChat (for longer discussions due to threading and unlimited history)
See wiki.
core.async Rock-paper-scissors
Thanks to the following people for contributing to core.typed:
- Stephen Compall (S11001001)
- Andrew Brehaut (brehaut)
- Christopher Spencer (cspencer)
- Reid McKenzie (arrdem)
- Di Xu (xudifsd)
- Nicola Mometto (Bronsa)
- Chas Emerick (cemerick)
- Jake Goulding (shepmaster)
- Andy Fingerhut
- Aravind K N (arav93)
- Allen Rohner (arohner)
- Minori Yamashita (ympbyc)
- Kyle Kingsbury (aphyr)
- Nathan Sorenson
- Tobias Kortkamp (t6)
- Alejandro Gomez (dialelo)
- Piotr Jarzemski (kazuhiro)
Thanks to the following companies for their active sponsorship of Typed Clojure's development via OpenCollective.
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).
Copyright © Nicola Mometto, Rich Hickey & contributors.
Licensed under the EPL (see the file epl-v10.html).
Copyright © Nicola Mometto, Rich Hickey & contributors.
Licensed under the EPL (see the file epl-v10.html).
Copyright © Nicola Mometto, Rich Hickey & contributors.
Licensed under the EPL (see the file epl-v10.html).