Closed
Description
I can't make sense of the error but I don't think I'm doing anything wrong, so here's a minimal repro:
(I'm using headers for authenticating to a private repo, but I'm using a public resource here for ease of demonstration)
remote.dhall
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v12.0.0/Prelude/Bool/not using ./Headers.dhall
Headers.dhall
toMap
{ User-Agent = "my-dhall-app"
, Accept = "application/vnd.github.4.raw"
}
$ dhall --file remote.dhall
λ(b : Bool) → b == False
$ dhall freeze --inplace remote.dhall
$ cat remote.dhall
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v12.0.0/Prelude/Bool/not using ./Headers.dhall sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
$ dhall --file remote.dhall
dhall:
Error: Expression doesn't match annotation
- List …
+ … → …
1│ ./Headers.dhall sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4 : List { mapKey : Text, mapValue : Text }
Note that if I inline the headers expression, it works. So it's something to do with externalising Headers.dhall
.