From b9823c93a3d7dde33fbf905360b5c626026ff6c7 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 26 Jun 2021 18:42:08 -0700 Subject: [PATCH] Clarify shadowing of prelude names. --- src/names/scopes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/names/scopes.md b/src/names/scopes.md index 25c8a53f2..617c1aa4e 100644 --- a/src/names/scopes.md +++ b/src/names/scopes.md @@ -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: