Movatterモバイル変換


[0]ホーム

URL:


Clojure

Clojure Core API Reference

Clojurev1.13.0 API
Namespaces
Other Versions
Clojure Home

API forclojure.repl -Clojurev1.13.0 (in development)

byChris Houser, Christophe Grand, Stephen Gilardi, Michel Salim

Full namespace name:clojure.repl

Overview

Utilities meant to be used interactively at the REPL

Public Variables and Functions



apropos

function
Usage: (apropos str-or-pattern)
Given a regular expression or stringable thing, return a seq of allpublic definitions in all currently-loaded namespaces that match thestr-or-pattern.
Source


demunge

function
Usage: (demunge fn-name)
Given a string representation of a fn class,as in a stack trace element, returns a readable version.
Added in Clojure version 1.3
Source


dir

macro
Usage: (dir nsname)
Prints a sorted directory of public vars in a namespace
Source


dir-fn

function
Usage: (dir-fn ns)
Returns a sorted seq of symbols naming public vars ina namespace or namespace alias. Looks for aliases in *ns*
Source


doc

macro
Usage: (doc name)
Prints documentation for a var or special form given its name,or for a spec if given a keyword
Added in Clojure version 1.0
Source


find-doc

function
Usage: (find-doc re-string-or-pattern)
Prints documentation for any var whose documentation or namecontains a match for re-string-or-pattern
Added in Clojure version 1.0
Source


pst

function
Usage: (pst)       (pst e-or-depth)       (pst e depth)
Prints a stack trace of the exception, to the depth requested. If none supplied, uses the root cause of themost recent repl exception (*e), and a depth of 12.
Added in Clojure version 1.3
Source


root-cause

function
Usage: (root-cause t)
Returns the initial cause of an exception or error by peeling off all ofits wrappers
Added in Clojure version 1.3
Source


set-break-handler!

function
Usage: (set-break-handler!)       (set-break-handler! f)
Register INT signal handler.  After calling this, Ctrl-C will causethe given function f to be called with a single argument, the signal.Uses thread-stopper if no function given.
Source


source

macro
Usage: (source n)
Prints the source code for the given symbol, if it can find it.This requires that the symbol resolve to a Var defined in anamespace for which the .clj is in the classpath.Example: (source filter)
Source


source-fn

function
Usage: (source-fn x)
Returns a string of the source code for the given symbol, if it canfind it.  This requires that the symbol resolve to a Var defined ina namespace for which the .clj is in the classpath.  Returns nil ifit can't find the source.  For most REPL usage, 'source' is moreconvenient.Example: (source-fn 'filter)
Source


stack-element-str

function
Usage: (stack-element-str el)
Returns a (possibly unmunged) string representation of a StackTraceElement
Added in Clojure version 1.3
Source


thread-stopper

function
Usage: (thread-stopper)       (thread-stopper thread)
Returns a function that takes one arg and uses that as an exception messageto stop the given thread.  Defaults to the current thread
Source

clojure.repl.deps

clojure.repl.deps provides facilities for dynamically modifying the availablelibraries in the runtime when running at the REPL, without restarting

Public Variables and Functions



add-lib

function
Usage: (add-lib lib coord)       (add-lib lib)
Given a lib that is not yet on the repl classpath, make it available bydownloading the library if necessary and adding it to the classloader.Libs already on the classpath are not updated. Requires a valid parentDynamicClassLoader. lib - symbol identifying a library, for Maven: groupId/artifactId coord - optional map of location information specific to the procurer,         or latest if not suppliedReturns coll of libs loaded, including transitive (or nil if none).For info on libs, coords, and versions, see:https://clojure.org/reference/deps_and_cli
Added in Clojure version 1.12
Source


add-libs

function
Usage: (add-libs lib-coords)
Given lib-coords, a map of lib to coord, will resolve all transitive deps for the libstogether and add them to the repl classpath, unlike separate calls to add-lib.
Added in Clojure version 1.12
Source


sync-deps

function
Usage: (sync-deps & {:as opts})
Calls add-libs with any libs present in deps.edn but not yet present on the classpath.:aliases - coll of alias keywords to use during the sync
Added in Clojure version 1.12
Source
Copyright 2007-2025 by Rich Hickey
Logo & site design byTom Hickey.
Clojure auto-documentation system by Tom Faulhaber.

[8]ページ先頭

©2009-2025 Movatter.jp