summaryrefslogtreecommitdiffhomepage
path: root/ExpensiveHash.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r--ExpensiveHash.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs
index 9cf647f..ed7e859 100644
--- a/ExpensiveHash.hs
+++ b/ExpensiveHash.hs
@@ -28,6 +28,9 @@ import Data.Monoid
data ExpensiveHash = ExpensiveHash (Cost CreationOp) T.Text
deriving (Show)
+instance HasCreationCost ExpensiveHash where
+ getCreationCost (ExpensiveHash c _) = c
+
data Salt t = Salt t
expensiveHash :: Encodable t => ExpensiveHashTunable -> Salt t -> B.ByteString -> ExpensiveHash