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 ENoneT lr where ...
- 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 (th :: Elr k k1) where
- 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
Documentation
similar to These
with an additional empty constructor to support a Monoid instance
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 # | |
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 # | |
(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 # | |
(Eq a, Eq b) => Eq (Elr a b) Source # | |
(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 Rep (Elr a b) Source # | |
Defined in Predicate.Elr type Rep (Elr a b) = D1 ('MetaData "Elr" "Predicate.Elr" "predicate-typed-0.7.4.4-1vpy5lu48CkBuwvIfscZLd" 'False) ((C1 ('MetaCons "ENone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ELeft" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) :+: (C1 ('MetaCons "ERight" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "EBoth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (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 (th :: 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