Skip to content

afniedermayer/InferenceUtilities.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InferenceUtilities.jl

Provides utility macros for inferences. @isinferred f(x) does the same as @inferred f(x), but returns a boolean rather than throwing an exception. @isinferred_noneval f(x) checks whether f is type stable without evaluating it. It does evaluate the arguments though. @return_types f(x, y) with x::T and y::S is equivalent to Base.return_types(f, (T,S)).

Usage:

Pkg.clone("https://github.com/afniedermayer/InferenceUtilities.jl")
f(a,b,c) = b>0 ? 1 : 1.0
@isinferred f(1,2,3)
@isinferred_noneval f(1,2,3)
@return_types f(1,2,3)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages