Currently, importing the root of the prelude in a dhall file slows down the evaluation considerably if one doesn't add a checksum. Could we could run dhall freeze on the whole Prelude, so that most of it would get cached automatically when imported ? This might be a bit annoying when updating the prelude, but would make using the prelude much smoother.
@Nadrieril: Yes, this is possible now that newer versions of the interpreter support stable hashes. I would only add one caveat, which is that we should provide a non-hashed fallback import just in case users aren't on a sufficiently new version of the interpreter. i.e.:
-- ./package.dhall
{ `Bool` = ./Bool/package.dhall sha256:… ? ./Bool/package.dhall
, …
}
That way if the semantic integrity check fails due to them being on an older version it still gracefully degrades to an uncached import
Fix is up here: https://github.com/dhall-lang/dhall-lang/pull/424
Thanks !
Most helpful comment
@Nadrieril: Yes, this is possible now that newer versions of the interpreter support stable hashes. I would only add one caveat, which is that we should provide a non-hashed fallback import just in case users aren't on a sufficiently new version of the interpreter. i.e.:
That way if the semantic integrity check fails due to them being on an older version it still gracefully degrades to an uncached import