Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Top a
- topToMaybe :: Top a -> Maybe a
- pattern ValT :: a -> Top a
- pattern Top :: Top a
- data Bottom a
- bottomToMaybe :: Bottom a -> Maybe a
- pattern Bottom :: Bottom a
- pattern ValB :: a -> Bottom a
- data UnBounded a
- = MinInfinity
- | Val {
- _unUnBounded :: a
- | MaxInfinity
- unUnBounded :: forall a a. Traversal (UnBounded a) (UnBounded a) a a
- unBoundedToMaybe :: UnBounded a -> Maybe a
Documentation
`Top a` represents the type a, together with a Top
element, i.e. an element
that is greater than any other element. We can think of `Top a` being defined as:
>>>
data Top a = ValT a | Top
Instances
Monad Top Source # | |
Functor Top Source # | |
Applicative Top Source # | |
Foldable Top Source # | |
Defined in Data.UnBounded fold :: Monoid m => Top m -> m # foldMap :: Monoid m => (a -> m) -> Top a -> m # foldr :: (a -> b -> b) -> b -> Top a -> b # foldr' :: (a -> b -> b) -> b -> Top a -> b # foldl :: (b -> a -> b) -> b -> Top a -> b # foldl' :: (b -> a -> b) -> b -> Top a -> b # foldr1 :: (a -> a -> a) -> Top a -> a # foldl1 :: (a -> a -> a) -> Top a -> a # elem :: Eq a => a -> Top a -> Bool # maximum :: Ord a => Top a -> a # | |
Traversable Top Source # | |
Eq a => Eq (Top a) Source # | |
Ord a => Ord (Top a) Source # | |
Show a => Show (Top a) Source # | |
topToMaybe :: Top a -> Maybe a Source #
`Bottom a` represents the type a, together with a Bottom
element,
i.e. an element that is smaller than any other element. We can think of
`Bottom a` being defined as:
>>>
data Bottom a = Bottom | ValB a
Instances
Monad Bottom Source # | |
Functor Bottom Source # | |
Applicative Bottom Source # | |
Foldable Bottom Source # | |
Defined in Data.UnBounded fold :: Monoid m => Bottom m -> m # foldMap :: Monoid m => (a -> m) -> Bottom a -> m # foldr :: (a -> b -> b) -> b -> Bottom a -> b # foldr' :: (a -> b -> b) -> b -> Bottom a -> b # foldl :: (b -> a -> b) -> b -> Bottom a -> b # foldl' :: (b -> a -> b) -> b -> Bottom a -> b # foldr1 :: (a -> a -> a) -> Bottom a -> a # foldl1 :: (a -> a -> a) -> Bottom a -> a # elem :: Eq a => a -> Bottom a -> Bool # maximum :: Ord a => Bottom a -> a # minimum :: Ord a => Bottom a -> a # | |
Traversable Bottom Source # | |
Eq a => Eq (Bottom a) Source # | |
Ord a => Ord (Bottom a) Source # | |
Defined in Data.UnBounded | |
Show a => Show (Bottom a) Source # | |
bottomToMaybe :: Bottom a -> Maybe a Source #
`UnBounded a` represents the type a, together with an element
MaxInfinity
larger than any other element, and an element MinInfinity
,
smaller than any other element.
Instances
unBoundedToMaybe :: UnBounded a -> Maybe a Source #