have only one debuggerHook declaration

This commit is contained in:
Ben Burdette 2022-03-14 11:58:11 -06:00
parent eaecaaa00b
commit 3dfab6e534
4 changed files with 3 additions and 7 deletions

View file

@ -93,10 +93,6 @@ EvalCommand::EvalCommand()
}); });
} }
extern std::function<void(const Error * error, const Env & env, const Expr & expr)> debuggerHook;
EvalCommand::~EvalCommand() EvalCommand::~EvalCommand()
{ {
if (evalState) if (evalState)

View file

@ -37,8 +37,6 @@
namespace nix { namespace nix {
std::function<void(const Error * error, const Env & env, const Expr & expr)> debuggerHook;
static char * allocString(size_t size) static char * allocString(size_t size)
{ {
char * t; char * t;

View file

@ -25,7 +25,6 @@ enum RepairFlag : bool;
typedef void (* PrimOpFun) (EvalState & state, const Pos & pos, Value * * args, Value & v); typedef void (* PrimOpFun) (EvalState & state, const Pos & pos, Value * * args, Value & v);
extern std::function<void(const Error * error, const Env & env, const Expr & expr)> debuggerHook;
void printStaticEnvBindings(const Expr &expr); void printStaticEnvBindings(const Expr &expr);
void printStaticEnvBindings(const StaticEnv &se, int lvl = 0); void printStaticEnvBindings(const StaticEnv &se, int lvl = 0);

View file

@ -6,6 +6,9 @@
namespace nix { namespace nix {
/* Launch the nix debugger */
std::function<void(const Error * error, const Env & env, const Expr & expr)> debuggerHook;
/* Displaying abstract syntax trees. */ /* Displaying abstract syntax trees. */