Public API
IsDef.Utils.ValTypes.ValType
IsDef.Out
IsDef.Utils.ValTypes.ValTypeof
IsDef.apply
IsDef.isdef
IsDef.revise!
Core
IsDef.isdef
— Functionisdef(func, ArgType1, ArgType2, ...)::Bool
isdef(f, args...) = isdef(f, typeof.(args)...)
Checks whether the function is defined for the actual types or not. This works in compile time and hence can be used to optimize code.
When called on values, the values will be cast to types via use of typeof
for convenience.
IsDef.Out
— FunctionOut(func, ArgType1, ArgType2, ...)::ReturnType
Out(func, bytevalue1, ArgType2, ...)::ReturnType
Returns outputtype of function application. Returns IsDef.NotApplicable
if compiler notices that no Method can be found.
ValType
Missing docstring for ValTypes
. Check Documenter's build log for details.
IsDef.Utils.ValTypes.ValType
— Type ValType(value) -> ValType{typeof(value), value}
Alternative to Base.Val which makes the type of the value accessible for dispatch.
In order to retrieve the value you can simple use Base.get
on either the instance or the type.
julia> ValTypeof(1)
ValType{Int, 1}
julia> get(ValTypeof(1))
1
julia> ValTypeof(1) <: ValType{Int}
true
IsDef.Utils.ValTypes.ValTypeof
— Functionimportant: the ValType construct DOES NOT construct a value, but a type.
Special Applicability Types
Missing docstring for NotApplicable
. Check Documenter's build log for details.
Missing docstring for UnsureWhetherApplicable
. Check Documenter's build log for details.
Missing docstring for ApplicabilityProblem
. Check Documenter's build log for details.
Missing docstring for isapplicable
. Check Documenter's build log for details.
Other helpers
IsDef.apply
— Functionjust applies a given function to arguments and keyword arguments
This little helper is crucial if you want to typeinfer when only knowing the function type instead of the function instance.
Missing docstring for Core_return_type
. Check Documenter's build log for details.
IsDef.revise!
— Functionbecause revise does not work well for generated functions, dynamo and eval, we provide a manual way to revise the implementation
Missing docstring for suppress_warnings
. Check Documenter's build log for details.