Skip to content

Commit 7b56e23

Browse files
committed
Nix.Builtins: replaceStrings: upd error message
1 parent bb1f9b0 commit 7b56e23

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Nix/Builtins.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -943,10 +943,7 @@ replaceStrings tfrom tto ts = fromValue (Deeper tfrom) >>= \(nsFrom :: [NixStrin
943943
fromValue (Deeper tto) >>= \(nsTo :: [NixString]) ->
944944
fromValue ts >>= \(ns :: NixString) -> do
945945
when (length nsFrom /= length nsTo)
946-
$ throwError
947-
$ ErrorCall
948-
$ "'from' and 'to' arguments to 'replaceStrings'"
949-
<> " have different lengths"
946+
$ throwError $ ErrorCall "builtins.replaceStrings: Arguments `from`&`to` are lists `from` what replace `to` what, so the number of their inhabitanting elements must always match."
950947
let
951948

952949
from = fmap stringIgnoreContext nsFrom

0 commit comments

Comments
 (0)