Leiningen dependency (Clojars):
[typed "0.1.6"]
Gradual typing in Clojure, as a library.
See wiki.
Typed Clojure is released under the same license as Clojure: Eclipse Public License v 1.0.
See LICENSE
.
0.1.6
Ensure Result
is not introduced when performing type inference on drest fn apps
tc-ignore
is more do-like.
Workaround for a quirk in the Clojure compiler where protocols only get generated in
a top-level do
.
(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)
into-array
logic
(patch by Stephen Compall, issue #4)into-array>
generalises Java types, does not need redundant type annotations. See User Documentation in wiki.clojure.core/class
.
(class ) is always a Class
(class nil) is always a nil0.1.5
ann-datatype
, ann-protocol
, ann-pprotocol
syntax to be flatter
(ann-protocol pname
method-name method-type ...)
(ann-dataype dname
[field-name :- field-type ...])defprotocol>
0.1.4
0.1.3
method-type
(method-type 'java.io.File/getName)
prints the current Typed Clojure type for the getName method of File0.1.2
seq
, next
, conj
0.1.1
ann-form
finally checks its expression is of the expected type(typed.core/ann v t)
gives var v
the static type t
.
(typed.core/ann-form f t)
ensures form f
is of the static type t
.
(typed.core/check-ns)
type checks the current namespace.
(typed.core/cf t)
type checks the form t
.
(These don't completely type check yet)
Stephen Compall (S11001001)
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close