Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
value.hh File Reference
#include <cassert>
#include <span>
#include "eval-gc.hh"
#include "symbol-table.hh"
#include "value/context.hh"
#include "source-path.hh"
#include "print-options.hh"
#include "checked-arithmetic.hh"
#include <nlohmann/json_fwd.hpp>

Go to the source code of this file.

Classes

class  nix::ExternalValueBase
 
class  nix::ListBuilder
 
struct  nix::Value
 
struct  nix::Value::StringWithContext
 
struct  nix::Value::Path
 
struct  nix::Value::ClosureThunk
 
struct  nix::Value::FunctionApplicationThunk
 
struct  nix::Value::Lambda
 

Typedefs

using nix::NixInt = checked::Checked<int64_t>
 
using nix::NixFloat = double
 
typedef std::vector< Value *, traceable_allocator< Value * > > nix::ValueVector
 
typedef std::unordered_map< Symbol, Value *, std::hash< Symbol >, std::equal_to< Symbol >, traceable_allocator< std::pair< const Symbol, Value * > > > nix::ValueMap
 
typedef std::map< Symbol, ValueVector, std::less< Symbol >, traceable_allocator< std::pair< const Symbol, ValueVector > > > nix::ValueVectorMap
 
typedef std::shared_ptr< Value * > nix::RootValue
 

Enumerations

enum  InternalType {
  tUninitialized = 0 , tInt = 1 , tBool , tString ,
  tPath , tNull , tAttrs , tList1 ,
  tList2 , tListN , tThunk , tApp ,
  tLambda , tPrimOp , tPrimOpApp , tExternal ,
  tFloat
}
 
enum  nix::ValueType {
  nThunk , nInt , nFloat , nBool ,
  nString , nPath , nNull , nAttrs ,
  nList , nFunction , nExternal
}
 

Functions

std::ostream & nix::operator<< (std::ostream &str, const ExternalValueBase &v)
 
RootValue nix::allocRootValue (Value *v)
 
void nix::forceNoNullByte (std::string_view s, std::function< Pos()> pos)
 

Typedef Documentation

◆ RootValue

typedef std::shared_ptr<Value *> nix::RootValue

A value allocated in traceable memory.

Enumeration Type Documentation

◆ ValueType

This type abstracts over all actual value types in the language, grouping together implementation details like tList*, different function types, and types in non-normal form (so thunks and co.)