basement-0.0.7: Foundation scrap box of array & string

LicenseBSD-style
MaintainerNicolas Di Prima <nicolas@primetype.co.uk>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Basement.These

Description

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

Synopsis

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 #