accelerate-1.2.0.0: An embedded language for accelerated array processing

Copyright[2018] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.Data.Either

Contents

Description

Since: 1.2.0.0

Synopsis

Documentation

data Either a b #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

Expand

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Ints.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a 
Right b 
Instances
Bifunctor Either

Since: 4.8.0.0

Instance details

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

Eq2 Either

Since: 4.9.0.0

Instance details

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #

Ord2 Either

Since: 4.9.0.0

Instance details

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #

Read2 Either

Since: 4.9.0.0

Instance details

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] #

Show2 Either

Since: 4.9.0.0

Instance details

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #

NFData2 Either

Since: 1.4.3.0

Instance details

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () #

Hashable2 Either 
Instance details

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int #

Bitraversable1 Either 
Instance details

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Either a c -> f (Either b d) #

bisequence1 :: Apply f => Either (f a) (f b) -> f (Either a b) #

Swapped Either 
Instance details

Methods

swapped :: (Profunctor p, Functor f) => p (Either b a) (f (Either d c)) -> p (Either a b) (f (Either c d)) #

() :=> (Monad (Either a)) 
Instance details

Methods

ins :: () :- Monad (Either a) #

() :=> (Functor (Either a)) 
Instance details

Methods

ins :: () :- Functor (Either a) #

() :=> (Applicative (Either a)) 
Instance details

Methods

ins :: () :- Applicative (Either a) #

(Lift Exp a, Lift Exp b, Elt (Plain a), Elt (Plain b)) => Lift Exp (Either a b) Source # 
Instance details

Associated Types

type Plain (Either a b) :: * Source #

Methods

lift :: Either a b -> Exp (Plain (Either a b)) Source #

Monad (Either e)

Since: 4.4.0.0

Instance details

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

fail :: String -> Either e a #

Functor (Either a)

Since: 3.0

Instance details

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

MonadFix (Either e)

Since: 4.3.0.0

Instance details

Methods

mfix :: (a -> Either e a) -> Either e a #

Applicative (Either e)

Since: 3.0

Instance details

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Foldable (Either a)

Since: 4.7.0.0

Instance details

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Traversable (Either a)

Since: 4.7.0.0

Instance details

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

(Elt a, Elt b) => Semigroup (Exp (Either a b)) # 
Instance details

Methods

(<>) :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) #

sconcat :: NonEmpty (Exp (Either a b)) -> Exp (Either a b) #

stimes :: Integral b0 => b0 -> Exp (Either a b) -> Exp (Either a b) #

Eq a => Eq1 (Either a)

Since: 4.9.0.0

Instance details

Methods

liftEq :: (a0 -> b -> Bool) -> Either a a0 -> Either a b -> Bool #

Ord a => Ord1 (Either a)

Since: 4.9.0.0

Instance details

Methods

liftCompare :: (a0 -> b -> Ordering) -> Either a a0 -> Either a b -> Ordering #

Read a => Read1 (Either a)

Since: 4.9.0.0

Instance details

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Either a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Either a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Either a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Either a a0] #

Show a => Show1 (Either a)

Since: 4.9.0.0

Instance details

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Either a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Either a a0] -> ShowS #

MonadFailure (Either a) 
Instance details

Associated Types

type Failure (Either a) :: * #

Methods

mFail :: Failure (Either a) -> Either a () #

e ~ SomeException => MonadMask (Either e)

Since: 0.8.3

Instance details

Methods

mask :: ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

uninterruptibleMask :: ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

e ~ SomeException => MonadCatch (Either e)

Since: 0.8.3

Instance details

Methods

catch :: Exception e0 => Either e a -> (e0 -> Either e a) -> Either e a #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Methods

throwM :: Exception e0 => e0 -> Either e a #

NFData a => NFData1 (Either a)

Since: 1.4.3.0

Instance details

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () #

Hashable a => Hashable1 (Either a) 
Instance details

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int #

