Module

Test.QuickCheck.Laws.Data.BoundedEnum

#checkBoundedEnum

checkBoundedEnum :: forall a. Arbitrary a => BoundedEnum a => Ord a => Proxy a -> Effect Unit
  • succ: succ bottom >>= succ >>= succ ... succ [cardinality - 1 times] = top
  • pred: pred top >>= pred >>= pred ... pred [cardinality - 1 times] = bottom
  • predsucc: forall a > bottom: pred a >>= succ = Just a
  • succpred: forall a < top: succ a >>= pred = Just a
  • enumpred: forall a > bottom: fromEnum <$> pred a = Just (fromEnum a - 1)
  • enumsucc: forall a < top: fromEnum <$> succ a = Just (fromEnum a + 1)
  • compare: compare e1 e2 = compare (fromEnum e1) (fromEnum e2)
  • tofromenum: toEnum (fromEnum a) = Just a

#checkBoundedEnumGen

checkBoundedEnumGen :: forall a. BoundedEnum a => Ord a => Gen a -> Effect Unit

Modules