You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when (length fromKeys /=length toVals) $ throwError $ErrorCall"builtins.replaceStrings: Arguments `from`&`to` construct a key-value map, so the number of their elements must always match."
948
948
949
949
let
950
950
-- 2021-02-18: NOTE: if there is no match - the process does not changes the context, but walks the string.
951
-
-- So it should be more effective to have context as the first argument.
951
+
-- So it should be more effective to pass the context as the first argument.
952
+
-- And moreover, the `passOneCharNgo` passively passes the context, to context can be removed from it and inherited directly.
952
953
go remaining processed ctx =
953
954
case maybePrefixMatch remaining of
954
955
Nothing->
955
-
--Chip away chars until match
956
-
stepOneCharNgo remaining processed ctx
956
+
--Pass the chars until match
957
+
passOneCharNgo remaining processed ctx
957
958
Just (matched, replacementNS, tailNS) ->
958
959
-- Allowing match on "" is a bug-quirk of Nix,
959
960
-- when "" is checked - it always matches. And so - when it checks - it always insers a replacement, and then process simply passesthrough the char that was under match.
0 commit comments