Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Heterogeneous lists
Intended for qualified import
Synopsis
- type family All c as :: Constraint where ...
- data HList :: [ Type ] -> Type where
- collapse :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b) -> HList as -> [b]
- foldMap :: forall c as b proxy. ( All c as, Monoid b) => proxy c -> ( forall a. c a => a -> b) -> HList as -> b
- foldl :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => b -> a -> b) -> b -> HList as -> b
- foldlM :: forall c as m b proxy. ( All c as, Monad m) => proxy c -> ( forall a. c a => b -> a -> m b) -> b -> HList as -> m b
- foldr :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b -> b) -> b -> HList as -> b
- repeatedly :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b -> b) -> HList as -> b -> b
- repeatedlyM :: forall c as b proxy m. ( Monad m, All c as) => proxy c -> ( forall a. c a => a -> b -> m b) -> HList as -> b -> m b
- class IsList (xs :: [ Type ]) where
- data SList :: [ Type ] -> Type
- type family Fn as b where ...
- afterFn :: SList as -> (b -> c) -> Fn as b -> Fn as c
- applyFn :: Fn as b -> HList as -> b
Basic definitions
type family All c as :: Constraint where ... Source #
data HList :: [ Type ] -> Type where Source #
Instances
( IsList as, All Eq as) => Eq ( HList as) Source # | |
( IsList as, All Eq as, All Ord as) => Ord ( HList as) Source # | |
Defined in Ouroboros.Consensus.Util.HList |
|
All Show as => Show ( HList as) Source # | |
All Condense as => Condense ( HList as) Source # | |
Folding
collapse :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b) -> HList as -> [b] Source #
foldMap :: forall c as b proxy. ( All c as, Monoid b) => proxy c -> ( forall a. c a => a -> b) -> HList as -> b Source #
foldl :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => b -> a -> b) -> b -> HList as -> b Source #
foldlM :: forall c as m b proxy. ( All c as, Monad m) => proxy c -> ( forall a. c a => b -> a -> m b) -> b -> HList as -> m b Source #
foldr :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b -> b) -> b -> HList as -> b Source #
repeatedly :: forall c as b proxy. All c as => proxy c -> ( forall a. c a => a -> b -> b) -> HList as -> b -> b Source #
Apply function repeatedly for all elements of the list
repeatedly p = flip . foldl p . flip
repeatedlyM :: forall c as b proxy m. ( Monad m, All c as) => proxy c -> ( forall a. c a => a -> b -> m b) -> HList as -> b -> m b Source #