Skip to content

Commit c140222

Browse files
committed
Pretty: m clean-up
1 parent e6a4b88 commit c140222

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Nix/Pretty.hs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ exprFNixDoc = \case
297297
"./" -> "./."
298298
"../" -> "../."
299299
".." -> "../."
300-
_txt ->
300+
path ->
301301
bool
302-
("./" <> _txt)
303-
_txt
304-
(any (`isPrefixOf` coerce _txt) ["/", "~/", "./", "../"])
302+
("./" <> path)
303+
path
304+
(any (`isPrefixOf` coerce path) ["/", "~/", "./", "../"])
305305
NSym name -> simpleExpr $ prettyVarName name
306306
NLet binds body ->
307307
leastPrecedence $
@@ -418,10 +418,9 @@ prettyNThunk t =
418418

419419
-- | This function is used only by the testing code.
420420
printNix :: forall t f m . MonadDataContext f m => NValue t f m -> Text
421-
printNix = iterNValueByDiscardWith thk phi
421+
printNix =
422+
iterNValueByDiscardWith thunkStubText phi
422423
where
423-
thk = thunkStubText
424-
425424
phi :: NValue' t f m Text -> Text
426425
phi (NVConstant' a ) = atomText a
427426
phi (NVStr' ns) = "\"" <> escapeString (ignoreContext ns) <> "\""

0 commit comments

Comments
 (0)