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
Pipeline #101344 canceled
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Showing
- compiler/GHC/Hs/Binds.hs 1 addition, 2 deletionscompiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Expr.hs 28 additions, 12 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs 1 addition, 1 deletioncompiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/Instances.hs 0 additions, 6 deletionscompiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs 0 additions, 11 deletionscompiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs 1 addition, 1 deletioncompiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs 56 additions, 58 deletionscompiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs 4 additions, 4 deletionscompiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Docs.hs 1 addition, 1 deletioncompiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Expr.hs 29 additions, 30 deletionscompiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Quote.hs 14 additions, 10 deletionscompiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs 2 additions, 1 deletioncompiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Ext/Ast.hs 40 additions, 42 deletionscompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser/PostProcess.hs 2 additions, 2 deletionscompiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs 1 addition, 1 deletioncompiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs 4 additions, 4 deletionscompiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs 3 additions, 4 deletionscompiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Fixity.hs 1 addition, 1 deletioncompiler/GHC/Rename/Fixity.hs
- compiler/GHC/Rename/HsType.hs 5 additions, 6 deletionscompiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Pat.hs 20 additions, 13 deletionscompiler/GHC/Rename/Pat.hs
Loading
Please register or sign in to comment