[Haskell-cafe] ghc-mtl and ghc-7.2.1

2011-09-07 Thread José Romildo Malaquias
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
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.hs2011-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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ghc-mtl and ghc-7.2.1

2011-09-07 Thread Daniel Gorín
Hi Romildo, you can try the darcs version of ghc-mtl [1], I don't know if that 
will be enough to build lambdabot, though

Best,
Daniel

[1] http://darcsden.com/jcpetruzza/ghc-mtl

On Sep 7, 2011, at 1:34 PM, José Romildo Malaquias wrote:

 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
 ghc-mtl-1.0.1.0-gcc721.patch___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe