Skip to content

Commit

Permalink
Introduce type SlotInternalIndex.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Jul 3, 2020
1 parent ff55016 commit 96f25f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/core/src/Cardano/Wallet/Primitive/Types.hs
Expand Up @@ -96,6 +96,7 @@ module Cardano.Wallet.Primitive.Types
, EpochNo (..)
, FeePolicy (..)
, SlotId (..)
, SlotInternalIndex (..)
, SlotLength (..)
, SlotNo (..)
, StartTime (..)
Expand Down Expand Up @@ -1807,6 +1808,17 @@ newtype StartTime = StartTime UTCTime

instance NFData StartTime

-- | Indicates the relative position of an event occurring within a slot.
--
-- If 'SlotInternalIndex' values @a@ and @b@ correspond to the same slot, then:
--
-- * @a > b@ indicates that @a@ occurs later than @b@.
-- * @a < b@ indicates that @b@ occurs later than @a@.
-- * @a = b@ indicates that @a@ and @b@ occur at the same point.
--
newtype SlotInternalIndex = SlotInternalIndex { unSlotInternalIndex :: Word64 }
deriving (Bounded, Enum, Eq, Ord, Show, Read)

{-------------------------------------------------------------------------------
Protocol Magic
-------------------------------------------------------------------------------}
Expand Down

0 comments on commit 96f25f3

Please sign in to comment.