From: Max Bolingbroke Date: Thu, 31 Jul 2008 01:23:51 +0000 (+0000) Subject: Make IOEnv a MonadUnique X-Git-Tag: 2008-09-12~280 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=0e332efa316f51451e9dd1809eaeba873a4076e4;hp=ae987852c75d1f77b11370f299e265c68c16196f;p=ghc-hetmet.git Make IOEnv a MonadUnique --- diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index c861511..1f02518 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -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}