Safe Haskell  None 

Language  Haskell2010 
Elr definition
Synopsis
 data Elr a b
 _ENone :: forall a b. Prism' (Elr a b) ()
 _ELeft :: forall a b. Prism' (Elr a b) a
 _ERight :: forall a b. Prism' (Elr a b) b
 _EBoth :: forall a b. Prism' (Elr a b) (a, b)
 _elr2Maybe :: Iso (Elr a b) (Elr a' b') (Maybe a, Maybe b) (Maybe a', Maybe b')
 _elr2These :: Iso (Elr a b) (Elr a' b') (Maybe (These a b)) (Maybe (These a' b'))
 isENone :: Elr a b > Bool
 isELeft :: Elr a b > Bool
 isERight :: Elr a b > Bool
 isEBoth :: Elr a b > Bool
 type family ELeftT lr where ...
 type family ERightT lr where ...
 type family EBothT lr where ...
 getBifoldInfo :: Bifoldable bi => bi a b > String
 showElr :: Elr a b > String
 class GetElr (elr :: Elr k k1) where
 getElr :: forall th. GetElr th => Elr () ()
 partitionElr :: [Elr a b] > ([()], [a], [b], [(a, b)])
 fromElr :: a > b > Elr a b > (a, b)
 mergeElrWith :: c > (a > c) > (b > c) > (c > c > c) > Elr a b > c
 elr :: c > (a > c) > (b > c) > (a > b > c) > Elr a b > c
