aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/print-ambiguous.hh
blob: b615d1e5ad015ccb0979c9db767632f0c26ea5da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
///@file

#include "value.hh"

namespace nix {

/**
 * Print a value in the deprecated format used by `nix-instantiate --eval` and
 * `nix-env` (for manifests).
 *
 * This output can't be changed because it's part of the `nix-instantiate` API,
 * but it produces ambiguous output; unevaluated thunks and lambdas (and a few
 * other types) are printed as Nix path syntax like `<CODE>`.
 *
 * See: https://github.com/NixOS/nix/issues/9730
 */
void printAmbiguous(
    Value &v,
    const SymbolTable &symbols,
    std::ostream &str,
    std::set<const void *> *seen,
    int depth);

}