From: simonpj@microsoft.com Date: Thu, 28 Jun 2007 08:29:49 +0000 (+0000) Subject: Add flags for record extensions; still not working properly though X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ed2f8e2a6ec160a0e57028fbfd4a9c5a3a5e083d Add flags for record extensions; still not working properly though --- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 7f3c491..428d8d4 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -178,7 +178,7 @@ data DynFlag | Opt_TypeFamilies | Opt_OverloadedStrings | Opt_DisambiguateRecordFields - | Opt_RecordDotDot + | Opt_RecordWildCards | Opt_RecordPuns | Opt_GADTs | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec @@ -1100,6 +1100,10 @@ xFlags = [ ( "ImplicitPrelude", Opt_ImplicitPrelude ), -- On by default + ( "RecordWildCards", Opt_RecordWildCards ), + ( "RecordPuns", Opt_RecordPuns ), + ( "DisambiguateRecordFields", Opt_DisambiguateRecordFields ), + ( "OverloadedStrings", Opt_OverloadedStrings ), ( "GADTs", Opt_GADTs ), ( "TypeFamilies", Opt_TypeFamilies ), diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index b061834..2cc232c 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -689,7 +689,7 @@ rnHsRecFields str mb_con rn_thing mk_rhs (HsRecFields fields dd) ; case dd of Nothing -> return (HsRecFields fields1 dd, fvs1) Just n -> ASSERT( n == length fields ) do - { dd_flag <- doptM Opt_RecordDotDot + { dd_flag <- doptM Opt_RecordWildCards ; checkErr dd_flag (needFlagDotDot str) ; let fld_names1 = map (unLoc . hsRecFieldId) fields1