basement-0.0.4: Foundation scrap box of array & string

License | BSD-style
Maintainer | Nicolas Di Prima <nicolas@primetype.co.uk>
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Basement.These

Description

`These a b`, sum type to represent either `a` or `b` or both.

Synopsis

- data These a b
  - = This a
  - | That b
  - | These a b

# Documentation

data These a b Source #

Either a or b or both.

Constructors

This a |
That b |
These a b |

Instances

Bifunctor These Source # |
Methods bimap :: (a -> b) -> (c -> d) -> These a c -> These b d # first :: (a -> b) -> These a c -> These b c # second :: (b -> c) -> These a b -> These a c #
Functor (These a) Source # |
Methods fmap :: (a -> b) -> These a a -> These a b # (<$) :: a -> These a b -> These a a #
(Eq b, Eq a) => Eq (These a b) Source # |
Methods (==) :: These a b -> These a b -> Bool # (/=) :: These a b -> These a b -> Bool #
(Ord b, Ord a) => Ord (These a b) Source # |
Methods compare :: These a b -> These a b -> Ordering # (<) :: These a b -> These a b -> Bool # (<=) :: These a b -> These a b -> Bool # (>) :: These a b -> These a b -> Bool # (>=) :: These a b -> These a b -> Bool # max :: These a b -> These a b -> These a b # min :: These a b -> These a b -> These a b #
(Show b, Show a) => Show (These a b) Source # |
Methods showsPrec :: Int -> These a b -> ShowS # show :: These a b -> String # showList :: [These a b] -> ShowS #
(NormalForm a, NormalForm b) => NormalForm (These a b) Source # |
Methods toNormalForm :: These a b -> () Source #
From (Either a b) (These a b) Source # |
Methods from :: Either a b -> These a b Source #