Skip to content

Commit

Permalink
Clarify shadowing of prelude names.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 7, 2022
1 parent 8ad842b commit 6d2115f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/names/scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ References to a label refer to the closest definition.
## Prelude scopes

[Preludes] bring entities into scope of every module.
The entities are not members of the module, but are implicitly queried during [name resolution].
The prelude names may be shadowed by declarations in a module.

The preludes are layered such that one shadows another if they contain entities of the same name.
The order that preludes may shadow other preludes is the following where earlier entries may shadow later ones:

Expand Down

0 comments on commit 6d2115f

Please sign in to comment.