Elt a => Functor (Either a) Source # 
Instance details

Methods

fmap :: (Elt a0, Elt b, Elt (Either a a0), Elt (Either a b)) => (Exp a0 -> Exp b) -> Exp (Either a a0) -> Exp (Either a b) Source #

(<$) :: (Elt a0, Elt b, Elt (Either a a0), Elt (Either a b)) => Exp a0 -> Exp (Either a b) -> Exp (Either a a0) Source #

Generic1 (Either a :: * -> *) 
Instance details

Associated Types

type Rep1 (Either a) :: k -> * #

Methods

from1 :: Either a a0 -> Rep1 (Either a) a0 #

to1 :: Rep1 (Either a) a0 -> Either a a0 #

MonadBaseControl (Either e) (Either e) 
Instance details

Associated Types

type StM (Either e) a :: * #

Methods

liftBaseWith :: (RunInBase (Either e) (Either e) -> Either e a) -> Either e a #

restoreM :: StM (Either e) a -> Either e a #

(Eq a, Eq b) => Eq (Either a b) 
Instance details

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

(Ord a, Ord b) => Ord (Either a b) 
Instance details

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

(Read a, Read b) => Read (Either a b) 
Instance details
(Show a, Show b) => Show (Either a b) 
Instance details

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

Generic (Either a b) 
Instance details

Associated Types

type Rep (Either a b) :: * -> * #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Semigroup (Either a b)

Since: 4.9.0.0

Instance details

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

(Lift a, Lift b) => Lift (Either a b) 
Instance details

Methods

lift :: Either a b -> Q Exp #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Methods

rnf :: Either a b -> () #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

(Elt a, Elt b) => Elt (Either a b) Source # 
Instance details

Methods

eltType :: Either a b -> TupleType (EltRepr (Either a b))

fromElt :: Either a b -> EltRepr (Either a b)

toElt :: EltRepr (Either a b) -> Either a b

(Eq a, Eq b) => Eq (Either a b) Source # 
Instance details

Methods

