Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Commit e297aeb

Browse files
committed
Add missing Bounded instances for Argument
1 parent 0444c79 commit e297aeb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Data/Generic/Rep/Bounded.purs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ module Data.Generic.Rep.Bounded
99

1010
import Data.Generic.Rep
1111

12+
import Data.Bounded (class Bounded, bottom, top)
13+
1214
class GenericBottom a where
1315
genericBottom' :: a
1416

1517
instance genericBottomNoArguments :: GenericBottom NoArguments where
1618
genericBottom' = NoArguments
1719

20+
instance genericBottomArgument :: Bounded a => GenericBottom (Argument a) where
21+
genericBottom' = Argument bottom
22+
1823
instance genericBottomSum :: GenericBottom a => GenericBottom (Sum a b) where
1924
genericBottom' = Inl genericBottom'
2025

@@ -27,6 +32,9 @@ class GenericTop a where
2732
instance genericTopNoArguments :: GenericTop NoArguments where
2833
genericTop' = NoArguments
2934

35+
instance genericTopArgument :: Bounded a => GenericTop (Argument a) where
36+
genericTop' = Argument top
37+
3038
instance genericTopSum :: GenericTop b => GenericTop (Sum a b) where
3139
genericTop' = Inr genericTop'
3240

0 commit comments

Comments
 (0)