(and-classes-compatible? ts)
True if the and-t
class
es are compatible (doesn't contain concrete classes that aren't ancestors)
True if the `and-t` `class`es are compatible (doesn't contain concrete classes that aren't ancestors)
(and-consolidate ts)
Given the types for an and
, simplify and consolidate types, returning a seq of types
Given the types for an `and`, simplify and consolidate types, returning a seq of types
(and-nots-compatible? ts)
True if ts does not contains ?x and (not-t ?x)
True if ts does not contains ?x and (not-t ?x)
(and-values-compatible? ts)
true if and
ts does not contain two non-equal values
true if `and` ts does not contain two non-equal values
(canonicalize t)
Given a type, convert to it's most precise version
Given a type, convert to it's most precise version
(cat-length t)
Given a cat, return its length
Given a cat, return its length
(class-cast t)
cast to class-t If the type can be cast without losing precision, else nil
cast to class-t If the type can be cast without losing precision, else nil
(defn-tagged-type name tag)
defn ~name as a fn that constructs a vector tagged type
defn ~name as a fn that constructs a vector tagged type
(derive-type parent type)
(derive-type h parent type)
clojure.core/derive, but patched to allow types.
Note arguments are reversed from clojure.core/derive, to resemble (valid? x y)
clojure.core/derive, but patched to allow types. Note arguments are reversed from clojure.core/derive, to resemble (valid? x y)
(fn-args f-t)
Return an or
of all arities this fn will accept
Return an `or` of all arities this fn will accept
(fn-ret f-t)
Return an or
of all types this fn may return
Return an `or` of all types this fn may return
(freshen form)
Walk form, replacing all logic variables with unique versions
Walk form, replacing all logic variables with unique versions
(get-lvars expr)
Return a set of logic variables in expression
Return a set of logic variables in expression
(join-not-pairs ts)
If two types in ts are (not x) and x, replace them with any?
If two types in ts are (not x) and x, replace them with any?
(ns-predicates ns)
Return all var predicates in ns
Return all var predicates in ns
(parents t)
Same as clojure.core/parents, but for types
Same as clojure.core/parents, but for types
(rename m form)
Given a map of lvars to lvars, walk form and replace all instances of keys values
Given a map of lvars to lvars, walk form and replace all instances of keys values
(set-equiv-types! x y)
Define types x and y as being equivalent
Define types x and y as being equivalent
(simplify-arities fn-map)
Merge fn arities with the same return type and same number of arguments
Merge fn arities with the same return type and same number of arguments
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close