Skip to content
Snippets Groups Projects
Commit 3ff46ce0 authored by Hassan Al-Awwadi's avatar Hassan Al-Awwadi
Browse files

Refactor FieldOcc and AmbiguousFieldOcc with TTG

The main purpose of this commit is to rip RdrName out of FieldOcc, and
as a side note it has simplified the method we use to deal with ambiguity
somewhat.

To do the first, we make FieldOccs store (LIdP p) instead of always
storing Located RdrName, and moved the readername to the extension
points where necessary.

For the second, well, we just turn an ambiguous RdrName into a unbound
Name through mkUnboundName. Later during disambiguateRecordBinds of the
type checking phase, we will try and do type-directed disambiguation based
on the rdrName field (for now), so this hack works out fine.

See Note [Ambiguous FieldOcc in record updates] for more details.

co-authored by: @Jade <Jade512@proton.me>
                @Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
parent 2293c0b7
No related branches found
No related tags found
No related merge requests found
Pipeline #101344 canceled
Showing
with 213 additions and 210 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment