summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-04-12 03:28:43 -0400
committerjoe <joe@jerkface.net>2014-04-12 03:28:43 -0400
commitd87448aa5d47153a92c8bc626b345ae154e2797f (patch)
treeef965087a1749f808582e6e7e74caca47ff9eb68
parent0b77a1b4b6c779236934f453f08246e166656722 (diff)
always use a single pass.
-rw-r--r--kiki.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/kiki.hs b/kiki.hs
index fb6321c..5fcef99 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1553,7 +1553,10 @@ doExport doDecrypt (db,use_db) (fname,subspec,ms,cmd) =
1553 ExitFailure num -> noop $ fname ++ ": failed external (code="++show num++")" 1553 ExitFailure num -> noop $ fname ++ ": failed external (code="++show num++")"
1554 ExitSuccess -> do 1554 ExitSuccess -> do
1555 warn $ fname ++ ": generated" 1555 warn $ fname ++ ": generated"
1556 return (Nothing,use_db) -- need another pass 1556 -- return (Nothing,use_db) -- need another pass
1557 -- flip (maybe $ return (Nothing,use_db)) db $ \db -> do
1558 db' <- doImport doDecrypt db (fname,subspec,ms,cmd)
1559 return (db', use_db)
1557 export = do 1560 export = do
1558 let [kk] = ms 1561 let [kk] = ms
1559 Just (KeyData key _ _ subkeys) = Map.lookup kk use_db 1562 Just (KeyData key _ _ subkeys) = Map.lookup kk use_db
@@ -2448,7 +2451,7 @@ main = do
2448 2451
2449 use_db <- foldM (doBTCImport decrypt) use_db pbtcs 2452 use_db <- foldM (doBTCImport decrypt) use_db pbtcs
2450 2453
2451 (ret_db,_) <- foldM (doExport decrypt) (Just use_db,use_db) (map snd exports) 2454 (Just -> ret_db,_) <- foldM (doExport decrypt) (use_db,use_db) (map snd exports)
2452 2455
2453 use_db <- 2456 use_db <-
2454 flip (maybe $ return use_db) 2457 flip (maybe $ return use_db)