Skip to content

Commit f275508

Browse files
committed
Main: naive fix for #941
1 parent bb6e583 commit f275508

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main/Main.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ main =
157157
printer
158158
| finder opts = findAttrs <=< fromValue @(AttrSet (StdValue (StandardT (StdIdT IO))))
159159
| xml opts = liftIO . Text.putStrLn . stringIgnoreContext . toXML <=< normalForm
160-
| json opts = liftIO . Text.putStrLn . stringIgnoreContext <=< nvalueToJSONNixString
160+
-- 2021-05-27: NOTE: With naive fix of the #941
161+
-- This is overall a naive printer implementation, as options should interact/respect one another.
162+
-- A nice question: "Should respect one another to what degree?": Go full combinator way, for which
163+
-- old Nix CLI is nototrious for (and that would mean to reimplement the old Nix CLI),
164+
-- OR: https://github.com/haskell-nix/hnix/issues/172 and have some sane standart/default behaviour for (most) keys.
165+
| json opts = liftIO . Text.putStrLn . stringIgnoreContext <=< nvalueToJSONNixString <=< normalForm
161166
| strict opts = liftIO . print . prettyNValue <=< normalForm
162167
| values opts = liftIO . print . prettyNValueProv <=< removeEffects
163168
| otherwise = liftIO . print . prettyNValue <=< removeEffects

0 commit comments

Comments
 (0)