Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Some f where
- data PairOf f g a = PairOf (f a) (g a)
- type SomePair f g = Some (PairOf f g)
- pattern SomePair :: f a -> g a -> Some (PairOf f g)
- traverseSome :: Functor m => (forall a. f a -> m (g a)) -> Some f -> m (Some g)
- traversePairOf :: Functor m => (f a -> g a -> m (f' b, g' b)) -> PairOf f g a -> m (PairOf f' g' b)
- mapSome :: (forall a. f a -> g a) -> Some f -> Some g
Documentation
An existential type containing f a
for some type a
.
A pair of functorial values over the same ground type, where the first
value is meant to add constraints rather than real semantic information. The
Pretty1
instance ignores the first value.
PairOf (f a) (g a) |
Instances
Pretty1 g => Pretty1 (PairOf f g :: k -> Type) Source # | |
Defined in Camfort.Helpers.TypeLevel | |
(Foldable f, Foldable g) => Foldable (PairOf f g) Source # | |
Defined in Camfort.Helpers.TypeLevel fold :: Monoid m => PairOf f g m -> m # foldMap :: Monoid m => (a -> m) -> PairOf f g a -> m # foldMap' :: Monoid m => (a -> m) -> PairOf f g a -> m # foldr :: (a -> b -> b) -> b -> PairOf f g a -> b # foldr' :: (a -> b -> b) -> b -> PairOf f g a -> b # foldl :: (b -> a -> b) -> b -> PairOf f g a -> b # foldl' :: (b -> a -> b) -> b -> PairOf f g a -> b # foldr1 :: (a -> a -> a) -> PairOf f g a -> a # foldl1 :: (a -> a -> a) -> PairOf f g a -> a # toList :: PairOf f g a -> [a] # null :: PairOf f g a -> Bool # length :: PairOf f g a -> Int # elem :: Eq a => a -> PairOf f g a -> Bool # maximum :: Ord a => PairOf f g a -> a # minimum :: Ord a => PairOf f g a -> a # | |
(Traversable f, Traversable g) => Traversable (PairOf f g) Source # | |
Defined in Camfort.Helpers.TypeLevel | |
(Functor f, Functor g) => Functor (PairOf f g) Source # | |
(Show (f a), Show (g a)) => Show (PairOf f g a) Source # | |
(Eq (f a), Eq (g a)) => Eq (PairOf f g a) Source # | |
(Ord (f a), Ord (g a)) => Ord (PairOf f g a) Source # | |
Defined in Camfort.Helpers.TypeLevel |