definition
combination of values for two types a
and b
Instances
Bifunctor Elr Source #  
Bitraversable Elr Source #  
Defined in Predicate.Elr bitraverse :: Applicative f => (a > f c) > (b > f d) > Elr a b > f (Elr c d) #  
Bifoldable Elr Source #  
NFData2 Elr Source #  
Defined in Predicate.Elr  
AssocC Elr Source #  
SwapC Elr Source #  
(Lift a, Lift b) => Lift (Elr a b :: Type) Source #  
Semigroup x => Monad (Elr x) Source #  
Functor (Elr a) Source #  
Semigroup x => Applicative (Elr x) Source #  
Foldable (Elr a) Source #  
Defined in Predicate.Elr fold :: Monoid m => Elr a m > m # foldMap :: Monoid m => (a0 > m) > Elr a a0 > m # foldMap' :: Monoid m => (a0 > m) > Elr a a0 > m # foldr :: (a0 > b > b) > b > Elr a a0 > b # foldr' :: (a0 > b > b) > b > Elr a a0 > b # foldl :: (b > a0 > b) > b > Elr a a0 > b # foldl' :: (b > a0 > b) > b > Elr a a0 > b # foldr1 :: (a0 > a0 > a0) > Elr a a0 > a0 # foldl1 :: (a0 > a0 > a0) > Elr a a0 > a0 # elem :: Eq a0 => a0 > Elr a a0 > Bool # maximum :: Ord a0 => Elr a a0 > a0 # minimum :: Ord a0 => Elr a a0 > a0 #  
Traversable (Elr a) Source #  
NFData a => NFData1 (Elr a) Source #  
Defined in Predicate.Elr  
(Show a, Show b) => P PartitionElr [Elr a b] Source #  
Defined in Predicate.Data.Elr type PP PartitionElr [Elr a b] Source #  
P Elr2Maybe (Elr a b) Source #  
P Elr2These (Elr a b) Source #  
(Show a, Show b) => P EBoth' (Elr a b) Source #  
Show a => P ERight' (Elr x a) Source #  
Show a => P ELeft' (Elr a x) Source #  
P ENone' (Elr x y) Source #  
Generic1 (Elr a :: Type > Type) Source #  
(Eq a, Eq b) => Eq (Elr a b) Source #  
(Data a, Data b) => Data (Elr a b) Source #  
Defined in Predicate.Elr gfoldl :: (forall d b0. Data d => c (d > b0) > d > c b0) > (forall g. g > c g) > Elr a b > c (Elr a b) # gunfold :: (forall b0 r. Data b0 => c (b0 > r) > c r) > (forall r. r > c r) > Constr > c (Elr a b) # toConstr :: Elr a b > Constr # dataTypeOf :: Elr a b > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c (Elr a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c (Elr a b)) # gmapT :: (forall b0. Data b0 => b0 > b0) > Elr a b > Elr a b # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > Elr a b > r # gmapQr :: forall r r'. (r' > r > r) > r > (forall d. Data d => d > r') > Elr a b > r # gmapQ :: (forall d. Data d => d > u) > Elr a b > [u] # gmapQi :: Int > (forall d. Data d => d > u) > Elr a b > u # gmapM :: Monad m => (forall d. Data d => d > m d) > Elr a b > m (Elr a b) # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > Elr a b > m (Elr a b) # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > Elr a b > m (Elr a b) #  
(Ord a, Ord b) => Ord (Elr a b) Source #  
(Show a, Show b) => Show (Elr a b) Source #  
Generic (Elr a b) Source #  
(Semigroup a, Semigroup b) => Semigroup (Elr a b) Source #  
(Monoid a, Monoid b) => Monoid (Elr a b) Source #  
(NFData a, NFData b) => NFData (Elr a b) Source #  
Defined in Predicate.Elr  
GetLen ('ENone :: Elr a b) Source #  
Defined in Predicate.Elr  
x ~ Elr a2 b2 => P ('ENone :: Elr a1 b1) x Source #  extracts the () from type level

GetLen ('ERight b2 :: Elr a b1) Source #  
Defined in Predicate.Elr  
GetLen ('ELeft a2 :: Elr a1 b) Source #  
Defined in Predicate.Elr  
(PP p x ~ Elr a2 b2, P p x) => P ('ERight p :: Elr a1 b1) x Source #  extracts the

(PP p x ~ Elr a2 b2, P p x) => P ('ELeft p :: Elr a1 b1) x Source #  extracts the

GetLen ('EBoth a2 b2 :: Elr a1 b1) Source #  
Defined in Predicate.Elr  
(Show a2, Show b2, P p a2, P q b2, Show (PP p a2), Show (PP q b2)) => P ('EBoth p q :: Elr a1 b1) (Elr a2 b2) Source #  extracts the (a,b) from type level

type PP PartitionElr [Elr a b] Source #  
Defined in Predicate.Data.Elr  
type PP Elr2Maybe (Elr a b) Source #  
type PP Elr2These (Elr a b) Source #  
type PP EBoth' (Elr a b) Source #  
Defined in Predicate.Data.Elr  
type PP ERight' (Elr x a) Source #  
Defined in Predicate.Data.Elr  
type PP ELeft' (Elr a x) Source #  
Defined in Predicate.Data.Elr  
type PP ENone' (Elr x y) Source #  
Defined in Predicate.Data.Elr  
type Rep1 (Elr a :: Type > Type) Source #  
Defined in Predicate.Elr type Rep1 (Elr a :: Type > Type) = D1 ('MetaData "Elr" "Predicate.Elr" "predicatetyped0.7.4.5JjMXzrXEzX77YMQbrq7lii" 'False) ((C1 ('MetaCons "ENone" 'PrefixI 'False) (U1 :: Type > Type) :+: C1 ('MetaCons "ELeft" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "ERight" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "EBoth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))  
type Rep (Elr a b) Source #  
Defined in Predicate.Elr type Rep (Elr a b) = D1 ('MetaData "Elr" "Predicate.Elr" "predicatetyped0.7.4.5JjMXzrXEzX77YMQbrq7lii" 'False) ((C1 ('MetaCons "ENone" 'PrefixI 'False) (U1 :: Type > Type) :+: C1 ('MetaCons "ELeft" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "ERight" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :+: C1 ('MetaCons "EBoth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b))))  
type PP ('ENone :: Elr a b) x Source #  
Defined in Predicate.Core  
type PP ('ERight p :: Elr a b) x Source #  
type PP ('ELeft p :: Elr a b) x Source #  
type PP ('EBoth p q :: Elr a1 b1) (Elr a2 b2) Source #  
prisms
isos
predicates
type families
miscellaneous
getBifoldInfo :: Bifoldable bi => bi a b > String Source #
returns the filled status of a Bifoldable container
class GetElr (elr :: Elr k k1) where Source #
get Elr
from typelevel [type application order is a b then th if explicit kind for th else is first parameter!
partitionElr :: [Elr a b] > ([()], [a], [b], [(a, b)]) Source #
partition Elr into 4 lists for each constructor: foldMap (yep ...)
mergeElrWith :: c > (a > c) > (b > c) > (c > c > c) > Elr a b > c Source #
similar to elr
without a separate EBoth combinator
>>>
mergeElrWith [] (:[]) (pure . read) (++) (ELeft 123)
[123]
>>>
mergeElrWith [] (:[]) (pure . read) (++) (EBoth 123 "11")
[123,11]
>>>
mergeElrWith [999] (:[]) (pure . read) (++) ENone
[999]
elr :: c > (a > c) > (b > c) > (a > b > c) > Elr a b > c Source #
destruct Elr
>>>
elr Nothing (Just . This) (Just . That) ((Just .) . These) (ELeft 10)
Just (This 10)
>>>
elr Nothing (Just . This) (Just . That) ((Just .) . These) (EBoth 'x' 99)
Just (These 'x' 99)
>>>
elr Nothing (Just . This) (Just . That) ((Just .) . These) ENone
Nothing