msg: {
  actual,
  expected,
}:
if actual == expected
then msg
else
  throw
  (builtins.toJSON {
    inherit actual expected msg;
  })