summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-11 17:47:05 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-11 17:47:05 -0400
commit4ff25ca59ecb0ccba00b60dd542e8bc7e99b1206 (patch)
tree708ab1d3631f16033f21247dd2b6a1d7950ab5d1
parent803cc369438f7850e6245ee2e4253dc480546bf4 (diff)
downloadkeysafe-4ff25ca59ecb0ccba00b60dd542e8bc7e99b1206.tar.gz
show store successes/failures
-rw-r--r--Storage.hs1
-rw-r--r--keysafe.hs2
2 files changed, 2 insertions, 1 deletions
diff --git a/Storage.hs b/Storage.hs
index 3e5707f..6b23c33 100644
--- a/Storage.hs
+++ b/Storage.hs
@@ -13,5 +13,6 @@ data Storage = Storage
}
data StoreResult = StoreSuccess | StoreFailure String
+ deriving (Show)
data RetrieveResult = RetrieveSuccess Shard | RetrieveFailure String
diff --git a/keysafe.hs b/keysafe.hs
index 962f10f..112ac54 100644
--- a/keysafe.hs
+++ b/keysafe.hs
@@ -25,7 +25,7 @@ storedemo = do
let esk = encrypt kek secretkey
let sis = shardIdents tunables name keyid
shards <- genShards esk tunables
- mapM_ (uncurry (storeShard localFiles)) (zip (getIdents sis) shards)
+ print =<< mapM (uncurry (storeShard localFiles)) (zip (getIdents sis) shards)
where
password = Password "foo"
name = Name "bar"