Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

typedclojure/core.typed.analyzer.jvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

core.typed.analyzer.jvm

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

DEPRECATION NOTICE

This repository is DEPRECATED and development has been moved to the core.typed monorepo. Please follow these instructions to upgrade.

Releases and Dependency Information

Latest stable release is 0.7.1.

deps.edn dependency information:

  org.clojure/core.typed.analyzer.jvm {:mvn/version "0.7.1"}

Leiningen dependency information:

[org.clojure/core.typed.analyzer.jvm "0.7.1"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.typed.analyzer.jvm</artifactId>
  <version>0.7.1</version>
</dependency>

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).