diff --git a/lib/core/src/Cardano/Wallet/Primitive/Types.hs b/lib/core/src/Cardano/Wallet/Primitive/Types.hs index b32e6eeb9d6..cd61218080e 100644 --- a/lib/core/src/Cardano/Wallet/Primitive/Types.hs +++ b/lib/core/src/Cardano/Wallet/Primitive/Types.hs @@ -96,6 +96,7 @@ module Cardano.Wallet.Primitive.Types , EpochNo (..) , FeePolicy (..) , SlotId (..) + , SlotInternalIndex (..) , SlotLength (..) , SlotNo (..) , StartTime (..) @@ -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 -------------------------------------------------------------------------------}