X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnSource.lhs;h=f3822823cd3b9147fa33a85861fd0bd0150c5872;hb=508a505e9853984bfdaa3ad855ae3fcbc6d31787;hp=6ee9f8a7dd9c7afebb534daf299726289b0a153c;hpb=f9d8c8e0ab44b24d06b654d98543e8b39d4ebeca;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnSource.lhs b/ghc/compiler/rename/RnSource.lhs index 6ee9f8a..f382282 100644 --- a/ghc/compiler/rename/RnSource.lhs +++ b/ghc/compiler/rename/RnSource.lhs @@ -41,7 +41,7 @@ import NameEnv import Outputable import SrcLoc ( Located(..), unLoc, getLoc, noLoc ) import CmdLineOpts ( DynFlag(..) ) - -- Warn of unused for-all'd tyvars +import DriverPhases ( isHsBoot ) import Maybes ( seqMaybe ) import Maybe ( catMaybes, isNothing ) \end{code} @@ -619,14 +619,7 @@ rnTyClDecl (ClassDecl {tcdCtxt = context, tcdLName = cname, \begin{code} rnConDecls :: Name -> [LConDecl RdrName] -> RnM [LConDecl Name] rnConDecls tycon condecls - = -- Check that there's at least one condecl, - -- or else we're reading an interface file, or -fglasgow-exts - (if null condecls then - doptM Opt_GlasgowExts `thenM` \ glaExts -> - checkErr glaExts (emptyConDeclsErr tycon) - else returnM () - ) `thenM_` - mappM (wrapLocM rnConDecl) condecls + = mappM (wrapLocM rnConDecl) condecls rnConDecl :: ConDecl RdrName -> RnM (ConDecl Name) rnConDecl (ConDecl name tvs cxt details) @@ -683,10 +676,6 @@ checkConName name = checkErr (isRdrDataCon name) (badDataCon name) badDataCon name = hsep [ptext SLIT("Illegal data constructor name"), quotes (ppr name)] - -emptyConDeclsErr tycon - = sep [quotes (ppr tycon) <+> ptext SLIT("has no constructors"), - nest 4 (ptext SLIT("(-fglasgow-exts permits this)"))] \end{code}