@@ -392,7 +392,7 @@ unsafeGetAttrPos
392392 -> m (NValue t f m )
393393unsafeGetAttrPos x y = demand x $ \ x' -> demand y $ \ y' -> case (x', y') of
394394 (NVStr ns, NVSet _ apos) ->
395- case M. lookup (hackyStringIgnoreContext ns) apos of
395+ case M. lookup (principledStringIgnoreContext ns) apos of
396396 Nothing -> pure $ nvConstant NNull
397397 Just delta -> toValue delta
398398 (x, y) ->
@@ -866,7 +866,7 @@ instance Comonad f => Eq (WValue t f m) where
866866 WValue (NVConstant (NFloat x)) == WValue (NVConstant (NFloat y)) = x == y
867867 WValue (NVPath x ) == WValue (NVPath y ) = x == y
868868 WValue (NVStr x) == WValue (NVStr y) =
869- hackyStringIgnoreContext x == hackyStringIgnoreContext y
869+ principledStringIgnoreContext x == principledStringIgnoreContext y
870870 _ == _ = False
871871
872872instance Comonad f => Ord (WValue t f m ) where
@@ -878,7 +878,7 @@ instance Comonad f => Ord (WValue t f m) where
878878 WValue (NVConstant (NFloat x)) <= WValue (NVConstant (NFloat y)) = x <= y
879879 WValue (NVPath x ) <= WValue (NVPath y ) = x <= y
880880 WValue (NVStr x) <= WValue (NVStr y) =
881- hackyStringIgnoreContext x <= hackyStringIgnoreContext y
881+ principledStringIgnoreContext x <= principledStringIgnoreContext y
882882 _ <= _ = False
883883
884884genericClosure
@@ -1019,7 +1019,7 @@ toFile name s = do
10191019 -- runtime references of the resulting file.
10201020 -- See prim_toFile in nix/src/libexpr/primops.cc
10211021 mres <- toFile_ (Text. unpack name')
1022- (Text. unpack $ hackyStringIgnoreContext s')
1022+ (Text. unpack $ principledStringIgnoreContext s')
10231023 let t = Text. pack $ unStorePath mres
10241024 sc = StringContext t DirectPath
10251025 toValue $ principledMakeNixStringWithSingletonContext t sc
@@ -1030,7 +1030,7 @@ toPath = fromValue @Path >=> toValue @Path
10301030pathExists_ :: MonadNix e t f m => NValue t f m -> m (NValue t f m )
10311031pathExists_ path = demand path $ \ case
10321032 NVPath p -> toValue =<< pathExists p
1033- NVStr ns -> toValue =<< pathExists (Text. unpack (hackyStringIgnoreContext ns))
1033+ NVStr ns -> toValue =<< pathExists (Text. unpack (principledStringIgnoreContext ns))
10341034 v ->
10351035 throwError
10361036 $ ErrorCall
@@ -1248,7 +1248,7 @@ placeHolder = fromValue >=> fromStringNoContext >=> \t -> do
12481248absolutePathFromValue :: MonadNix e t f m => NValue t f m -> m FilePath
12491249absolutePathFromValue = \ case
12501250 NVStr ns -> do
1251- let path = Text. unpack $ hackyStringIgnoreContext ns
1251+ let path = Text. unpack $ principledStringIgnoreContext ns
12521252 unless (isAbsolute path)
12531253 $ throwError
12541254 $ ErrorCall
@@ -1272,7 +1272,7 @@ findFile_
12721272findFile_ aset filePath = demand aset $ \ aset' -> demand filePath $ \ filePath' ->
12731273 case (aset', filePath') of
12741274 (NVList x, NVStr ns) -> do
1275- mres <- findPath @ t @ f @ m x (Text. unpack (hackyStringIgnoreContext ns))
1275+ mres <- findPath @ t @ f @ m x (Text. unpack (principledStringIgnoreContext ns))
12761276 pure $ nvPath mres
12771277 (NVList _, y) ->
12781278 throwError $ ErrorCall $ " expected a string, got " ++ show y
@@ -1393,7 +1393,7 @@ exec_ xs = do
13931393 -- TODO Still need to do something with the context here
13941394 -- See prim_exec in nix/src/libexpr/primops.cc
13951395 -- Requires the implementation of EvalState::realiseContext
1396- exec (map (Text. unpack . hackyStringIgnoreContext ) xs)
1396+ exec (map (Text. unpack . principledStringIgnoreContext ) xs)
13971397
13981398fetchurl
13991399 :: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m )
0 commit comments