(==) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(/=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(Ord a, Ord b) => Ord (Either a b) Source # 
Instance details

Methods

(<) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(>) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(<=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(>=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

min :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) Source #

max :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) Source #

compare :: Exp (Either a b) -> Exp (Either a b) -> Exp Ordering Source #

(Eq a, Eq b) :=> (Eq (Either a b)) 
Instance details

Methods

ins :: (Eq a, Eq b) :- Eq (Either a b) #

(Ord a, Ord b) :=> (Ord (Either a b)) 
Instance details

Methods

ins :: (Ord a, Ord b) :- Ord (Either a b) #

(Read a, Read b) :=> (Read (Either a b)) 
Instance details

Methods

ins :: (Read a, Read b) :- Read (Either a b) #

(Show a, Show b) :=> (Show (Either a b)) 
Instance details

Methods

ins :: (Show a, Show b) :- Show (Either a b) #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (Sum f g) 
Instance details

Methods

imap :: (Either i j -> a -> b) -> Sum f g a -> Sum f g b #

imapped :: (Indexable (Either i j) p, Settable f0) => p a (f0 b) -> Sum f g a -> f0 (Sum f g b) #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (Product f g) 
Instance details

Methods

imap :: (Either i j -> a -> b) -> Product f g a -> Product f g b #

imapped :: (Indexable (Either i j) p, Settable f0) => p a (f0 b) -> Product f g a -> f0 (Product f g b) #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (f :+: g) 
Instance details

Methods

imap :: (Either i j -> a -> b) -> (f :+: g) a -> (f :+: g) b #

imapped :: (Indexable (Either i j) p, Settable f0) => p a (f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (f :*: g) 
Instance details

Methods

imap :: (Either i j -> a -> b) -> (f :*: g) a -> (f :*: g) b #

imapped :: (Indexable (Either i j) p, Settable f0) => p a (f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (Sum f g) 
Instance details

Methods

ifoldMap :: Monoid m => (Either i j -> a -> m) -> Sum f g a -> m #

ifolded :: (Indexable (Either i j) p, Contravariant f0, Applicative f0) => p a (f0 a) -> Sum f g a -> f0 (Sum f g a) #

ifoldr :: (Either i j -> a -> b -> b) -> b -> Sum f g a -> b #

ifoldl :: (Either i j -> b -> a -> b) -> b -> Sum f g a -> b #

ifoldr' :: (Either i j -> a -> b -> b) -> b -> Sum f g a -> b #

ifoldl' :: (Either i j -> b -> a -> b) -> b -> Sum f g a -> b #

(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (Product f g) 
Instance details

Methods

ifoldMap :: Monoid m => (Either i j -> a -> m) -> Product f g a -> m #

ifolded :: (Indexable (Either i j) p, Contravariant f0, Applicative f0) => p a (f0 a) -> Product f g a -> f0 (Product f g a) #

ifoldr :: (Either i j -> a -> b -> b) -> b -> Product f g a -> b #

ifoldl :: (Either i j -> b -> a -> b) -> b -> Product f g a -> b #

ifoldr' :: (Either i j -> a -> b -> b) -> b -> Product f g a -> b #

ifoldl' :: (Either i j -> b -> a -> b) -> b -> Product f g a -> b #

(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (f :+: g) 
Instance details

Methods

ifoldMap :: Monoid m => (Either i j -> a -> m) -> (f :+: g) a -> m #

ifolded :: (Indexable (Either i j) p, Contravariant f0, Applicative f0) => p a (f0 a) -> (f :+: g) a -> f0 ((f :+: g) a) #

ifoldr :: (Either i j -> a -> b -> b) -> b -> (f :+: g) a -> b #

ifoldl :: (Either i j -> b -> a -> b) -> b -> (f :+: g) a -> b #

ifoldr' :: (Either i j -> a -> b -> b) -> b -> (f :+: g) a -> b #

ifoldl' :: (Either i j -> b -> a -> b) -> b -> (f :+: g) a -> b #

(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (f :*: g) 
Instance details

Methods

ifoldMap :: Monoid m => (Either i j -> a -> m) -> (f :*: g) a -> m #

ifolded :: (Indexable (Either i j) p, Contravariant f0, Applicative f0) => p a (f0 a) -> (f :*: g) a -> f0 ((f :*: g) a) #

ifoldr :: (Either i j -> a -> b -> b) -> b -> (f :*: g) a -> b #

ifoldl :: (Either i j -> b -> a -> b) -> b -> (f :*: g) a -> b #

ifoldr' :: (Either i j -> a -> b -> b) -> b -> (f :*: g) a -> b #

ifoldl' :: (Either i j -> b -> a -> b) -> b -> (f :*: g) a -> b #

(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (Sum f g) 
Instance details

Methods

itraverse :: Applicative f0 => (Either i j -> a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #

itraversed :: (Indexable (Either i j) p, Applicative f0) => p a (f0 b) -> Sum f g a -> f0 (Sum f g b) #

(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (Product f g) 
Instance details

Methods

itraverse :: Applicative f0 => (Either i j -> a -> f0 b) -> Product f g a -> f0 (Product f g b) #

itraversed :: (Indexable (Either i j) p, Applicative f0) => p a (f0 b) -> Product f g a -> f0 (Product f g b) #

(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (f :+: g) 
Instance details

Methods

itraverse :: Applicative f0 => (Either i j -> a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

itraversed :: (Indexable (Either i j) p, Applicative f0) => p a (f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (f :*: g) 
Instance details

Methods

itraverse :: Applicative f0 => (Either i j -> a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

itraversed :: (Indexable (Either i j) p, Applicative f0) => p a (f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

type Failure (Either a) 
Instance details
type Failure (Either a) = a
type StM (Either e) a 
Instance details
type StM (Either e) a = a
type Rep1 (Either a :: * -> *) 
Instance details
type Rep (Either a b) 
Instance details
type Plain (Either a b) Source # 
Instance details
type Plain (Either a b) = Either (Plain a) (Plain b)

left :: forall a b. (Elt a, Elt b) => Exp a -> Exp (Either a b) Source #

Lift a value into the Left constructor

right :: forall a b. (Elt a, Elt b) => Exp b -> Exp (Either a b) Source #

Lift a value into the Right constructor

either :: (Elt a, Elt b, Elt c) => (Exp a -> Exp c) -> (Exp b -> Exp c) -> Exp (Either a b) -> Exp c Source #

The either function performs case analysis on the Either type. If the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

isLeft :: (Elt a, Elt b) => Exp (Either a b) -> Exp Bool Source #

Return True if the argument is a Left-value

isRight :: (Elt a, Elt b) => Exp (Either a b) -> Exp Bool Source #

Return True if the argument is a Right-value

fromLeft :: (Elt a, Elt b) => Exp (Either a b) -> Exp a Source #

The fromLeft function extracts the element out of the Left constructor. If the argument was actually Right, you will get an undefined value instead.

fromRight :: (Elt a, Elt b) => Exp (Either a b) -> Exp b Source #

The fromRight function extracts the element out of the Right constructor. If the argument was actually Left, you will get an undefined value instead.

lefts :: (Shape sh, Slice sh, Elt a, Elt b) => Acc (Array (sh :. Int) (Either a b)) -> Acc (Vector a, Array sh Int) Source #

Extract from the array of Either all of the Left elements, together with a segment descriptor indicating how many elements along each dimension were returned.

rights :: (Shape sh, Slice sh, Elt a, Elt b) => Acc (Array (sh :. Int) (Either a b)) -> Acc (Vector b, Array sh Int) Source #

Extract from the array of Either all of the Right elements, together with a segment descriptor indicating how many elements along each dimension were returned.

Orphan instances

(Lift Exp a, Lift Exp b, Elt (Plain a), Elt (Plain b)) => Lift Exp (Either a b) Source # 
Instance details

Associated Types

type Plain (Either a b) :: * Source #

Methods

lift :: Either a b -> Exp (Plain (Either a b)) Source #

(Elt a, Elt b) => Semigroup (Exp (Either a b)) Source # 
Instance details

Methods

(<>) :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) #

sconcat :: NonEmpty (Exp (Either a b)) -> Exp (Either a b) #

stimes :: Integral b0 => b0 -> Exp (Either a b) -> Exp (Either a b) #

Elt a => Functor (Either a) Source # 
Instance details

Methods

fmap :: (Elt a0, Elt b, Elt (Either a a0), Elt (Either a b)) => (Exp a0 -> Exp b) -> Exp (Either a a0) -> Exp (Either a b) Source #

(<$) :: (Elt a0, Elt b, Elt (Either a a0), Elt (Either a b)) => Exp a0 -> Exp (Either a b) -> Exp (Either a a0) Source #

(Elt a, Elt b) => Elt (Either a b) Source # 
Instance details

Methods

eltType :: Either a b -> TupleType (EltRepr (Either a b))

fromElt :: Either a b -> EltRepr (Either a b)

toElt :: EltRepr (Either a b) -> Either a b

(Eq a, Eq b) => Eq (Either a b) Source # 
Instance details

Methods

(==) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(/=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(Ord a, Ord b) => Ord (Either a b) Source # 
Instance details

Methods

(<) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(>) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(<=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

(>=) :: Exp (Either a b) -> Exp (Either a b) -> Exp Bool Source #

min :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) Source #

max :: Exp (Either a b) -> Exp (Either a b) -> Exp (Either a b) Source #

compare :: Exp (Either a b) -> Exp (Either a b) -> Exp Ordering Source #