more reorg, spiffed up state monad

This commit is contained in:
Joey Hess 2010-10-14 03:18:11 -04:00
parent 0b55bd05de
commit 6f3572e47f
11 changed files with 259 additions and 249 deletions

View file

@ -6,8 +6,9 @@ import System.IO
import System.Environment
import Control.Exception
import CmdLine
import AbstractTypes
import Annex
import Types
import Commands
import qualified Annex
main = do
args <- getArgs
@ -30,7 +31,8 @@ tryRun state mode errnum oknum [] = do
then error $ (show errnum) ++ " failed ; " ++ show (oknum) ++ " ok"
else return ()
tryRun state mode errnum oknum (f:fs) = do
result <- try (runAnnexState state (dispatch mode f))::IO (Either SomeException ((), AnnexState))
result <- try
(Annex.run state (dispatch mode f))::IO (Either SomeException ((), AnnexState))
case (result) of
Left err -> do
showErr err