True if this (regex) type may accept no input
True if this (regex) type may accept no input
(add-value-pred-whitelist! v)
Declare var predicate v as safe for calling to unify with values. v should be a predicate, pure (free of side-effects) and fast
Declare var predicate v as safe for calling to unify with values. v should be a predicate, pure (free of side-effects) and fast
(apply-t f args)
Utility/test fn. Given an invoke, return all possible return types
Utility/test fn. Given an invoke, return all possible return types
(arities-complementary? x y)
True if x and y are both fn-ts, and they have no arities in common
True if x and y are both fn-ts, and they have no arities in common
(debug-substs t substs)
Given a subst, print the parts relevant to type t
Given a subst, print the parts relevant to type t
(derive-all-any)
We need all tagged types to derive from #'any?, so default dispatching works
We need all tagged types to derive from #'any?, so default dispatching works
(disentangle x)
Given a type containing possible choices, such as alt
or or
,
resolve the choices and return a seq of all possible concrete specs
that don't contain ambiguity.
(disentangle (cat [(c/? ?t1) ?t2]) => ([cat ?t1 ?t2] [cat ?t2])
Given a type containing possible choices, such as `alt` or `or`, resolve the choices and return a seq of all possible concrete specs that don't contain ambiguity. (disentangle (cat [(c/? ?t1) ?t2]) => ([cat ?t1 ?t2] [cat ?t2])
For regexes, returns a seq of possible values of calling first
on
the type
For regexes, returns a seq of possible values of calling `first` on the type
(maybe-thunk it)
(maybe-thunk it substs)
Thunk if possible, else return the invoke-t
Thunk if possible, else return the invoke-t
(occurs? a b subst)
Does a occur anywhere inside b
Does a occur anywhere inside b
Unifies term x and y with initial subst.
Returns a seq of subst maps, (map of name->term) that unify x and y, or nil if they can't be unified.
Unifies term x and y with initial subst. Returns a seq of subst maps, (map of name->term) that unify x and y, or nil if they can't be unified.
(unify-terms-equiv x y)
Define unify-terms such that x and y unify, bidirectionally
Define unify-terms such that x and y unify, bidirectionally
(unify-terms-method? x y)
Is there a direct dispatch value for (unify-terms x y)?
Is there a *direct* dispatch value for (unify-terms x y)?
(with-require-substs unify-f)
It's easy to accidentally call the 2-arity unify from inside unify-terms, which can cause serious, hard-to-find bugs. Assert that never happens
It's easy to accidentally call the 2-arity unify from inside unify-terms, which can cause serious, hard-to-find bugs. Assert that never happens
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close