diff options
| -rw-r--r-- | compiler/hsSyn/HsDecls.hs | 6 | ||||
| -rw-r--r-- | compiler/parser/RdrHsSyn.hs | 6 | ||||
| -rw-r--r-- | compiler/rename/RnSource.hs | 10 | ||||
| m--------- | utils/haddock | 0 |
4 files changed, 3 insertions, 19 deletions
diff --git a/compiler/hsSyn/HsDecls.hs b/compiler/hsSyn/HsDecls.hs index 7e01bc3689..ec46d0e0f2 100644 --- a/compiler/hsSyn/HsDecls.hs +++ b/compiler/hsSyn/HsDecls.hs @@ -1045,12 +1045,6 @@ data ConDecl name , con_doc :: Maybe LHsDocString -- ^ A possible Haddock comment. - - , con_old_rec :: Bool - -- ^ TEMPORARY field; True <=> user has employed now-deprecated syntax for - -- GADT-style record decl C { blah } :: T a b - -- Remove this when we no longer parse this stuff, and hence do not - -- need to report decprecated use } deriving (Typeable) deriving instance (DataId name) => Data (ConDecl name) diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs index b24ba0968a..5aa91ec296 100644 --- a/compiler/parser/RdrHsSyn.hs +++ b/compiler/parser/RdrHsSyn.hs @@ -487,8 +487,7 @@ mkSimpleConDecl :: Located RdrName -> [LHsTyVarBndr RdrName] -> ConDecl RdrName mkSimpleConDecl name qvars cxt details - = ConDecl { con_old_rec = False - , con_names = [name] + = ConDecl { con_names = [name] , con_explicit = Explicit , con_qvars = mkHsQTvs qvars , con_cxt = cxt @@ -523,8 +522,7 @@ mkGadtDecl' names (L ls (HsForAllTy imp _ qvars cxt tau)) _other -> (PrefixCon [], tau) mk_gadt_con names - = ConDecl { con_old_rec = False - , con_names = names + = ConDecl { con_names = names , con_explicit = imp , con_qvars = qvars , con_cxt = cxt diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 4e3359f546..0bd96ec7d6 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -1444,9 +1444,8 @@ rnConDecl :: ConDecl RdrName -> RnM (ConDecl Name, FreeVars) rnConDecl decl@(ConDecl { con_names = names, con_qvars = tvs , con_cxt = lcxt@(L loc cxt), con_details = details , con_res = res_ty, con_doc = mb_doc - , con_old_rec = old_rec, con_explicit = expl }) + , con_explicit = expl }) = do { mapM_ (addLocM checkConName) names - ; when old_rec (addWarn (deprecRecSyntax decl)) ; new_names <- mapM lookupLocatedTopBndrRn names -- For H98 syntax, the tvs are the existential ones @@ -1530,13 +1529,6 @@ rnConDeclDetails con doc (RecCon (L l fields)) ; return (RecCon (L l new_fields), fvs) } ------------------------------------------------- -deprecRecSyntax :: ConDecl RdrName -> SDoc -deprecRecSyntax decl - = vcat [ ptext (sLit "Declaration of") <+> quotes (ppr (con_names decl)) - <+> ptext (sLit "uses deprecated syntax") - , ptext (sLit "Instead, use the form") - , nest 2 (ppr decl) ] -- Pretty printer uses new form - badRecResTy :: SDoc -> SDoc badRecResTy doc = ptext (sLit "Malformed constructor signature") $$ doc diff --git a/utils/haddock b/utils/haddock -Subproject 52c963e0b19783c4ca59cd0e8cfe1366dbfa162 +Subproject 83a9e9d2c7f0debec9d56e8b3b7cc8a8eb73361 |
