diff options
author | joe <joe@jerkface.net> | 2014-05-06 20:58:09 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-05-06 20:58:09 -0400 |
commit | ff220c0a05e47ff796f16b8c96bdc1751139ada4 (patch) | |
tree | 82f0dfdb4a96836d1d5619368ebbd989aac8f0a0 | |
parent | f751f74f213f968e7d56b73e9058a62f9fa87d3f (diff) |
Fixed wheezy build
-rw-r--r-- | KeyRing.hs | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -134,7 +134,7 @@ import System.FilePath ( takeDirectory ) | |||
134 | import System.IO (hPutStrLn,withFile,IOMode(..), Handle, hPutStr) | 134 | import System.IO (hPutStrLn,withFile,IOMode(..), Handle, hPutStr) |
135 | import Data.IORef | 135 | import Data.IORef |
136 | import System.Posix.IO ( fdToHandle ) | 136 | import System.Posix.IO ( fdToHandle ) |
137 | import qualified Data.Traversable as Traversable ( mapM ) | 137 | import qualified Data.Traversable as Traversable |
138 | import Data.Traversable ( sequenceA ) | 138 | import Data.Traversable ( sequenceA ) |
139 | #if ! MIN_VERSION_base(4,6,0) | 139 | #if ! MIN_VERSION_base(4,6,0) |
140 | import GHC.Exts ( Down(..) ) | 140 | import GHC.Exts ( Down(..) ) |
@@ -1238,7 +1238,11 @@ buildKeyDB ctx grip0 keyring = do | |||
1238 | 1238 | ||
1239 | -- KeyRings (todo: KikiCondition reporting?) | 1239 | -- KeyRings (todo: KikiCondition reporting?) |
1240 | (spilled,mwk,grip,accs,keys,unspilled) <- do | 1240 | (spilled,mwk,grip,accs,keys,unspilled) <- do |
1241 | #if MIN_VERSION_containers(0,5,0) | ||
1241 | ringPackets <- Map.traverseWithKey readp ringMap | 1242 | ringPackets <- Map.traverseWithKey readp ringMap |
1243 | #else | ||
1244 | ringPackets <- Traversable.traverse (uncurry readp) $ Map.mapWithKey (,) ringMap | ||
1245 | #endif | ||
1242 | let _ = ringPackets :: Map.Map InputFile (StreamInfo, Message) | 1246 | let _ = ringPackets :: Map.Map InputFile (StreamInfo, Message) |
1243 | 1247 | ||
1244 | let grip = grip0 `mplus` (fingerprint <$> fstkey) | 1248 | let grip = grip0 `mplus` (fingerprint <$> fstkey) |
@@ -1284,7 +1288,11 @@ buildKeyDB ctx grip0 keyring = do | |||
1284 | r <- performManipulations doDecrypt rt1 mwk manip | 1288 | r <- performManipulations doDecrypt rt1 mwk manip |
1285 | try r $ \(rt2,report) -> do | 1289 | try r $ \(rt2,report) -> do |
1286 | return $ KikiSuccess (report,(info,flattenKeys acc $ rtKeyDB rt2)) | 1290 | return $ KikiSuccess (report,(info,flattenKeys acc $ rtKeyDB rt2)) |
1291 | #if MIN_VERSION_containers(0,5,0) | ||
1287 | in fmap sequenceA $ Map.traverseWithKey trans spilled | 1292 | in fmap sequenceA $ Map.traverseWithKey trans spilled |
1293 | #else | ||
1294 | in fmap sequenceA $ Traversable.traverse (uncurry trans) $ Map.mapWithKey (,) spilled | ||
1295 | #endif | ||
1288 | try transformed0 $ \transformed -> do | 1296 | try transformed0 $ \transformed -> do |
1289 | let db_rings = Map.foldlWithKey' mergeIt Map.empty transformed | 1297 | let db_rings = Map.foldlWithKey' mergeIt Map.empty transformed |
1290 | where | 1298 | where |
@@ -2404,7 +2412,8 @@ readPacketsFromFile ctx fname = do | |||
2404 | case decodeOrFail input of | 2412 | case decodeOrFail input of |
2405 | Right (_,_,msg ) -> msg | 2413 | Right (_,_,msg ) -> msg |
2406 | Left (_,_,_) -> | 2414 | Left (_,_,_) -> |
2407 | --trace (fname++": read fail") $ | 2415 | -- FIXME |
2416 | -- trace (fname++": read fail") $ | ||
2408 | Message [] | 2417 | Message [] |
2409 | #else | 2418 | #else |
2410 | return $ decode input | 2419 | return $ decode input |