View on GitHub
File Changes
  )
where

                      
-
import Cardano.Binary (ToCBOR (..))
import Cardano.Prelude (NoUnexpectedThunks)
import Codec.Serialise (Serialise (..))
import Data.Word (Word64)

                      
import Cardano.Slotting.EpochInfo.API
import Cardano.Slotting.Slot (EpochNo (..), EpochSize (..), SlotNo (..))
-
import Data.List (maximumBy)
-
import Data.Ord (comparing)

                      
fixedSizeEpochInfo :: Monad m => EpochSize -> EpochInfo m
fixedSizeEpochInfo (EpochSize size) = EpochInfo
class InBounds (bounds :: Bounds) where
  inBounds :: proxy bounds -> SlotNo -> (SlotNo, SlotNo) -> Bool

                      
-
instance InBounds II where
+
instance InBounds 'II where
  inBounds _ x (lo, hi) = lo <= x && x <= hi

                      
-
instance InBounds IX where
+
instance InBounds 'IX where
  inBounds _ x (lo, hi) = lo <= x && x < hi

                      
{-------------------------------------------------------------------------------