I’m looking at the Prelude. Prelude.List.all
which refers to List/fold
, but fold
exists in another file, so how is it imported without an import statement?
List/fold
is a built-in and built-ins can be used without having to import them: https://docs.dhall-lang.org/references/Built-in-types.html#function-list-fold
The slash in that case is not related to import, it’s just part of the allowed character that can be used in an identifier.
Also note that built-ins are also exported by the Prelude, but they are not implemented in dhall, they just return the built-in value, for example: Prelude.List.fold is https://prelude.dhall-lang.org/List/fold.dhall
1 Like
Ah. I guess I missed that part. Many of these functions were used in terms of fold like map
.