[commit: ghc] wip/orf-reboot: Get rid of OverloadedRecordFields for now; add ADRF to T4437 (5ea8a42)
git at git.haskell.org
git at git.haskell.org
Tue Jul 14 20:53:29 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/orf-reboot
Link : http://ghc.haskell.org/trac/ghc/changeset/5ea8a4239755076537e381ffa3410c536db37308/ghc
>---------------------------------------------------------------
commit 5ea8a4239755076537e381ffa3410c536db37308
Author: Adam Gundry <adam at well-typed.com>
Date: Tue Jul 14 21:48:07 2015 +0100
Get rid of OverloadedRecordFields for now; add ADRF to T4437
>---------------------------------------------------------------
5ea8a4239755076537e381ffa3410c536db37308
compiler/main/DynFlags.hs | 5 +----
compiler/rename/RnEnv.hs | 2 +-
compiler/typecheck/TcRnTypes.hs | 9 ++++-----
testsuite/tests/driver/T4437.hs | 2 +-
4 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 79d81e1..3ce5605 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -640,7 +640,6 @@ data ExtensionFlag
| Opt_BinaryLiterals
| Opt_NegativeLiterals
| Opt_AllowDuplicateRecordFields
- | Opt_OverloadedRecordFields
| Opt_EmptyCase
| Opt_PatternSynonyms
| Opt_PartialTypeSignatures
@@ -3153,7 +3152,6 @@ xFlags = [
flagSpec' "OverlappingInstances" Opt_OverlappingInstances
setOverlappingInsts,
flagSpec "OverloadedLists" Opt_OverloadedLists,
- flagSpec "OverloadedRecordFields" Opt_OverloadedRecordFields,
flagSpec "OverloadedStrings" Opt_OverloadedStrings,
flagSpec "PackageImports" Opt_PackageImports,
flagSpec "ParallelArrays" Opt_ParallelArrays,
@@ -3278,8 +3276,7 @@ impliedXFlags
, (Opt_DeriveTraversable, turnOn, Opt_DeriveFunctor)
, (Opt_DeriveTraversable, turnOn, Opt_DeriveFoldable)
- -- Overloaded record fields require field disambiguation
- , (Opt_OverloadedRecordFields, turnOn, Opt_AllowDuplicateRecordFields)
+ -- Duplicate record fields require field disambiguation
, (Opt_AllowDuplicateRecordFields, turnOn, Opt_DisambiguateRecordFields)
]
diff --git a/compiler/rename/RnEnv.hs b/compiler/rename/RnEnv.hs
index c938d73..c5a071f 100644
--- a/compiler/rename/RnEnv.hs
+++ b/compiler/rename/RnEnv.hs
@@ -949,7 +949,7 @@ Note [Handling of deprecations]
-}
addUsedSelector :: Name -> RnM ()
--- Record usage of record selectors by OverloadedRecordFields
+-- Record usage of record selectors by AllowDuplicateRecordFields
addUsedSelector n = do { env <- getGblEnv
; updMutVar (tcg_used_selectors env)
(\s -> extendNameSet s n) }
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index e1d71f6..dc14bf8 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -581,11 +581,10 @@ We gather three sorts of usage information
is unnecessary. This info isn't present in Names.
* tcg_used_selectors
- Records the Names of record selectors that are used during
- typechecking (by the OverloadedRecordFields extension). These
- may otherwise be missed from tcg_used_rdrnames as they need
- not actually occur in the source text: they might be needed
- only to satisfy a Has constraint, for example.
+ Records the Names of record selectors that are used
+ by the AllowDuplicateRecordFields extension. These
+ may otherwise be missed from tcg_used_rdrnames as a
+ single RdrName might refer to multiple fields.
************************************************************************
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index 9ff2d7f..aa1d17f 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -33,7 +33,7 @@ expectedGhcOnlyExtensions :: [String]
expectedGhcOnlyExtensions = ["RelaxedLayout",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional",
- "OverloadedRecordFields",
+ "AllowDuplicateRecordFields",
"StaticPointers"]
expectedCabalOnlyExtensions :: [String]
More information about the ghc-commits
mailing list