From 0b39e041a86e883b60096fe08f202798cc69f4eb Mon Sep 17 00:00:00 2001 From: pho Date: Tue, 20 Jan 2009 09:22:28 +0900 Subject: [PATCH] No need to define our own methods for Exception Abortion darcs-hash:20090120002228-62b54-d14e039d9e73f9ee0c3661e2c18f804bf721da3b.gz --- Network/HTTP/Lucu/Abortion.hs | 4 +--- Network/HTTP/Lucu/Resource/Tree.hs | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Network/HTTP/Lucu/Abortion.hs b/Network/HTTP/Lucu/Abortion.hs index 52e7e23..33f22ab 100644 --- a/Network/HTTP/Lucu/Abortion.hs +++ b/Network/HTTP/Lucu/Abortion.hs @@ -38,9 +38,7 @@ data Abortion = Abortion { , aboMessage :: !(Maybe String) } deriving (Show, Typeable) -instance Exception Abortion where - toException = SomeException - fromException (SomeException e) = cast e +instance Exception Abortion -- |Computation of @'abort' status headers msg@ aborts the -- 'Network.HTTP.Lucu.Resource.Resource' monad with given status, diff --git a/Network/HTTP/Lucu/Resource/Tree.hs b/Network/HTTP/Lucu/Resource/Tree.hs index 40a4150..de19e04 100644 --- a/Network/HTTP/Lucu/Resource/Tree.hs +++ b/Network/HTTP/Lucu/Resource/Tree.hs @@ -32,7 +32,6 @@ import Network.HTTP.Lucu.Interaction import Network.HTTP.Lucu.Utils import Network.URI hiding (path) import System.IO -import System.IO.Error hiding (catch) import Prelude hiding (catch) @@ -261,9 +260,3 @@ runResource def itr $ hPutStrLn stderr $ show abo flip runRes itr $ driftTo Done - - formatIOE :: IOError -> String - formatIOE ioE = if isUserError ioE then - ioeGetErrorString ioE - else - show ioE -- 2.40.0