summaryrefslogtreecommitdiffhomepage
path: root/Types/Cost.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-16 16:59:25 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-16 16:59:25 -0400
commitc2eba63d11c748aeebdd3a4a3a5b015ac5e2f2c9 (patch)
treef75ee5e067fee2b36fdc75ad470fd9cc2e11268e /Types/Cost.hs
parent9473fee1bb0f9f549de41eec9f7b7d141f2ebfd3 (diff)
downloadkeysafe-c2eba63d11c748aeebdd3a4a3a5b015ac5e2f2c9.tar.gz
add cost estimates
Diffstat (limited to 'Types/Cost.hs')
-rw-r--r--Types/Cost.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Types/Cost.hs b/Types/Cost.hs
index 290fa25..2f181a2 100644
--- a/Types/Cost.hs
+++ b/Types/Cost.hs
@@ -12,13 +12,13 @@ import Utility.HumanTime
-- | An estimated cost to perform an operation.
data Cost op
= CPUCost Seconds -- ^ using 1 CPU core
- deriving (Show)
+ deriving (Show, Eq, Ord)
unknownCost :: Cost op
unknownCost = CPUCost (Seconds 0)
newtype Seconds = Seconds Integer
- deriving (Num)
+ deriving (Num, Eq, Ord)
instance Show Seconds where
show (Seconds n) = fromDuration (Duration n)