@@ -104,7 +104,7 @@ withNixContext mpath action = do
104104 opts :: Options <- asks (view hasLens)
105105 let i = nvList $ map
106106 ( nvStr
107- . hackyMakeNixStringWithoutContext
107+ . principledMakeNixStringWithoutContext
108108 . Text. pack
109109 )
110110 (include opts)
@@ -341,12 +341,12 @@ nixPath = fmap nvList $ flip foldNixPath [] $ \p mn ty rest ->
341341 PathEntryPath -> (" path" , nvPath p)
342342 PathEntryURI ->
343343 ( " uri"
344- , nvStr $ hackyMakeNixStringWithoutContext $ Text. pack p
344+ , nvStr $ principledMakeNixStringWithoutContext $ Text. pack p
345345 )
346346
347347 , ( " prefix"
348348 , nvStr
349- $ hackyMakeNixStringWithoutContext $ Text. pack $ fromMaybe " " mn
349+ $ principledMakeNixStringWithoutContext $ Text. pack $ fromMaybe " " mn
350350 )
351351 ]
352352 )
@@ -657,7 +657,7 @@ splitMatches numDropped (((_, (start, len)) : captures) : mts) haystack =
657657 caps = nvList (map f captures)
658658 f (a, (s, _)) = if s < 0 then nvConstant NNull else thunkStr a
659659
660- thunkStr s = nvStr (hackyMakeNixStringWithoutContext (decodeUtf8 s))
660+ thunkStr s = nvStr (principledMakeNixStringWithoutContext (decodeUtf8 s))
661661
662662substring :: forall e t f m . MonadNix e t f m => Int -> Int -> NixString -> Prim m NixString
663663substring start len str = Prim $
@@ -1321,7 +1321,7 @@ fromJSON arg = demand arg $ fromValue >=> fromStringNoContext >=> \encoded ->
13211321 jsonToNValue = \ case
13221322 A. Object m -> flip nvSet M. empty <$> traverse jsonToNValue m
13231323 A. Array l -> nvList <$> traverse jsonToNValue (V. toList l)
1324- A. String s -> pure $ nvStr $ hackyMakeNixStringWithoutContext s
1324+ A. String s -> pure $ nvStr $ principledMakeNixStringWithoutContext s
13251325 A. Number n -> pure $ nvConstant $ case floatingOrInteger n of
13261326 Left r -> NFloat r
13271327 Right i -> NInt i
0 commit comments