basement-0.0.11: 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

Instances details

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