Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
eval.hh
Go to the documentation of this file.
1#pragma once
3
4#include "attr-set.hh"
5#include "eval-error.hh"
6#include "types.hh"
7#include "value.hh"
8#include "nixexpr.hh"
9#include "symbol-table.hh"
10#include "config.hh"
12#include "position.hh"
13#include "pos-table.hh"
14#include "source-accessor.hh"
15#include "search-path.hh"
16#include "repl-exit-status.hh"
17#include "ref.hh"
18
19#include <map>
20#include <optional>
21#include <functional>
22
23namespace nix {
24
30constexpr size_t maxPrimOpArity = 8;
31
32class Store;
33namespace fetchers { struct Settings; }
34struct EvalSettings;
35class EvalState;
36class StorePath;
37struct SingleDerivedPath;
38enum RepairFlag : bool;
39struct MemorySourceAccessor;
40namespace eval_cache {
41 class EvalCache;
42}
43
47class CallDepth {
48 size_t & count;
49
50public:
51 CallDepth(size_t & count) : count(count) {
52 ++count;
53 }
54 ~CallDepth() {
55 --count;
56 }
57};
58
62using PrimOpFun = void(EvalState & state, const PosIdx pos, Value * * args, Value & v);
63
67struct PrimOp
68{
72 std::string name;
73
78 std::vector<std::string> args;
79
86 size_t arity = 0;
87
91 const char * doc = nullptr;
92
98 bool addTrace = true;
99
103 std::function<PrimOpFun> fun;
104
108 std::optional<ExperimentalFeature> experimentalFeature;
109
113 bool internal = false;
114
119 void check();
120};
121
122std::ostream & operator<<(std::ostream & output, const PrimOp & primOp);
123
128{
134 ValueType type = nThunk;
135
139 const char * doc = nullptr;
140
144 bool impureOnly = false;
145};
146
147typedef std::map<std::string, Value *, std::less<std::string>, traceable_allocator<std::pair<const std::string, Value *> > > ValMap;
148
149typedef std::unordered_map<PosIdx, DocComment> DocCommentMap;
150
151struct Env
152{
153 Env * up;
154 Value * values[0];
155};
156
157void printEnvBindings(const EvalState &es, const Expr & expr, const Env & env);
158void printEnvBindings(const SymbolTable & st, const StaticEnv & se, const Env & env, int lvl = 0);
159
160std::unique_ptr<ValMap> mapStaticEnvBindings(const SymbolTable & st, const StaticEnv & se, const Env & env);
161
162void copyContext(const Value & v, NixStringContext & context);
163
164
165std::string printValue(EvalState & state, Value & v);
166std::ostream & operator << (std::ostream & os, const ValueType t);
167
168
169struct RegexCache;
170
171std::shared_ptr<RegexCache> makeRegexCache();
172
174 std::shared_ptr<Pos> pos;
175 const Expr & expr;
176 const Env & env;
177 HintFmt hint;
178 bool isError;
179};
180
181class EvalState : public std::enable_shared_from_this<EvalState>
182{
183public:
184 const fetchers::Settings & fetchSettings;
185 const EvalSettings & settings;
186 SymbolTable symbols;
187 PosTable positions;
188
189 const Symbol sWith, sOutPath, sDrvPath, sType, sMeta, sName, sValue,
190 sSystem, sOverrides, sOutputs, sOutputName, sIgnoreNulls,
191 sFile, sLine, sColumn, sFunctor, sToString,
192 sRight, sWrong, sStructuredAttrs,
193 sAllowedReferences, sAllowedRequisites, sDisallowedReferences, sDisallowedRequisites,
194 sMaxSize, sMaxClosureSize,
195 sBuilder, sArgs,
196 sContentAddressed, sImpure,
197 sOutputHash, sOutputHashAlgo, sOutputHashMode,
198 sRecurseForDerivations,
199 sDescription, sSelf, sEpsilon, sStartSet, sOperator, sKey, sPath,
200 sPrefix,
201 sOutputSpecified;
202
203 const Expr::AstSymbols exprSymbols;
204
209 RepairFlag repair;
210
211 Bindings emptyBindings;
212
217
223 Value vNull;
224
230 Value vTrue;
231
237 Value vFalse;
238
247
252
257
263
264 const SourcePath derivationInternal;
265
266 const SourcePath callFlakeInternal;
267
272
277
278 RootValue vImportedDrvToDerivation = nullptr;
279
283 ReplExitStatus (* debugRepl)(ref<EvalState> es, const ValMap & extraEnv);
284 bool debugStop;
285 bool inDebugger = false;
286 int trylevel;
287 std::list<DebugTrace> debugTraces;
288 std::map<const Expr*, const std::shared_ptr<const StaticEnv>> exprEnvs;
289 const std::shared_ptr<const StaticEnv> getStaticEnv(const Expr & expr) const
290 {
291 auto i = exprEnvs.find(&expr);
292 if (i != exprEnvs.end())
293 return i->second;
294 else
295 return std::shared_ptr<const StaticEnv>();;
296 }
297
299 bool canDebug();
300
302 void runDebugRepl(const Error * error);
303
310 void runDebugRepl(const Error * error, const Env & env, const Expr & expr);
311
312 template<class T, typename... Args>
313 [[nodiscard, gnu::noinline]]
314 EvalErrorBuilder<T> & error(const Args & ... args) {
315 // `EvalErrorBuilder::debugThrow` performs the corresponding `delete`.
316 return *new EvalErrorBuilder<T>(*this, args...);
317 }
318
322 std::map<const Hash, ref<eval_cache::EvalCache>> evalCaches;
323
324private:
325
326 /* Cache for calls to addToStore(); maps source paths to the store
327 paths. */
328 Sync<std::unordered_map<SourcePath, StorePath>> srcToStore;
329
333 typedef std::unordered_map<SourcePath, Expr *, std::hash<SourcePath>, std::equal_to<SourcePath>, traceable_allocator<std::pair<const SourcePath, Expr *>>> FileParseCache;
334 FileParseCache fileParseCache;
335
339 typedef std::unordered_map<SourcePath, Value, std::hash<SourcePath>, std::equal_to<SourcePath>, traceable_allocator<std::pair<const SourcePath, Value>>> FileEvalCache;
340 FileEvalCache fileEvalCache;
341
346 std::unordered_map<SourcePath, DocCommentMap> positionToDocComment;
347
348 LookupPath lookupPath;
349
350 std::map<std::string, std::optional<SourcePath>> lookupPathResolved;
351
355 std::shared_ptr<RegexCache> regexCache;
356
357#if HAVE_BOEHMGC
361 std::shared_ptr<void *> valueAllocCache;
362
366 std::shared_ptr<void *> env1AllocCache;
367#endif
368
369public:
370
371 EvalState(
372 const LookupPath & _lookupPath,
374 const fetchers::Settings & fetchSettings,
375 const EvalSettings & settings,
376 std::shared_ptr<Store> buildStore = nullptr);
377 ~EvalState();
378
379 LookupPath getLookupPath() { return lookupPath; }
380
386
390 SourcePath rootPath(PathView path);
391
395 void allowPath(const Path & path);
396
401 void allowPath(const StorePath & storePath);
402
406 void allowClosure(const StorePath & storePath);
407
411 void allowAndSetStorePathString(const StorePath & storePath, Value & v);
412
413 void checkURI(const std::string & uri);
414
424 Path toRealPath(const Path & path, const NixStringContext & context);
425
429 Expr * parseExprFromFile(const SourcePath & path);
430 Expr * parseExprFromFile(const SourcePath & path, std::shared_ptr<StaticEnv> & staticEnv);
431
435 Expr * parseExprFromString(std::string s, const SourcePath & basePath, std::shared_ptr<StaticEnv> & staticEnv);
436 Expr * parseExprFromString(std::string s, const SourcePath & basePath);
437
438 Expr * parseStdin();
439
445 void evalFile(const SourcePath & path, Value & v, bool mustBeTrivial = false);
446
447 void resetFileCache();
448
452 SourcePath findFile(const std::string_view path);
453 SourcePath findFile(const LookupPath & lookupPath, const std::string_view path, const PosIdx pos = noPos);
454
462 std::optional<SourcePath> resolveLookupPathPath(
463 const LookupPath::Path & elem,
464 bool initAccessControl = false);
465
471 void eval(Expr * e, Value & v);
472
477 inline bool evalBool(Env & env, Expr * e);
478 inline bool evalBool(Env & env, Expr * e, const PosIdx pos, std::string_view errorCtx);
479 inline void evalAttrs(Env & env, Expr * e, Value & v, const PosIdx pos, std::string_view errorCtx);
480
487 inline void forceValue(Value & v, const PosIdx pos);
488
489 void tryFixupBlackHolePos(Value & v, PosIdx pos);
490
495 void forceValueDeep(Value & v);
496
500 NixInt forceInt(Value & v, const PosIdx pos, std::string_view errorCtx);
501 NixFloat forceFloat(Value & v, const PosIdx pos, std::string_view errorCtx);
502 bool forceBool(Value & v, const PosIdx pos, std::string_view errorCtx);
503
504 void forceAttrs(Value & v, const PosIdx pos, std::string_view errorCtx);
505
506 template <typename Callable>
507 inline void forceAttrs(Value & v, Callable getPos, std::string_view errorCtx);
508
509 inline void forceList(Value & v, const PosIdx pos, std::string_view errorCtx);
513 void forceFunction(Value & v, const PosIdx pos, std::string_view errorCtx);
514 std::string_view forceString(Value & v, const PosIdx pos, std::string_view errorCtx);
515 std::string_view forceString(Value & v, NixStringContext & context, const PosIdx pos, std::string_view errorCtx);
516 std::string_view forceStringNoCtx(Value & v, const PosIdx pos, std::string_view errorCtx);
517
518 template<typename... Args>
519 [[gnu::noinline]]
520 void addErrorTrace(Error & e, const Args & ... formatArgs) const;
521 template<typename... Args>
522 [[gnu::noinline]]
523 void addErrorTrace(Error & e, const PosIdx pos, const Args & ... formatArgs) const;
524
525public:
530 bool isDerivation(Value & v);
531
532 std::optional<std::string> tryAttrsToString(const PosIdx pos, Value & v,
533 NixStringContext & context, bool coerceMore = false, bool copyToStore = true);
534
543 BackedStringView coerceToString(const PosIdx pos, Value & v, NixStringContext & context,
544 std::string_view errorCtx,
545 bool coerceMore = false, bool copyToStore = true,
546 bool canonicalizePath = true);
547
548 StorePath copyPathToStore(NixStringContext & context, const SourcePath & path);
549
557 SourcePath coerceToPath(const PosIdx pos, Value & v, NixStringContext & context, std::string_view errorCtx);
558
562 StorePath coerceToStorePath(const PosIdx pos, Value & v, NixStringContext & context, std::string_view errorCtx);
563
567 std::pair<SingleDerivedPath, std::string_view> coerceToSingleDerivedPathUnchecked(const PosIdx pos, Value & v, std::string_view errorCtx);
568
584 SingleDerivedPath coerceToSingleDerivedPath(const PosIdx pos, Value & v, std::string_view errorCtx);
585
586#if HAVE_BOEHMGC
588 std::shared_ptr<Env *> baseEnvP;
589#endif
590
591public:
592
598
602 std::shared_ptr<StaticEnv> staticBaseEnv; // !!! should be private
603
607 std::unordered_map<std::string, Value *, std::hash<std::string>, std::equal_to<std::string>, traceable_allocator<std::pair<const std::string, Value *>>> internalPrimOps;
608
615 std::vector<std::pair<std::string, Constant>> constantInfos;
616
617private:
618
619 unsigned int baseEnvDispl = 0;
620
621 void createBaseEnv();
622
623 Value * addConstant(const std::string & name, Value & v, Constant info);
624
625 void addConstant(const std::string & name, Value * v, Constant info);
626
627 Value * addPrimOp(PrimOp && primOp);
628
629public:
630
636 Value & getBuiltin(const std::string & name);
637
642 Value & getBuiltins();
643
644 struct Doc
645 {
646 Pos pos;
647 std::optional<std::string> name;
648 size_t arity;
649 std::vector<std::string> args;
654 const char * doc;
655 };
656
663 std::optional<Doc> getDoc(Value & v);
664
665private:
666
667 inline Value * lookupVar(Env * env, const ExprVar & var, bool noEval);
668
669 friend struct ExprVar;
670 friend struct ExprAttrs;
671 friend struct ExprLet;
672
673 Expr * parse(
674 char * text,
675 size_t length,
676 Pos::Origin origin,
677 const SourcePath & basePath,
678 std::shared_ptr<StaticEnv> & staticEnv);
679
683 size_t callDepth = 0;
684
685public:
686
690 inline CallDepth addCallDepth(const PosIdx pos);
691
696 bool eqValues(Value & v1, Value & v2, const PosIdx pos, std::string_view errorCtx);
697
705 void assertEqValues(Value & v1, Value & v2, const PosIdx pos, std::string_view errorCtx);
706
707 bool isFunctor(Value & fun);
708
709 void callFunction(Value & fun, std::span<Value *> args, Value & vRes, const PosIdx pos);
710
711 void callFunction(Value & fun, Value & arg, Value & vRes, const PosIdx pos)
712 {
713 Value * args[] = {&arg};
714 callFunction(fun, args, vRes, pos);
715 }
716
721 void autoCallFunction(const Bindings & args, Value & fun, Value & res);
722
726 inline Value * allocValue();
727 inline Env & allocEnv(size_t size);
728
729 Bindings * allocBindings(size_t capacity);
730
731 BindingsBuilder buildBindings(size_t capacity)
732 {
733 return BindingsBuilder(*this, allocBindings(capacity));
734 }
735
736 ListBuilder buildList(size_t size)
737 {
738 return ListBuilder(*this, size);
739 }
740
744 Value *getBool(bool b);
745
746 void mkThunk_(Value & v, Expr * expr);
747 void mkPos(Value & v, PosIdx pos);
748
755 void mkStorePathString(const StorePath & storePath, Value & v);
756
777 void mkOutputString(
778 Value & value,
779 const SingleDerivedPath::Built & b,
780 std::optional<StorePath> optStaticOutputPath,
781 const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings);
782
789 const SingleDerivedPath & p,
790 Value & v);
791
792 void concatLists(Value & v, size_t nrLists, Value * const * lists, const PosIdx pos, std::string_view errorCtx);
793
800 void maybePrintStats();
801
805 void printStatistics();
806
813 bool fullGC();
814
821 [[nodiscard]] StringMap realiseContext(const NixStringContext & context, StorePathSet * maybePaths = nullptr, bool isIFD = true);
822
830 std::string realiseString(Value & str, StorePathSet * storePathsOutMaybe, bool isIFD = true, const PosIdx pos = noPos);
831
832 /* Call the binary path filter predicate used builtins.path etc. */
833 bool callPathFilter(
834 Value * filterFun,
835 const SourcePath & path,
836 PosIdx pos);
837
838 DocComment getDocCommentForPos(PosIdx pos);
839
840private:
841
846 std::string mkOutputStringRaw(
847 const SingleDerivedPath::Built & b,
848 std::optional<StorePath> optStaticOutputPath,
849 const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings);
850
856 const SingleDerivedPath & p);
857
858 unsigned long nrEnvs = 0;
859 unsigned long nrValuesInEnvs = 0;
860 unsigned long nrValues = 0;
861 unsigned long nrListElems = 0;
862 unsigned long nrLookups = 0;
863 unsigned long nrAttrsets = 0;
864 unsigned long nrAttrsInAttrsets = 0;
865 unsigned long nrAvoided = 0;
866 unsigned long nrOpUpdates = 0;
867 unsigned long nrOpUpdateValuesCopied = 0;
868 unsigned long nrListConcats = 0;
869 unsigned long nrPrimOpCalls = 0;
870 unsigned long nrFunctionCalls = 0;
871
872 bool countCalls;
873
874 typedef std::map<std::string, size_t> PrimOpCalls;
875 PrimOpCalls primOpCalls;
876
877 typedef std::map<ExprLambda *, size_t> FunctionCalls;
878 FunctionCalls functionCalls;
879
880 void incrFunctionCall(ExprLambda * fun);
881
882 typedef std::map<PosIdx, size_t> AttrSelects;
883 AttrSelects attrSelects;
884
885 friend struct ExprOpUpdate;
886 friend struct ExprOpConcatLists;
887 friend struct ExprVar;
888 friend struct ExprString;
889 friend struct ExprInt;
890 friend struct ExprFloat;
891 friend struct ExprPath;
892 friend struct ExprSelect;
893 friend void prim_getAttr(EvalState & state, const PosIdx pos, Value * * args, Value & v);
894 friend void prim_match(EvalState & state, const PosIdx pos, Value * * args, Value & v);
895 friend void prim_split(EvalState & state, const PosIdx pos, Value * * args, Value & v);
896
897 friend struct Value;
898 friend class ListBuilder;
899};
900
901struct DebugTraceStacker {
902 DebugTraceStacker(EvalState & evalState, DebugTrace t);
903 ~DebugTraceStacker()
904 {
905 evalState.debugTraces.pop_front();
906 }
907 EvalState & evalState;
908 DebugTrace trace;
909};
910
917std::string_view showType(ValueType type, bool withArticle = true);
918std::string showType(const Value & v);
919
925SourcePath resolveExprPath(SourcePath path, bool addDefaultNix = true);
926
930bool isAllowedURI(std::string_view uri, const Strings & allowedPaths);
931
932}
933
934#include "eval-inline.hh"
Definition args.hh:28
Definition types.hh:65
Definition attr-set.hh:48
Definition eval.hh:47
Definition canon-path.hh:41
Definition eval-error.hh:75
Definition eval.hh:182
SourcePath rootPath(CanonPath path)
Definition paths.cc:5
Value vStringSymlink
Definition eval.hh:244
ReplExitStatus(* debugRepl)(ref< EvalState > es, const ValMap &extraEnv)
Definition eval.hh:283
std::optional< Doc > getDoc(Value &v)
Definition eval.cc:552
Value vStringRegular
Definition eval.hh:240
SourcePath coerceToPath(const PosIdx pos, Value &v, NixStringContext &context, std::string_view errorCtx)
Definition eval.cc:2406
void maybePrintStats()
Definition eval.cc:2810
StorePath coerceToStorePath(const PosIdx pos, Value &v, NixStringContext &context, std::string_view errorCtx)
Definition eval.cc:2439
void forceValueDeep(Value &v)
Definition eval.cc:2093
bool evalBool(Env &env, Expr *e)
void allowPath(const Path &path)
Definition eval.cc:338
const ref< Store > buildStore
Definition eval.hh:276
RepairFlag repair
Definition eval.hh:209
Env & baseEnv
Definition eval.hh:597
NixInt forceInt(Value &v, const PosIdx pos, std::string_view errorCtx)
Definition eval.cc:2130
void forceValue(Value &v, const PosIdx pos)
Definition eval-inline.hh:86
Value vEmptyList
Definition eval.hh:216
void mkOutputString(Value &value, const SingleDerivedPath::Built &b, std::optional< StorePath > optStaticOutputPath, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)
Definition eval.cc:961
void allowClosure(const StorePath &storePath)
Definition eval.cc:350
Value * allocValue()
Definition eval-inline.hh:29
void evalFile(const SourcePath &path, Value &v, bool mustBeTrivial=false)
Definition eval.cc:1058
std::string realiseString(Value &str, StorePathSet *storePathsOutMaybe, bool isIFD=true, const PosIdx pos=noPos)
Definition primops.cc:50
const ref< MemorySourceAccessor > corepkgsFS
Definition eval.hh:256
void allowAndSetStorePathString(const StorePath &storePath, Value &v)
Definition eval.cc:360
StringMap realiseContext(const NixStringContext &context, StorePathSet *maybePaths=nullptr, bool isIFD=true)
Definition primops.cc:59
std::pair< SingleDerivedPath, std::string_view > coerceToSingleDerivedPathUnchecked(const PosIdx pos, Value &v, std::string_view errorCtx)
Definition eval.cc:2448
Expr * parseExprFromString(std::string s, const SourcePath &basePath, std::shared_ptr< StaticEnv > &staticEnv)
Definition eval.cc:3002
bool canDebug()
Definition eval.cc:733
const ref< MemorySourceAccessor > internalFS
Definition eval.hh:262
Value vFalse
Definition eval.hh:237
Value vStringUnknown
Definition eval.hh:246
bool eqValues(Value &v1, Value &v2, const PosIdx pos, std::string_view errorCtx)
Definition eval.cc:2713
BackedStringView coerceToString(const PosIdx pos, Value &v, NixStringContext &context, std::string_view errorCtx, bool coerceMore=false, bool copyToStore=true, bool canonicalizePath=true)
Definition eval.cc:2283
void runDebugRepl(const Error *error)
Definition eval.cc:738
bool fullGC()
Definition eval.cc:2796
std::optional< SourcePath > resolveLookupPathPath(const LookupPath::Path &elem, bool initAccessControl=false)
Definition eval.cc:3067
SingleDerivedPath coerceToSingleDerivedPath(const PosIdx pos, Value &v, std::string_view errorCtx)
Definition eval.cc:2478
Value vTrue
Definition eval.hh:230
std::map< const Hash, ref< eval_cache::EvalCache > > evalCaches
Definition eval.hh:322
Path toRealPath(const Path &path, const NixStringContext &context)
Definition eval.cc:425
std::shared_ptr< StaticEnv > staticBaseEnv
Definition eval.hh:602
void mkSingleDerivedPathString(const SingleDerivedPath &p, Value &v)
Definition eval.cc:999
Expr * parseExprFromFile(const SourcePath &path)
Definition eval.cc:2987
std::unordered_map< std::string, Value *, std::hash< std::string >, std::equal_to< std::string >, traceable_allocator< std::pair< const std::string, Value * > > > internalPrimOps
Definition eval.hh:607
const ref< SourceAccessor > rootFS
Definition eval.hh:251
bool isDerivation(Value &v)
Definition eval.cc:2257
Value vNull
Definition eval.hh:223
Value & getBuiltins()
Definition eval.cc:536
SourcePath findFile(const std::string_view path)
Definition eval.cc:3033
Value * getBool(bool b)
Definition eval.cc:904
void printStatistics()
Definition eval.cc:2825
void eval(Expr *e, Value &v)
Definition eval.cc:1117
Value vStringDirectory
Definition eval.hh:242
void autoCallFunction(const Bindings &args, Value &fun, Value &res)
Definition eval.cc:1755
void assertEqValues(Value &v1, Value &v2, const PosIdx pos, std::string_view errorCtx)
Definition eval.cc:2509
void forceFunction(Value &v, const PosIdx pos, std::string_view errorCtx)
Definition eval.cc:2196
const ref< Store > store
Definition eval.hh:271
Value & getBuiltin(const std::string &name)
Definition eval.cc:542
void mkStorePathString(const StorePath &storePath, Value &v)
Definition eval.cc:936
CallDepth addCallDepth(const PosIdx pos)
Definition eval-inline.hh:147
std::vector< std::pair< std::string, Constant > > constantInfos
Definition eval.hh:615
Definition fmt.hh:136
Definition pos-idx.hh:9
Definition pos-table.hh:13
Definition globals.hh:42
Definition path.hh:27
Definition store-api.hh:169
Definition symbol-table.hh:82
Definition symbol-table.hh:58
Definition ref.hh:15
constexpr size_t maxPrimOpArity
Definition eval.hh:30
void(EvalState &state, const PosIdx pos, Value **args, Value &v) PrimOpFun
Definition eval.hh:62
friend class EvalErrorBuilder
Definition lexer.l:5676
uint64_t length
Definition lexer.l:3400
std::string mkSingleDerivedPathStringRaw(const SingleDerivedPath &p)
friend class EvalState
Definition lexer.l:5728
auto i
Definition lexer.l:2745
return s
Definition lexer.l:459
std::function< void(Sink &)> fun
Definition lexer.l:3485
std::ostream & str
Definition lexer.l:1728
Strings res
Definition lexer.l:2566
std::shared_ptr< T > p
Definition lexer.l:1269
ValueType type
Definition lexer.l:7098
const std::string_view & name
Definition lexer.l:1709
T t
Definition lexer.l:154
const T & value
Definition lexer.l:492
std::string mkOutputStringRaw(const SingleDerivedPath::Built &b, std::optional< StorePath > optStaticOutputPath, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)
std::string path
Definition lexer.l:1399
std::vector< Expr * > args
Definition lexer.l:6126
Pos and AbstractPos.
Definition eval.hh:128
const char * doc
Definition eval.hh:139
bool impureOnly
Definition eval.hh:144
ValueType type
Definition eval.hh:134
Definition eval.hh:173
Definition eval.hh:152
Definition eval-settings.hh:13
Definition eval.hh:645
const char * doc
Definition eval.hh:654
Definition nixexpr.hh:82
Definition nixexpr.hh:81
Definition search-path.hh:83
Definition search-path.hh:16
Definition position.hh:20
Definition eval.hh:68
std::vector< std::string > args
Definition eval.hh:78
bool addTrace
Definition eval.hh:98
std::function< PrimOpFun > fun
Definition eval.hh:103
bool internal
Definition eval.hh:113
void check()
Definition eval.cc:466
std::optional< ExperimentalFeature > experimentalFeature
Definition eval.hh:108
std::string name
Definition eval.hh:72
size_t arity
Definition eval.hh:86
const char * doc
Definition eval.hh:91
Definition primops.cc:3242
Definition derived-path.hh:102
Definition source-path.hh:22
Definition nixexpr.hh:481
Definition value.hh:167
Definition fetch-settings.hh:15
std::string Path
Definition types.hh:22
ValueType
Definition value.hh:47
std::shared_ptr< Value * > RootValue
Definition value.hh:509