summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
authorAdam Gundry <adam@well-typed.com>2014-04-22 02:12:03 -0500
committerAustin Seipp <austin@well-typed.com>2014-04-22 06:16:50 -0500
commitfe77cbf15dd44bb72943357d65bd8adf9f4deee5 (patch)
tree04724d7fcf4b2696d2342c5b31c1f59ebaa92cb1 /compiler/main/DynFlags.hs
parent33e585d6eacae19e83862a05b650373b536095fa (diff)
downloadhaskell-wip/orf.tar.gz
ghc: implement OverloadedRecordFieldswip/orf
This fully implements the new ORF extension, developed during the Google Summer of Code 2013, and as described on the wiki: https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields This also updates the Haddock submodule. Reviewed-by: Simon Peyton Jones <simonpj@microsoft.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 72ebb38fc2..ec0b540012 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -581,6 +581,7 @@ data ExtensionFlag
| Opt_LambdaCase
| Opt_MultiWayIf
| Opt_NegativeLiterals
+ | Opt_OverloadedRecordFields
| Opt_EmptyCase
| Opt_PatternSynonyms
deriving (Eq, Enum, Show)
@@ -2877,6 +2878,7 @@ xFlags = [
( "IncoherentInstances", Opt_IncoherentInstances, nop ),
( "PackageImports", Opt_PackageImports, nop ),
( "NegativeLiterals", Opt_NegativeLiterals, nop ),
+ ( "OverloadedRecordFields", Opt_OverloadedRecordFields, nop ),
( "EmptyCase", Opt_EmptyCase, nop ),
( "PatternSynonyms", Opt_PatternSynonyms, nop )
]
@@ -2960,6 +2962,13 @@ impliedFlags
, (Opt_ImplicitParams, turnOn, Opt_FlexibleInstances)
, (Opt_JavaScriptFFI, turnOn, Opt_InterruptibleFFI)
+
+ -- Overloaded record fields require field disambiguation (well
+ -- duh), and flexible contexts and constraint kinds (for the Has
+ -- class encoding and desugaring of r { f :: t } syntax).
+ , (Opt_OverloadedRecordFields, turnOn, Opt_DisambiguateRecordFields)
+ , (Opt_OverloadedRecordFields, turnOn, Opt_FlexibleContexts)
+ , (Opt_OverloadedRecordFields, turnOn, Opt_ConstraintKinds)
]
optLevelFlags :: [([Int], GeneralFlag)]