X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Frename%2FRnSource.lhs;h=6984a4b66aa04928859267b291caa2e9128d204c;hb=dafabe653da4e6cf5aea6b5281c8f77de8d0964a;hp=2911ce01200d574501a1ea15c35dea11be024b97;hpb=7854ec4b11e117f8514553890851d14a66690fbb;p=ghc-hetmet.git diff --git a/compiler/rename/RnSource.lhs b/compiler/rename/RnSource.lhs index 2911ce0..6984a4b 100644 --- a/compiler/rename/RnSource.lhs +++ b/compiler/rename/RnSource.lhs @@ -412,8 +412,8 @@ patchCImportSpec packageId spec patchCCallTarget :: PackageId -> CCallTarget -> CCallTarget patchCCallTarget packageId callTarget = case callTarget of - PackageTarget label Nothing - -> PackageTarget label (Just packageId) + StaticTarget label Nothing + -> StaticTarget label (Just packageId) _ -> callTarget @@ -726,9 +726,10 @@ rnTyClDecl tydecl@TyData {tcdND = new_or_data, tcdCtxt = context, else emptyFVs)) } where - h98_style = case condecls of - L _ (ConDecl { con_res = ResTyH98 }) : _ -> True - _ -> False + h98_style = case condecls of -- Note [Stupid theta] + L _ (ConDecl { con_res = ResTyGADT {} }) : _ -> False + _ -> True + data_doc = text "In the data type declaration for" <+> quotes (ppr tycon) rn_derivs Nothing = return (Nothing, emptyFVs) @@ -824,6 +825,15 @@ badGadtStupidTheta _ ptext (sLit "(You can put a context on each contructor, though.)")] \end{code} +Note [Stupid theta] +~~~~~~~~~~~~~~~~~~~ +Trac #3850 complains about a regression wrt 6.10 for + data Show a => T a +There is no reason not to allow the stupid theta if there are no data +constructors. It's still stupid, but does no harm, and I don't want +to cause programs to break unnecessarily (notably HList). So if there +are no data constructors we allow h98_style = True + %********************************************************* %* *