Skip to content

Commit

Permalink
Remove Quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Apr 8, 2021
1 parent 7c176db commit 79d6b7d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cardano-cli/src/Cardano/CLI/Slot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ data TimeInterpreter m = forall eras. TimeInterpreter
, blockchainStartTime :: StartTime
}

newtype Quantity (unit :: Symbol) a = Quantity { getQuantity :: a }
deriving stock (Generic, Show, Eq, Ord)
deriving newtype (Bounded, Enum, Hashable)
deriving newtype NFData

newtype Hash (tag :: Symbol) = Hash { getHash :: ByteString }
deriving stock (Generic, Eq, Ord)
deriving (Read, Show) via (Quiet (Hash tag))
Expand All @@ -92,7 +87,7 @@ newtype SyncTolerance = SyncTolerance NominalDiffTime

data SyncProgress
= Ready
| Syncing !(Quantity "percent" Percentage)
| Syncing Percentage
| NotResponding
deriving (Generic, Eq, Show)

Expand Down Expand Up @@ -196,7 +191,6 @@ syncProgress (SyncTolerance tolerance) ti tipSlotNo now = do
return
. Right
. Syncing
. Quantity
. fromRight (error (errMsg progress))
. mkPercentage
. toRational
Expand Down

0 comments on commit 79d6b7d

Please sign in to comment.