Commit ed2f8e2a authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Add flags for record extensions; still not working properly though

parent 1a0c116d
...@@ -178,7 +178,7 @@ data DynFlag ...@@ -178,7 +178,7 @@ data DynFlag
| Opt_TypeFamilies | Opt_TypeFamilies
| Opt_OverloadedStrings | Opt_OverloadedStrings
| Opt_DisambiguateRecordFields | Opt_DisambiguateRecordFields
| Opt_RecordDotDot | Opt_RecordWildCards
| Opt_RecordPuns | Opt_RecordPuns
| Opt_GADTs | Opt_GADTs
| Opt_RelaxedPolyRec -- -X=RelaxedPolyRec | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec
...@@ -1100,6 +1100,10 @@ xFlags = [ ...@@ -1100,6 +1100,10 @@ xFlags = [
( "ImplicitPrelude", Opt_ImplicitPrelude ), -- On by default ( "ImplicitPrelude", Opt_ImplicitPrelude ), -- On by default
( "RecordWildCards", Opt_RecordWildCards ),
( "RecordPuns", Opt_RecordPuns ),
( "DisambiguateRecordFields", Opt_DisambiguateRecordFields ),
( "OverloadedStrings", Opt_OverloadedStrings ), ( "OverloadedStrings", Opt_OverloadedStrings ),
( "GADTs", Opt_GADTs ), ( "GADTs", Opt_GADTs ),
( "TypeFamilies", Opt_TypeFamilies ), ( "TypeFamilies", Opt_TypeFamilies ),
......
...@@ -689,7 +689,7 @@ rnHsRecFields str mb_con rn_thing mk_rhs (HsRecFields fields dd) ...@@ -689,7 +689,7 @@ rnHsRecFields str mb_con rn_thing mk_rhs (HsRecFields fields dd)
; case dd of ; case dd of
Nothing -> return (HsRecFields fields1 dd, fvs1) Nothing -> return (HsRecFields fields1 dd, fvs1)
Just n -> ASSERT( n == length fields ) do Just n -> ASSERT( n == length fields ) do
{ dd_flag <- doptM Opt_RecordDotDot { dd_flag <- doptM Opt_RecordWildCards
; checkErr dd_flag (needFlagDotDot str) ; checkErr dd_flag (needFlagDotDot str)
; let fld_names1 = map (unLoc . hsRecFieldId) fields1 ; let fld_names1 = map (unLoc . hsRecFieldId) fields1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment