|
|
| NixRepl (const SearchPath &searchPath, nix::ref< Store > store, EvalState &state, std::function< AnnotatedValues()> getValues) |
| ReplExitStatus | mainLoop () override |
| void | initEnv () override |
| virtual StringSet | completePrefix (const std::string &prefix) override |
| StorePath | getDerivationPath (Value &v) |
|
ProcessLineResult | processLine (std::string line) |
|
void | loadFile (const Path &path) |
|
void | loadFlake (const std::string &flakeRef) |
|
void | loadFiles () |
|
void | reloadFiles () |
|
template<typename T, typename NameFn, typename ValueFn> |
| void | addToScope (T &&things, NameFn nameFn, ValueFn valueFn) |
|
void | addAttrsToScope (Value &attrs) |
|
void | addValMapToScope (const ValMap &attrs) |
|
void | addVarToScope (const Symbol name, Value &v) |
|
Expr & | parseString (std::string s) |
|
std::variant< std::unique_ptr< Expr >, ExprReplBindings > | parseReplString (std::string s) |
|
void | evalString (std::string s, Value &v) |
|
void | loadDebugTraceEnv (const DebugTrace &dt) |
| void | loadReplOverlays () |
| Value * | replOverlays () |
| Value * | getReplOverlaysEvalFunction () |
| Value * | replInitInfo () |
| Value * | bindingsToAttrs () |
| Value * | evalFile (SourcePath &path) |
|
void | printValue (std::ostream &str, Value &v, unsigned int maxDepth=std::numeric_limits< unsigned int >::max()) |
|
| static constexpr std::array | COMMANDS |
| static constexpr std::array | DEBUG_COMMANDS |
|
static const int | envSize = 1 << 20 |
◆ bindingsToAttrs()
| Value * nix::NixRepl::bindingsToAttrs |
( |
| ) |
|
Get the current top-level bindings as an AttrSet.
◆ completePrefix()
| StringSet nix::NixRepl::completePrefix |
( |
const std::string & | prefix | ) |
|
|
overridevirtual |
◆ evalFile()
Parse a file, evaluate its result, and force the resulting value.
◆ getDerivationPath()
- Exceptions
-
| nix::Error | thrown directly if the expression does not evaluate to a derivation, or evaluates to an invalid derivation. |
◆ getReplOverlaysEvalFunction()
| Value * nix::NixRepl::getReplOverlaysEvalFunction |
( |
| ) |
|
Get the Nix function that composes the repl-overlays together.
◆ initEnv()
| void nix::NixRepl::initEnv |
( |
| ) |
|
|
overridevirtual |
◆ loadReplOverlays()
| void nix::NixRepl::loadReplOverlays |
( |
| ) |
|
Load the repl-overlays and add the resulting AttrSet to the top-level bindings.
◆ mainLoop()
◆ replInitInfo()
| Value * nix::NixRepl::replInitInfo |
( |
| ) |
|
Get the info AttrSet that's passed as the first argument to each of the repl-overlays.
◆ replOverlays()
| Value * nix::NixRepl::replOverlays |
( |
| ) |
|
Get a list of each of the repl-overlays (parsed and evaluated).
◆ COMMANDS
| std::array nix::NixRepl::COMMANDS |
|
staticconstexpr |
Initial value:= {
"add"sv, "a"sv,
"load"sv, "l"sv,
"load-flake"sv, "lf"sv,
"reload"sv, "r"sv,
"edit"sv, "e"sv,
"t"sv,
"u"sv,
"b"sv,
"bl"sv,
"i"sv,
"sh"sv,
"log"sv,
"print"sv, "p"sv,
"quit"sv, "q"sv,
"doc"sv,
"te"sv,
}
◆ DEBUG_COMMANDS
| std::array nix::NixRepl::DEBUG_COMMANDS |
|
staticconstexpr |
Initial value:= {
"env"sv,
"bt"sv, "backtrace"sv,
"st"sv,
"c"sv, "continue"sv,
"s"sv, "step"sv,
}
◆ replOverlaysEvalFunction
| std::shared_ptr<Value *> nix::NixRepl::replOverlaysEvalFunction |
Initial value:=
std::allocate_shared<Value *>(TraceableAllocator<Value *>(), nullptr)
Cached return value of getReplOverlaysEvalFunction.
Note: This is shared_ptr to avoid garbage collection.
The documentation for this struct was generated from the following file: