X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnMonad.lhs;h=1f02518cd69f96af0c25c8355440a7e2f2afc0b0;hb=befdf6ad2c5ede7a30f2aa31eeb506562928fbe0;hp=7f1a7fe5d34d42ebc430e60bdf0701a00cddbacc;hpb=fce61e356063836debcc579e336e99a65d61284e;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index 7f1a7fe..1f02518 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -40,10 +40,10 @@ import StaticFlags import FastString import Panic import Util - +import Exception + import System.IO import Data.IORef -import Control.Exception import Control.Monad \end{code} @@ -103,7 +103,7 @@ initTc hsc_env hsc_src keep_rn_syntax mod do_this tcg_rn_decls = maybe_rn_syntax emptyRnGroup, tcg_binds = emptyLHsBinds, - tcg_deprecs = NoDeprecs, + tcg_warns = NoWarnings, tcg_insts = [], tcg_fam_insts= [], tcg_rules = [], @@ -324,6 +324,10 @@ newSysLocalIds :: FastString -> [TcType] -> TcRnIf gbl lcl [TcId] newSysLocalIds fs tys = do { us <- newUniqueSupply ; return (zipWith (mkSysLocal fs) (uniqsFromSupply us) tys) } + +instance MonadUnique (IOEnv (Env gbl lcl)) where + getUniqueM = newUnique + getUniqueSupplyM = newUniqueSupply \end{code} @@ -537,7 +541,11 @@ discardWarnings thing_inside \begin{code} +#if __GLASGOW_HASKELL__ < 609 try_m :: TcRn r -> TcRn (Either Exception r) +#else +try_m :: TcRn r -> TcRn (Either ErrorCall r) +#endif -- Does try_m, with a debug-trace on failure try_m thing = do { mb_r <- tryM thing ;