[Pkg-haskell-commits] darcs: ftphs: debian/patches/ghc-7.6-compatibility: Update to work with Control.Exception.{try, catch} in GHC 7.6 (closes: #706080).

Iain Lane iain at orangesquash.org.uk
Sat May 25 21:38:45 UTC 2013


Sat May 25 21:26:53 UTC 2013  Iain Lane <iain at orangesquash.org.uk>
  * debian/patches/ghc-7.6-compatibility: Update to work with Control.Exception.{try,catch} in GHC 7.6 (closes: #706080).
  Ignore-this: 1d1adeeabe947746aaa35d48cf099c50

    M ./changelog +5
    A ./patches/
    A ./patches/ghc-7.6-compatibility
    A ./patches/series

Sat May 25 21:26:53 UTC 2013  Iain Lane <iain at orangesquash.org.uk>
  * debian/patches/ghc-7.6-compatibility: Update to work with Control.Exception.{try,catch} in GHC 7.6 (closes: #706080).
  Ignore-this: 1d1adeeabe947746aaa35d48cf099c50
diff -rN -u old-ftphs//changelog new-ftphs//changelog
--- old-ftphs//changelog	2013-05-25 21:38:45.062190916 +0000
+++ new-ftphs//changelog	2013-05-25 21:38:45.078237362 +0000
@@ -1,11 +1,16 @@
 ftphs (1.0.8-2) UNRELEASED; urgency=low
 
+  [ Joachim Breitner ]
   * Depend on haskell-devscripts 0.8.13 to ensure this package is built
     against experimental
   * Add watchfile
   * Enable compat level 9
   * Bump standards version to 3.9.4
 
+  [ Iain Lane ]
+  * debian/patches/ghc-7.6-compatibility: Update to work with
+    Control.Exception.{try,catch} in GHC 7.6 (closes: #706080).
+
  -- Joachim Breitner <nomeata at debian.org>  Fri, 04 Jan 2013 15:19:49 +0100
 
 ftphs (1.0.8-1) unstable; urgency=low
diff -rN -u old-ftphs//patches/ghc-7.6-compatibility new-ftphs//patches/ghc-7.6-compatibility
--- old-ftphs//patches/ghc-7.6-compatibility	1970-01-01 00:00:00.000000000 +0000
+++ new-ftphs//patches/ghc-7.6-compatibility	2013-05-25 21:38:45.078237362 +0000
@@ -0,0 +1,40 @@
+Description: Port to work with catch from Control.Exception as found in GHC 7.6
+Author: Iain Lane <iain.lane at canonical.com>
+Forwarded: yes
+
+--- ftphs-1.0.8.orig/src/Network/FTP/Server.hs
++++ ftphs-1.0.8/src/Network/FTP/Server.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE ScopedTypeVariables #-}
+ {- arch-tag: FTP server support
+ Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+ 
+@@ -98,7 +99,7 @@ import Text.Printf
+ import Data.Char
+ import Data.IORef
+ import Data.List
+-import Control.Exception(finally)
++import Control.Exception(finally, try, catch, IOException)
+ import System.IO
+ 
+ data DataType = ASCII | Binary
+@@ -168,8 +169,8 @@ trapIOError :: FTPServer -> IO a -> (a -
+ trapIOError h testAction remainingAction =
+     do result <- try testAction
+        case result of
+-         Left err -> do sendReply h 550 (show err)
+-                        return True
++         Left (err :: IOException) -> do sendReply h 550 (show err)
++                                         return True
+          Right result -> remainingAction result
+ 
+ forceLogin :: CommandHandler -> CommandHandler
+@@ -214,7 +215,7 @@ commandLoop h@(FTPServer fh _ _) =
+                                     ("Closing due to error: " ++ (show e))
+                             hClose fh
+                             return False
+-        in do continue <- (flip catch) errorhandler 
++        in do continue <- (flip catch) (\(e :: IOException) -> errorhandler e)
+                (do x <- parseCommand fh
+                    case x of
+                      Left err -> do sendReply h 500 $
diff -rN -u old-ftphs//patches/series new-ftphs//patches/series
--- old-ftphs//patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-ftphs//patches/series	2013-05-25 21:38:45.082301098 +0000
@@ -0,0 +1 @@
+ghc-7.6-compatibility





More information about the Pkg-haskell-commits mailing list