From: pho Date: Sun, 18 Jan 2009 03:34:20 +0000 (+0900) Subject: Build error fix X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=a4b849476ee3a204ea91dee8f3fd235b0b33a10a;p=Rakka.git Build error fix darcs-hash:20090118033420-62b54-5b8eec72fc3fdab30d8c6cf8ef7372738351260b.gz --- diff --git a/Rakka/Authorization.hs b/Rakka/Authorization.hs index a7bcbea..ccc4b36 100644 --- a/Rakka/Authorization.hs +++ b/Rakka/Authorization.hs @@ -10,6 +10,7 @@ module Rakka.Authorization import qualified Codec.Binary.UTF8.String as UTF8 import Control.Concurrent.STM +import Control.Monad import Control.Monad.Trans import qualified Data.ByteString as B import Data.Map (Map) diff --git a/Rakka/Storage/Repos.hs b/Rakka/Storage/Repos.hs index 8f49cbe..8664d24 100644 --- a/Rakka/Storage/Repos.hs +++ b/Rakka/Storage/Repos.hs @@ -11,7 +11,6 @@ module Rakka.Storage.Repos where import Codec.Binary.UTF8.String -import Control.Exception import Control.Monad import Data.List import qualified Data.Map as M @@ -25,7 +24,6 @@ import Rakka.Page import Rakka.SystemConfig import Rakka.Utils import Rakka.W3CDateTime -import Subversion.Error import Subversion.FileSystem import Subversion.FileSystem.DirEntry import Subversion.FileSystem.Revision @@ -216,8 +214,7 @@ loadPageInRepository repos name rev putPageIntoRepository :: Repository -> Maybe String -> Page -> IO StatusCode putPageIntoRepository repos userID page - = filterSvnError $ - do let name = pageName page + = do let name = pageName page author = fromMaybe "[Rakka]" userID case pageUpdateInfo page of Just ui @@ -357,8 +354,7 @@ createParentDirectories path deletePageFromRepository :: Repository -> Maybe String -> PageName -> IO StatusCode deletePageFromRepository repos userID name - = filterSvnError $ - do let pagePath = mkPagePath name + = do let pagePath = mkPagePath name attachmentPath = mkAttachmentDirPath name fs <- getRepositoryFS repos rev <- getYoungestRev fs @@ -436,8 +432,7 @@ putAttachmentIntoRepository :: Attachment a => -> a -> IO StatusCode putAttachmentIntoRepository repos userID oldRev pName aName attachment - = filterSvnError $ - do let author = fromMaybe "[Rakka]" userID + = do let author = fromMaybe "[Rakka]" userID path = mkAttachmentPath pName aName fs <- getRepositoryFS repos oldRev' <- case oldRev of @@ -456,14 +451,3 @@ putAttachmentIntoRepository repos userID oldRev pName aName attachment case ret of Left _ -> return Conflict Right _ -> return NoContent - - -filterSvnError :: IO a -> IO a -filterSvnError f = catchDyn f rethrow - where - rethrow :: SvnError -> IO a - rethrow err - = let code = svnErrCode err - msg = svnErrMsg err - in - fail $ "SvnError: " ++ show code ++ ": " ++ msg diff --git a/Rakka/W3CDateTime.hs b/Rakka/W3CDateTime.hs index 595d228..e0c1c1b 100644 --- a/Rakka/W3CDateTime.hs +++ b/Rakka/W3CDateTime.hs @@ -29,7 +29,7 @@ formatW3CDateTime zonedTime day (todHour timeOfDay) (todMin timeOfDay) - (secInt :: Int)) + (secInt :: Int) ++ (if secFrac == 0 then "" diff --git a/Rakka/Wiki/Parser.hs b/Rakka/Wiki/Parser.hs index 33b68bd..19170b1 100644 --- a/Rakka/Wiki/Parser.hs +++ b/Rakka/Wiki/Parser.hs @@ -4,6 +4,7 @@ module Rakka.Wiki.Parser ) where +import Control.Monad import Data.Maybe import Network.URI hiding (fragment) import Rakka.Wiki