Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Rec :: forall (k :: Type). (k -> Type) -> [k] -> Type where
- (<:) :: forall a (f :: a -> Type) (r :: a) (rs :: [a]). f r -> Rec f rs -> Rec f (r ': rs)
- map :: (forall x. f x -> g x) -> Rec f as -> Rec g as
- append :: Rec f as -> Rec f bs -> Rec f (as ++ bs)
- traverse :: Applicative h => (forall x. f x -> h (g x)) -> Rec f rs -> h (Rec g rs)
- traverse_ :: Applicative h => (forall x. f x -> h b) -> Rec f rs -> h ()
- zipWith :: (forall x. f x -> g x -> h x) -> Rec f rs -> Rec g rs -> Rec h rs
- foldMap :: forall f m rs. Monoid m => (forall x. f x -> m) -> Rec f rs -> m
- foldMap1 :: forall f m r rs. Semigroup m => (forall x. f x -> m) -> Rec f (r ': rs) -> m
- foldl' :: forall f a rs. (forall x. a -> f x -> a) -> a -> Rec f rs -> a
- get :: Elem rs r -> Rec f rs -> f r
- put :: Elem rs r -> f r -> Rec f rs -> Rec f rs
- gets :: Rec (Elem rs) ss -> Rec f rs -> Rec f ss
- puts :: Rec (Elem rs) ss -> Rec f rs -> Rec f ss -> Rec f rs
- fromSingList :: SingList as -> Rec Sing as
- toSingList :: Rec Sing as -> SingList as
- fromList :: [Exists f] -> Exists (Rec f)
Documentation
data Rec :: forall (k :: Type). (k -> Type) -> [k] -> Type where Source #
Instances
(<:) :: forall a (f :: a -> Type) (r :: a) (rs :: [a]). f r -> Rec f rs -> Rec f (r ': rs) infixr 7 Source #
infix RecCons with proper fixity
traverse_ :: Applicative h => (forall x. f x -> h b) -> Rec f rs -> h () Source #
foldMap :: forall f m rs. Monoid m => (forall x. f x -> m) -> Rec f rs -> m Source #
Map each element of a record to a monoid and combine the results.
:: forall f a rs. (forall x. a -> f x -> a) | Reduction |
-> a | Initial accumulator |
-> Rec f rs | Record |
-> a |
Strict left fold over the elements of a record.