@@ -152,15 +152,15 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
152152 | isEvaluate =
153153 if
154154 | isTrace -> evaluateExprWith nixTracingEvalExprLoc expr
155- | Just path <- getReduce -> evaluateExprWith (reduction path . coerce) expr
156- | null getArg || null getArgstr -> evaluateExprWith nixEvalExprLoc expr
155+ | Just path <- getReduce -> evaluateExprWith (reduction path . coerce) expr
156+ | null getArg || null getArgstr -> evaluateExprWith nixEvalExprLoc expr
157157 | otherwise -> processResult printer <=< nixEvalExprLoc (coerce mpath) $ expr
158158 | isXml = fail " Rendering expression trees to XML is not yet implemented"
159159 | isJson = fail " Rendering expression trees to JSON is not implemented"
160- | getVerbosity >= DebugInfo = liftIO . putStr . ppShow . stripAnnotation $ expr
161- | isCache , Just path <- mpath = liftIO . writeCache (replaceExtension path " nixc" ) $ expr
162- | isParseOnly = void . liftIO . Exception. evaluate . force $ expr
163- | otherwise =
160+ | getVerbosity >= DebugInfo = liftIO . putStr . ppShow . stripAnnotation $ expr
161+ | isCache , Just path <- mpath = liftIO . writeCache (replaceExtension path " nixc" ) $ expr
162+ | isParseOnly = void . liftIO . Exception. evaluate . force $ expr
163+ | otherwise =
164164 liftIO .
165165 renderIO
166166 stdout
@@ -179,16 +179,16 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
179179 | otherwise = printer'
180180 where
181181 printer'
182- | isXml = fun (ignoreContext . toXML) normalForm
182+ | isXml = fun (ignoreContext . toXML) normalForm
183183 -- 2021-05-27: NOTE: With naive fix of the #941
184184 -- This is overall a naive printer implementation, as options should interact/respect one another.
185185 -- A nice question: "Should respect one another to what degree?": Go full combinator way, for which
186186 -- old Nix CLI is nototrious for (and that would mean to reimplement the old Nix CLI),
187187 -- OR: https://github.com/haskell-nix/hnix/issues/172 and have some sane standart/default behaviour for (most) keys.
188- | isJson = fun (ignoreContext . mempty . toJSONNixString) normalForm
189- | isStrict = fun (show . prettyNValue) normalForm
190- | isValues = fun (show . prettyNValueProv) removeEffects
191- | otherwise = fun (show . prettyNValue) removeEffects
188+ | isJson = fun (ignoreContext . mempty . toJSONNixString) normalForm
189+ | isStrict = fun (show . prettyNValue) normalForm
190+ | isValues = fun (show . prettyNValueProv) removeEffects
191+ | otherwise = fun (show . prettyNValue) removeEffects
192192 where
193193 fun
194194 :: (b -> Text )
@@ -238,9 +238,9 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
238238 (forceEntry path nv)
239239 (descend &&
240240 deferred
241- (const False )
242- (const True )
243- val
241+ (const False )
242+ (const True )
243+ val
244244 )
245245 )
246246 (pure . pure . Free )
0 commit comments