[Fencommits] fenfire-hs: updates to match the Control.Exception API of GHC 6.10

Tuukka Hastrup Tuukka.Hastrup at iki.fi
Mon Oct 5 17:28:00 EEST 2009


Mon Oct  5 16:57:46 EEST 2009  Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
  * updates to match the Control.Exception API of GHC 6.10
  Ignore-this: 965b98033a38e07e24885aa52aa060b9

    M ./Fenfire/Irc2Notetaker.hs -1 +1
    M ./Fenfire/Irc2RDF.hs -1 +1
    M ./Fenfire/Main.hs -3 +4
    M ./Fenfire/VobTest.fhs +1
    M ./Fenfire/Vobs.fhs -1 +1

Mon Oct  5 16:57:46 EEST 2009  Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
  * updates to match the Control.Exception API of GHC 6.10
  Ignore-this: 965b98033a38e07e24885aa52aa060b9
diff -rN -u old-fenfire-hs/Fenfire/Irc2Notetaker.hs new-fenfire-hs/Fenfire/Irc2Notetaker.hs
--- old-fenfire-hs/Fenfire/Irc2Notetaker.hs	2009-10-05 17:28:00.868169285 +0300
+++ new-fenfire-hs/Fenfire/Irc2Notetaker.hs	2009-10-05 17:28:00.868169285 +0300
@@ -54,7 +54,7 @@
      if (valid cstr (-1) nullPtr && all isUnicode s') -- force any exceptions
          then return s'  -- it really was utf-8
          else return s ) -- it really wasn't utf-8
-    (\_e -> return s)                 -- if any, keep the local encoding
+    (\(_e::Control.Exception.SomeException) -> return s) -- keep the encoding
 
 -- from gutf8.c used in g_utf8_validate
 isUnicode c' = let c = ord c' in
diff -rN -u old-fenfire-hs/Fenfire/Irc2RDF.hs new-fenfire-hs/Fenfire/Irc2RDF.hs
--- old-fenfire-hs/Fenfire/Irc2RDF.hs	2009-10-05 17:28:00.868169285 +0300
+++ new-fenfire-hs/Fenfire/Irc2RDF.hs	2009-10-05 17:28:00.868169285 +0300
@@ -62,7 +62,7 @@
      if (valid cstr (-1) nullPtr && all isUnicode s') -- force any exceptions
          then return s'  -- it really was utf-8
          else return s ) -- it really wasn't utf-8
-    (\_e -> return s)                 -- if any, keep the local encoding
+    (\(_e::Control.Exception.SomeException) -> return s) -- keep the encoding
 
 -- from gutf8.c used in g_utf8_validate
 isUnicode c' = let c = ord c' in
diff -rN -u old-fenfire-hs/Fenfire/Main.hs new-fenfire-hs/Fenfire/Main.hs
--- old-fenfire-hs/Fenfire/Main.hs	2009-10-05 17:28:00.858160748 +0300
+++ new-fenfire-hs/Fenfire/Main.hs	2009-10-05 17:28:00.868169285 +0300
@@ -29,7 +29,7 @@
 
 import Paths_fenfire (getDataFileName)
 
-import Control.Exception
+import Control.Exception hiding (Handler)
 import Control.Monad
 import Control.Monad.State
 
@@ -434,7 +434,7 @@
             item <- actionCreateToolItem action
             toolbarInsert toolbar (castToToolItem item) (-1)
 
-handleException :: Control.Exception.Exception -> IO ()
+handleException :: SomeException -> IO ()
 handleException e = do
     dialog <- makeMessageDialog "Exception in event" (show e)
     dialogRun dialog
@@ -505,7 +505,8 @@
     let ?pw = window in mdo
     logo <- getDataFileName "data-files/icon16.png"
     Control.Exception.catch (windowSetIconFromFile window logo)
-          (\e -> putStr ("Opening "++logo++" failed: ") >> print e)
+          (\e -> do putStr ("Opening "++logo++" failed: ")
+                    print (e::SomeException))
     windowSetTitle window "Fenfire"
     windowSetDefaultSize window 800 550
 
diff -rN -u old-fenfire-hs/Fenfire/Vobs.fhs new-fenfire-hs/Fenfire/Vobs.fhs
--- old-fenfire-hs/Fenfire/Vobs.fhs	2009-10-05 17:28:00.858160748 +0300
+++ new-fenfire-hs/Fenfire/Vobs.fhs	2009-10-05 17:28:00.868169285 +0300
@@ -357,7 +357,7 @@
 
 vobCanvas :: Ord b => IORef a -> View a b -> Handler Event a -> 
                       Handler c a -> (a -> a -> IO ()) -> 
-                      (Control.Exception.Exception -> IO ()) -> 
+                      (Control.Exception.SomeException -> IO ()) ->
                       Color -> TimeDiff ->
                       IO (DrawingArea, Bool -> IO (), c -> IO Bool)
 vobCanvas stateRef view eventHandler actionHandler stateChanged 
diff -rN -u old-fenfire-hs/Fenfire/VobTest.fhs new-fenfire-hs/Fenfire/VobTest.fhs
--- old-fenfire-hs/Fenfire/VobTest.fhs	2009-10-05 17:28:00.858160748 +0300
+++ new-fenfire-hs/Fenfire/VobTest.fhs	2009-10-05 17:28:00.868169285 +0300
@@ -31,6 +31,7 @@
 import Graphics.UI.Gtk hiding (Point, Size, Layout, Color, get, fill)
 import System.Environment (getArgs)
 
+import Control.Exception hiding (Handler)
 
 type Info = (String, Double, Double)
 type Data = [(String,[Info])]




More information about the Fencommits mailing list