Leiningen dependency (Clojars):
Gradual typing in Clojure, as a library.
[Talk] Clojure Conj 2012
Typed Clojure is released under the same license as Clojure: Eclipse Public License v 1.0.
Resultis not introduced when performing type inference on drest fn apps
tc-ignoreis more do-like.
Workaround for a quirk in the Clojure compiler where protocols only get generated in a top-level
(identity (do (def-protocol foo (bar [this])) bar)) ;; <-- bar cannot be resolved vs. (do (def-protocol foo (bar [this])) bar) ;; <-- bar is resolvable
(patch by Stephen Compall, issue #3)
- Fix typo in
into-arraylogic (patch by Stephen Compall, issue #4)
into-array>generalises Java types, does not need redundant type annotations. See User Documentation in wiki.
- Improve type of
clojure.core/class. (class ) is always a Class (class nil) is always a nil
- Move documentation to wiki.
- Better errors for Java methods and polymorphic function applications, borrow error messages from Typed Racket
ann-pprotocolsyntax to be flatter (ann-protocol pname method-name method-type ...) (ann-dataype dname [field-name :- field-type ...])
- Support Clojure 1.4.0+
- Better errors, print macro-expanded form from AST
- Refactor typed.core into individual files
(method-type 'java.io.File/getName)prints the current Typed Clojure type for the getName method of File
- Add types for some clojure.core coersion functions
- Preliminary support for ClojureScript
- Fix objects and filters being lost during polymorphic and dotted function applications
- Add tests for (if (seq a) (first a) 0) filter example.
- Can annotate datatypes outside current namespace
- Improve type of
- tc-pr-env -> print-env
- tc-pr-filters -> print-filterset
- Alter APersistentMap
- Check that local binding occurrences match with expected types
- Heterogeneous maps are APersistentMap's instead of IPersistentMap's
- Heterogeneous vectors are APersistentVector's instead of IPersistentVector's
ann-formfinally checks its expression is of the expected type
- Improve simplifying of intersections involving Java classes
(typed.core/ann v t) gives var
v the static type
(typed.core/ann-form f t) ensures form
f is of the static type
(typed.core/check-ns) type checks the current namespace.
(typed.core/cf t) type checks the form
(These don't completely type check yet)
- typed.test.rbt for examples of mutually recursive types and heterogenous maps
- typed.test.core-logic for examples of typing (tightly coupled) datatypes and protocols
- typed.test.example for a few little examples of simple usage
- Equality filters for occurrence typing
- Type check multimethods
- Rest type checking in fn definition
- Type check defprotocol definitions
- Unify AST with ClojureScript
- Namespace dependency management
Stephen Compall (S11001001)