ghc-mtl and ghc-7.2.1

José Romildo Malaquias j.romildo at gmail.com
Wed Sep 7 13:34:53 CEST 2011


Hello.

In order to compile ghc-mtl-1.0.1.0 (the latest released version) with
ghc-7.2.1, I would apply the attached patch, which removes any
references to WarnLogMonad.

ghc-7.2.1 does not have the monad WarnLogMonad anymore.

As I do not know the details of the GHC api, I am not sure if this is
enough to use ghc-mtl with ghc-7.2.1.

I want ghc-mtl in order do build lambdabot.

Any thoughts?

Romildo
-------------- next part --------------
diff -ur ghc-mtl-1.0.1.0.orig/Control/Monad/Ghc.hs ghc-mtl-1.0.1.0/Control/Monad/Ghc.hs
--- ghc-mtl-1.0.1.0.orig/Control/Monad/Ghc.hs	2011-09-07 07:38:20.297885351 -0300
+++ ghc-mtl-1.0.1.0/Control/Monad/Ghc.hs	2011-09-07 08:31:44.132815320 -0300
@@ -12,13 +12,15 @@
 import Control.Monad.CatchIO
 
 import qualified GHC ( runGhc, runGhcT )
-import qualified HscTypes   as GHC
+-- import qualified HscTypes   as GHC
+import qualified GhcMonad   as GHC
 import qualified MonadUtils as GHC
 import qualified Exception  as GHC
 
 newtype Ghc a = Ghc (GHC.Ghc a)
     deriving (Functor, Monad,
-              GHC.WarnLogMonad, GHC.ExceptionMonad, GHC.MonadIO, GHC.GhcMonad)
+              -- GHC.WarnLogMonad, 
+              GHC.ExceptionMonad, GHC.MonadIO, GHC.GhcMonad)
 
 instance MTL.MonadIO Ghc where
     liftIO = GHC.liftIO
@@ -56,9 +58,9 @@
     gblock   = block
     gunblock = unblock
 
-instance MTL.MonadIO m => GHC.WarnLogMonad (GhcT m) where
-    setWarnings = GhcT . GHC.setWarnings
-    getWarnings = GhcT GHC.getWarnings
+-- instance MTL.MonadIO m => GHC.WarnLogMonad (GhcT m) where
+--     setWarnings = GhcT . GHC.setWarnings
+--     getWarnings = GhcT GHC.getWarnings
 
 instance (Functor m, MonadCatchIO m) => GHC.GhcMonad (GhcT m) where
     getSession = GhcT GHC.getSession


More information about the Glasgow-haskell-users mailing list