diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-30 18:05:54 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-30 18:05:54 +0000 |
commit | 47df476daa568af9f645b6a039c028e602a7e44b (patch) | |
tree | dcdef8f161a8f0ecd522cedfaf1d1c8d6e431ca3 /src/nix-instantiate/nix-instantiate.cc | |
parent | c9170be2bd2e735b37db7e7b4ccaca86835cb5c5 (diff) |
* More operators / primops.
Diffstat (limited to 'src/nix-instantiate/nix-instantiate.cc')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 0c4dc06e8..86bb1841b 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -71,9 +71,13 @@ void processExpr(EvalState & state, const Strings & attrPaths, bool parseOnly, bool strict, const ATermMap & autoArgs, bool evalOnly, bool xmlOutput, Expr e) { - Value v; - state.strictEval(e, v); - std::cout << v << std::endl; + if (parseOnly) + std::cout << format("%1%\n") % canonicaliseExpr(e); + else { + Value v; + state.strictEval(e, v); + std::cout << v << std::endl; + } #if 0 for (Strings::const_iterator i = attrPaths.begin(); i != attrPaths.end(); ++i) { |