Skip to content

Commit d9db2f8

Browse files
committed
Exec: m clean-up
1 parent 82c256e commit d9db2f8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Nix/Exec.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ callFunc fun arg =
303303
NVBuiltin name f ->
304304
do
305305
span <- currentPos
306-
withFrame Info ((Calling @m @(NValue t f m)) name span) (f arg)
306+
withFrame Info ((Calling @m @(NValue t f m)) name span) $ f arg -- Is this cool?
307307
(NVSet m _) | Just f <- M.lookup "__functor" m ->
308308
(`callFunc` arg) =<< (`callFunc` fun') =<< demand f
309309
_x -> throwError $ ErrorCall $ "Attempt to call non-function: " <> show _x
@@ -319,11 +319,11 @@ execUnaryOp scope span op arg = do
319319
case arg of
320320
NVConstant c ->
321321
case (op, c) of
322-
(NNeg, NInt i ) -> unaryOp $ NInt (-i)
323-
(NNeg, NFloat f) -> unaryOp $ NFloat (-f)
324-
(NNot, NBool b ) -> unaryOp $ NBool (not b)
322+
(NNeg, NInt i) -> unaryOp $ NInt ( - i)
323+
(NNeg, NFloat f) -> unaryOp $ NFloat ( - f)
324+
(NNot, NBool b) -> unaryOp $ NBool (not b)
325325
_seq ->
326-
throwError $ ErrorCall $ "unsupported argument type for unary operator " <> show _seq
326+
throwError $ ErrorCall $ "unsupported argument type for unary operator " <> show _seq
327327
_x ->
328328
throwError $ ErrorCall $ "argument to unary operator must evaluate to an atomic type: " <> show _x
329329
where
@@ -338,7 +338,6 @@ execBinaryOp
338338
-> NValue t f m
339339
-> m (NValue t f m)
340340
-> m (NValue t f m)
341-
342341
execBinaryOp scope span op lval rarg =
343342
case op of
344343
NEq -> helperEq id

0 commit comments

Comments
 (0)