diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-22 12:07:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-22 12:23:53 -0400 |
commit | 1e12f0574214cd68b2d201889ff15e79a5cc0076 (patch) | |
tree | e086991e403591205fa73d25129bfac1fc9b1ac8 /Types.hs | |
parent | 7ed6961a0e0ef713c136a9d36f86bc7e31414dc5 (diff) | |
download | keysafe-1e12f0574214cd68b2d201889ff15e79a5cc0076.tar.gz |
return ProofOfWorkRequirement t
This way the requirement can be varied for different operations.
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} {- Copyright 2016 Joey Hess <id@joeyh.name> - @@ -11,6 +11,7 @@ import Types.Cost import qualified Data.ByteString as B import Data.String import Control.DeepSeq +import GHC.Generics (Generic) -- | keysafe stores secret keys. newtype SecretKey = SecretKey B.ByteString @@ -29,7 +30,7 @@ instance Bruteforceable EncryptedSecretKey UnknownPassword where -- | An object in a form suitable to be stored on a keysafe server. newtype StorableObject = StorableObject { fromStorableObject :: B.ByteString } - deriving (Show, Eq, Ord) + deriving (Show, Eq, Ord, Generic) -- | An identifier for a StorableObject newtype StorableObjectIdent = StorableObjectIdent B.ByteString |