Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.56 KB

File metadata and controls

79 lines (53 loc) · 2.56 KB

typed.clj.analyzer

Analyzer for JVM Clojure, tuned for consumption by an optional type checker.

Releases and Dependency Information

Latest stable release is 1.3.0.

deps.edn JAR dependency information:

  org.typedclojure/typed.clj.analyzer {:mvn/version "1.3.0"}

deps.edn Git dependency information:

  org.typedclojure/typed.clj.analyzer
  {:git/url "https://github.com/typedclojure/typedclojure"
   :deps/root "typed/clj.analyzer"
   :git/tag "1.3.0"
   :git/sha "b35a73fe51301f1f5188f249dabb1d2d689522e9"}

Leiningen dependency information:

[org.typedclojure/typed.clj.analyzer "1.3.0"]

Maven dependency information:

<dependency>
  <groupId>org.typedclojure</groupId>
  <artifactId>typed.clj.analyzer</artifactId>
  <version>1.3.0</version>
</dependency>

Compatibility

typed.clj.analyzer supports Clojure 1.9.0 and JDK 21+.

Documentation

API Reference

Differences from tools.analyzer.jvm

core.typed.analyzer.jvm is a heavily modified variant of tools.analyzer.jvm. If you're familiar with the latter, here's what this library does differently.

  • Adds an :unanalyzed AST node that just holds a :form and :env.
  • Forms are analyzed lazily, with :unanalyzed nodes being used for immediate children.
  • :unanalyzed nodes support a :clojure.core.typed.analyzer/config entry which will be associated onto whatever node it becomes when analyzed.
  • clojure.tools.analyzer.env is not used.
  • resolve-{sym,ns} are now dynamic variables that are implemented for each platform.
  • run-passes only supports a single pass
  • uniquify-locals is a default pass that is compatible with :unanalyzed nodes
  • Gilardi scenario can be (carefully) managed (see clojure.core.typed.analyzer.jvm.gilardi-test for a type system example)

License

Copyright © Ambrose Bonnaire-Sergeant, Rich Hickey & contributors.

Licensed under the EPL (see the file epl-v10.html).

tools.analyzer.jvm

Copyright © Nicola Mometto, Rich Hickey & contributors.

Licensed under the EPL (see the file epl-v10.html).