mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
Add Arbitrary instance for RationalRect
This commit is contained in:
@@ -122,6 +122,10 @@ instance Arbitrary RectC where
|
||||
instance Arbitrary Rectangle where
|
||||
arbitrary = Rectangle <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
||||
|
||||
instance Arbitrary RationalRect where
|
||||
arbitrary = RationalRect <$> dim <*> dim <*> dim <*> dim
|
||||
where
|
||||
dim = arbitrary `suchThat` liftM2 (&&) (>= 0) (<= 1)
|
||||
|
||||
newtype SizedPositive = SizedPositive Int
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
Reference in New Issue
Block a user