Propagating type errors when using import fallbacks


#1

I’m using import fallbacks to provide a way to override values

let value = (./optional-file.dhall) ? defaultValue
in …

This works well, but it has a significant drawback: type errors in optional-file.dhall (if present) are silently ignored, since defaultValue is used instead. Basically, I’d want evaluation to fail if optional-file.dhall is present and contains errors, and defaultValue to be used only when optional-file.dhall is absent. I’m not aware of any alternative way or workaround that would solve this particular issue.


#2

I’m not sure I got this right, but I think this has been fixed in the recent version 21: https://github.com/dhall-lang/dhall-lang/pull/1181


#3

Ha, I missed it. Thanks!