File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
154154 | evaluate =
155155 if
156156 | tracing -> evaluateExprWithEvaluator nixTracingEvalExprLoc expr
157- | Just path <- reduce -> evaluateExprWithEvaluator (reduction (coerce path) . coerce) expr
157+ | Just path <- reduce -> evaluateExprWithEvaluator (reduction path . coerce) expr
158158 | null arg || null argstr -> evaluateExprWithEvaluator nixEvalExprLoc expr
159159 | otherwise -> processResult printer <=< nixEvalExprLoc (coerce mpath) $ expr
160160 | xml = fail " Rendering expression trees to XML is not yet implemented"
Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ nixEval
5858 :: (MonadNix e t f m , Has e Options , Functor g )
5959 => Transform g (m a )
6060 -> Alg g (m a )
61- -> Maybe FilePath
61+ -> Maybe Path
6262 -> Fix g
6363 -> m a
64- nixEval transform alg mpath = withNixContext (coerce mpath) . adi transform alg
64+ nixEval transform alg mpath = withNixContext mpath . adi transform alg
6565
6666-- | Evaluate a nix expression in the default context
6767nixEvalExpr
6868 :: (MonadNix e t f m , Has e Options )
69- => Maybe FilePath
69+ => Maybe Path
7070 -> NExpr
7171 -> m (NValue t f m )
7272nixEvalExpr = nixEval id Eval. eval
@@ -75,7 +75,7 @@ nixEvalExpr = nixEval id Eval.eval
7575nixEvalExprLoc
7676 :: forall e t f m
7777 . (MonadNix e t f m , Has e Options )
78- => Maybe FilePath
78+ => Maybe Path
7979 -> NExprLoc
8080 -> m (NValue t f m )
8181nixEvalExprLoc =
@@ -90,15 +90,15 @@ nixEvalExprLoc =
9090-- context.
9191nixTracingEvalExprLoc
9292 :: (MonadNix e t f m , Has e Options , MonadIO m , Alternative m )
93- => Maybe FilePath
93+ => Maybe Path
9494 -> NExprLoc
9595 -> m (NValue t f m )
96- nixTracingEvalExprLoc mpath = withNixContext (coerce mpath) . evalExprLoc
96+ nixTracingEvalExprLoc mpath = withNixContext mpath . evalExprLoc
9797
9898evaluateExpression
9999 :: (MonadNix e t f m , Has e Options )
100- => Maybe FilePath
101- -> (Maybe FilePath -> NExprLoc -> m (NValue t f m ))
100+ => Maybe Path
101+ -> (Maybe Path -> NExprLoc -> m (NValue t f m ))
102102 -> (NValue t f m -> m a )
103103 -> NExprLoc
104104 -> m a
Original file line number Diff line number Diff line change @@ -1115,10 +1115,10 @@ toFileNix name s =
11151115 (stringIgnoreContext s')
11161116
11171117 let
1118- t = coerce $ toText @ FilePath $ coerce mres
1119- sc = StringContext t DirectPath
1118+ storepath = coerce $ toText @ FilePath $ coerce mres
1119+ sc = StringContext storepath DirectPath
11201120
1121- toValue $ mkNixStringWithSingletonContext t sc
1121+ toValue $ mkNixStringWithSingletonContext storepath sc
11221122
11231123toPathNix :: MonadNix e t f m => NValue t f m -> m (NValue t f m )
11241124toPathNix = toValue @ Path <=< fromValue @ Path
You can’t perform that action at this time.
0 commit comments