Interactive Utilities

Interactive Utilities

Base.Docs.aproposFunction.
apropos(string)

Search through all documentation for a string, ignoring case.

source
varinfo(m::Module=Main, pattern::Regex=r"")

Return a markdown table giving information about exported global variables in a module, optionally restricted to those matching pattern.

The memory consumption estimate is an approximate lower bound on the size of the internal structure of the object.

source
versioninfo(io::IO=stdout; verbose::Bool=false, packages::Bool=false)

Print information about the version of Julia in use. The output is controlled with boolean keyword arguments:

  • packages: print information about installed packages

  • verbose: print all additional information

source
methodswith(typ[, module or function]; supertypes::Bool=false])

Return an array of methods with an argument of type typ.

The optional second argument restricts the search to a particular module or function (the default is all top-level modules).

If keyword supertypes is true, also return arguments with a parent type of typ, excluding type Any.

source
subtypes(T::DataType)

Return a list of immediate subtypes of DataType T. Note that all currently loaded subtypes are included, including those not visible in the current module.

Examples

julia> subtypes(Integer)
3-element Array{Any,1}:
 Bool
 Signed
 Unsigned
source
edit(path::AbstractString, line::Integer=0)

Edit a file or directory optionally providing a line number to edit the file at. Return to the julia prompt when you quit the editor. The editor can be changed by setting JULIA_EDITOR, VISUAL or EDITOR as an environment variable.

source
edit(function, [types])

Edit the definition of a function, optionally specifying a tuple of types to indicate which method to edit. The editor can be changed by setting JULIA_EDITOR, VISUAL or EDITOR as an environment variable.

source
@edit

Evaluates the arguments to the function or macro call, determines their types, and calls the edit function on the resulting expression.

source
less(file::AbstractString, [line::Integer])

Show a file using the default pager, optionally providing a starting line number. Returns to the julia prompt when you quit the pager.

source
less(function, [types])

Show the definition of a function using the default pager, optionally specifying a tuple of types to indicate which method to see.

source
@less

Evaluates the arguments to the function or macro call, determines their types, and calls the less function on the resulting expression.

source
@which

Applied to a function or macro call, it evaluates the arguments to the specified call, and returns the Method object for the method that would be called for those arguments. Applied to a variable, it returns the module in which the variable was bound. It calls out to the which function.

source
@functionloc

Applied to a function or macro call, it evaluates the arguments to the specified call, and returns a tuple (filename,line) giving the location for the method that would be called for those arguments. It calls out to the functionloc function.

source
@code_lowered

Evaluates the arguments to the function or macro call, determines their types, and calls code_lowered on the resulting expression.

source
@code_typed

Evaluates the arguments to the function or macro call, determines their types, and calls code_typed on the resulting expression.

source
code_warntype([io::IO], f, types)

Prints lowered and type-inferred ASTs for the methods matching the given generic function and type signature to io which defaults to stdout. The ASTs are annotated in such a way as to cause "non-leaf" types to be emphasized (if color is available, displayed in red). This serves as a warning of potential type instability. Not all non-leaf types are particularly problematic for performance, so the results need to be used judiciously. In particular, unions containing either missing or nothing are displayed in yellow, since these are often intentional. See @code_warntype for more information.

source
@code_warntype

Evaluates the arguments to the function or macro call, determines their types, and calls code_warntype on the resulting expression.

source
code_llvm([io=stdout,], f, types)

Prints the LLVM bitcodes generated for running the method matching the given generic function and type signature to io.

All metadata and dbg.* calls are removed from the printed bitcode. Use code_llvm_raw for the full IR.

source
@code_llvm

Evaluates the arguments to the function or macro call, determines their types, and calls code_llvm on the resulting expression.

source
code_native([io=stdout,], f, types; syntax = :att)

Prints the native assembly instructions generated for running the method matching the given generic function and type signature to io. Switch assembly syntax using syntax symbol parameter set to :att for AT&T syntax or :intel for Intel syntax.

source
@code_native

Evaluates the arguments to the function or macro call, determines their types, and calls code_native on the resulting expression.

source