For the record: this bug was fixed in https://github.com/dhall-lang/dhall-haskell/issues/2467. It is not present in the 1.42.2 release. (The earlier 1.42.0 and 1.42.1 releases also shouldn't have the bug, but the binaries for these releases are missing/wrong, see https://github.com/dhall-lang/dhall-haskell/issues/2514 and https://github.com/dhall-lang/dhall-haskell/issues/2628).