about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index deb66fd69f16..bcaa51dd6318 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -37,7 +37,7 @@ std::pair<string, string> decodeContext(const string & s)
 
 
 /* Load and evaluate an expression from path specified by the
-   argument. */ 
+   argument. */
 static void prim_import(EvalState & state, Value * * args, Value & v)
 {
     PathSet context;
@@ -56,7 +56,7 @@ static void prim_import(EvalState & state, Value * * args, Value & v)
                 unsigned long long downloadSize, narSize;
                 queryMissing(*store, singleton<PathSet>(ctx),
                     willBuild, willSubstitute, unknown, downloadSize, narSize);
-                  
+
                 /* !!! If using a substitute, we only need to fetch
                    the selected output of this derivation. */
                 store->buildPaths(singleton<PathSet>(ctx));
@@ -197,7 +197,7 @@ static void prim_genericClosure(EvalState & state, Value * * args, Value & v)
         if (doneKeys.find(*key->value) != doneKeys.end()) continue;
         doneKeys.insert(*key->value);
         res.push_back(*e);
-        
+
         /* Call the `operator' function with `e' as argument. */
         Value call;
         mkApp(call, *op->value, *e);
@@ -247,7 +247,7 @@ static void prim_addErrorContext(EvalState & state, Value * * args, Value & v)
 }
 
 
-/* Try evaluating the argument. Success => {success=true; value=something;}, 
+/* Try evaluating the argument. Success => {success=true; value=something;},
  * else => {success=false; value=false;} */
 static void prim_tryEval(EvalState & state, Value * * args, Value & v)
 {
@@ -634,7 +634,7 @@ static void prim_toFile(EvalState & state, Value * * args, Value & v)
             throw EvalError(format("in `toFile': the file `%1%' cannot refer to derivation outputs") % name);
         refs.insert(path);
     }
-    
+
     Path storePath = settings.readOnlyMode
         ? computeStorePathForText(name, contents, refs)
         : store->addTextToStore(name, contents, refs, state.repair);
@@ -651,7 +651,7 @@ struct FilterFromExpr : PathFilter
 {
     EvalState & state;
     Value & filter;
-    
+
     FilterFromExpr(EvalState & state, Value & filter)
         : state(state), filter(filter)
     {
@@ -672,12 +672,12 @@ struct FilterFromExpr : PathFilter
         state.callFunction(filter, arg1, fun2);
 
         Value arg2;
-        mkString(arg2, 
+        mkString(arg2,
             S_ISREG(st.st_mode) ? "regular" :
             S_ISDIR(st.st_mode) ? "directory" :
             S_ISLNK(st.st_mode) ? "symlink" :
             "unknown" /* not supported, will fail! */);
-        
+
         Value res;
         state.callFunction(fun2, arg2, res);
 
@@ -801,12 +801,12 @@ static void prim_listToAttrs(EvalState & state, Value * * args, Value & v)
     for (unsigned int i = 0; i < args[0]->list.length; ++i) {
         Value & v2(*args[0]->list.elems[i]);
         state.forceAttrs(v2);
-        
+
         Bindings::iterator j = v2.attrs->find(state.sName);
         if (j == v2.attrs->end())
             throw TypeError("`name' attribute missing in a call to `listToAttrs'");
         string name = state.forceStringNoCtx(*j->value);
-        
+
         Bindings::iterator j2 = v2.attrs->find(state.symbols.create("value"));
         if (j2 == v2.attrs->end())
             throw TypeError("`value' attribute missing in a call to `listToAttrs'");
@@ -830,7 +830,7 @@ static void prim_intersectAttrs(EvalState & state, Value * * args, Value & v)
 {
     state.forceAttrs(*args[0]);
     state.forceAttrs(*args[1]);
-        
+
     state.mkAttrs(v, std::min(args[0]->attrs->size(), args[1]->attrs->size()));
 
     foreach (Bindings::iterator, i, *args[0]->attrs) {
@@ -933,7 +933,7 @@ static void prim_map(EvalState & state, Value * * args, Value & v)
     state.mkList(v, args[1]->list.length);
 
     for (unsigned int n = 0; n < v.list.length; ++n)
-        mkApp(*(v.list.elems[n] = state.allocValue()), 
+        mkApp(*(v.list.elems[n] = state.allocValue()),
             *args[0], *args[1]->list.elems[n]);
 }
 
@@ -1105,7 +1105,7 @@ static void prim_unsafeDiscardOutputDependency(EvalState & state, Value * * args
         if (p.at(0) == '=') p = "~" + string(p, 1);
         context2.insert(p);
     }
-    
+
     mkString(v, s, context2);
 }
 
@@ -1167,10 +1167,10 @@ void EvalState::createBaseEnv()
 
     mkBool(v, true);
     addConstant("true", v);
-    
+
     mkBool(v, false);
     addConstant("false", v);
-    
+
     v.type = tNull;
     addConstant("null", v);