diff options
author | joe <joe@jerkface.net> | 2014-04-16 01:46:12 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-16 01:46:12 -0400 |
commit | 8703df51a7f8c0dc9b71ea4fc0dc985776dace5a (patch) | |
tree | 91df7bd238c8bd5d653854fa408170375ba6ca46 | |
parent | 1a67a86310aaab9eb010de58b61557924707dcd5 (diff) |
runKeyRing returns a KeyRingRuntime object rather than accepting an op
parameter.
-rw-r--r-- | KeyRing.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -904,8 +904,8 @@ writeRingKeys krd db wk secring pubring = do | |||
904 | return $ KikiSuccess report | 904 | return $ KikiSuccess report |
905 | 905 | ||
906 | 906 | ||
907 | runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) | 907 | runKeyRing :: KeyRingData -> IO (KikiResult KeyRingRuntime) |
908 | runKeyRing keyring op = do | 908 | runKeyRing keyring = do |
909 | homedir <- getHomeDir (homeSpec keyring) | 909 | homedir <- getHomeDir (homeSpec keyring) |
910 | let try' :: KikiCondition a -> (a -> IO (KikiResult b)) -> IO (KikiResult b) | 910 | let try' :: KikiCondition a -> (a -> IO (KikiResult b)) -> IO (KikiResult b) |
911 | -- FIXME: try' should probably accept a list of KikiReportActions. | 911 | -- FIXME: try' should probably accept a list of KikiReportActions. |
@@ -949,7 +949,7 @@ runKeyRing keyring op = do | |||
949 | bresult <- buildKeyDB secring pubring grip0 keyring | 949 | bresult <- buildKeyDB secring pubring grip0 keyring |
950 | 950 | ||
951 | try' bresult $ \((db,grip,wk),report_imports) -> do | 951 | try' bresult $ \((db,grip,wk),report_imports) -> do |
952 | a <- return $ op KeyRingRuntime | 952 | let a = KeyRingRuntime |
953 | { rtPubring = pubring | 953 | { rtPubring = pubring |
954 | , rtSecring = secring | 954 | , rtSecring = secring |
955 | , rtGrip = grip | 955 | , rtGrip = grip |