X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcBinds.lhs;h=18c61917c2bbbf0f332972667e8dce41f778e96a;hb=4a343629ebe5be2c5b27e84c031e38abd81122fa;hp=4fd3ae0c890ce46167cff4c9cccd1b21a77a21ff;hpb=903831d5047482725f55581504d35feb1288e545;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index 4fd3ae0..18c6191 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -478,7 +478,8 @@ checkStrictBinds top_lvl rec_group mbind mono_tys infos -- This should be a checkTc, not a warnTc, but as of GHC 6.11 -- the versions of alex and happy available have non-conforming -- templates, so the GHC build fails if it's an error: - ; warnTc (not bang_pat) + ; warnUnlifted <- doptM Opt_WarnLazyUnliftedBindings + ; warnTc (warnUnlifted && not bang_pat) (unliftedMustBeBang mbind) ; mapM_ check_sig infos ; return True } @@ -495,6 +496,7 @@ unliftedMustBeBang :: LHsBindsLR Var Var -> SDoc unliftedMustBeBang mbind = hang (text "Bindings containing unlifted types must use an outermost bang pattern:") 4 (pprLHsBinds mbind) + $$ text "*** This will be an error in GHC 6.14! Fix your code now!" strictBindErr :: String -> Bool -> LHsBindsLR Var Var -> SDoc strictBindErr flavour unlifted mbind