Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify name-res collision between primitives and modules #441

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/entities-and-resolution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1187,10 +1187,6 @@ No :t:`name` shall be :t:`shadowed` except for
* :dp:`fls_i0gp1y38lr73`
The :t:`[name]s` of :t:`[variable]s`.

:dp:`fls_saf1meo443fq`
(**this needs to mention about builtin type and module collisions, builtin
attribute and macro collisions**)

:dp:`fls_7pif12rt4s4s`
A :t:`prelude name` shadows other :t:`[prelude name]s` depending on which
:t:`[prelude]s` are included in a :t:`module`. The order of shadowing is as
Expand Down Expand Up @@ -1580,9 +1576,19 @@ follows:

* :dp:`fls_3spnlz9tqnhj`
Otherwise try to find a :t:`candidate direct entity` whose :t:`name`
matches the characters of the leftmost :t:`path segment`. What the leftmost
:t:`path segment` resolves to and its :t:`resolution context` is that
:t:`candidate direct entity`.
matches the characters of the leftmost :t:`path segment` and

* :dp:`fls_Mt6xKI08viYw`
If the :t:`candidate direct entity` is a :t:`module`, and the
:t:`namespace context` is the :t:`type namespace` or the :t:`path` has
more than one :t:`[path segment]s`, and the :t:`identifier` is a :t:`name`
of a :t:`type` of the :t:`language prelude`, then resolution of the
leftmost :t:`path segment` and its :t:`resolution context` is the
:t:`type` of the :t:`language prelude`.

* :dp:`fls_7hK059djudGN`
Otherwise the resolution of the leftmost :t:`path segment` and its
:t:`resolution context` is that :t:`candidate direct entity`.

* :dp:`fls_lxa7uhmdoy9d`
If the leftmost :t:`path segment` starts with a :t:`qualified type`, then
Expand Down