| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Control.Monad.Borrow.Pure.Experimental.Loop
Description
Synopsis
- data Borrows (bk :: BorrowKind) (α :: Lifetime) (xs :: [Type]) where
- forReborrowing :: forall {k} t bor (α :: Lifetime) (xs :: k) b c. (Traversable t, Reborrowable bor) => bor α xs %1 -> t b %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> b %1 -> BO (β /\ α) c) -> BO α (t c, bor α xs)
- forReborrowingOf_ :: forall {k} bor s a (α :: Lifetime) (xs :: k). Reborrowable bor => Fold s a %1 -> bor α xs %1 -> s %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs)
- forReborrowing_ :: forall {k} t bor (α :: Lifetime) (xs :: k) a. (Foldable t, Reborrowable bor) => bor α xs %1 -> t a %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs)
- iforReborrowingOf_ :: forall {k} bor i s a (α :: Lifetime) (xs :: k). Reborrowable bor => IndexedFold i s a %1 -> bor α xs %1 -> s %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> i %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs)
- iforReborrowing_ :: forall {k} i t bor (α :: Lifetime) (xs :: k) a. (FoldableWithIndex i t, Reborrowable bor) => bor α xs %1 -> t a %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> i %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs)
- type Fold s a = forall w. Monoid w => (a %1 -> w) -> s %1 -> w
- class Foldable (t :: Type -> Type) where
- type IndexedFold i s a = forall w. Monoid w => (i %1 -> a %1 -> w) -> s %1 -> w
- ifoldMapDefaultOf :: Fold s a %1 -> IndexedFold Int s a
- class Foldable t => FoldableWithIndex i (t :: Type -> Type) | t -> i where
- traverse_ :: (Foldable t, Applicative m) => (a %1 -> m ()) -> t a %1 -> m ()
- for_ :: (Foldable t, Applicative m) => t a %1 -> (a %1 -> m ()) -> m ()
- toListOf :: Fold s a %1 -> s %1 -> [a]
- toList :: Foldable t => t a %1 -> [a]
- foldBorrow :: forall (t :: Type -> Type) (bk :: BorrowKind) (α :: Lifetime) a. Foldable t => Fold (Borrow bk α (t a)) (Borrow bk α a)
- foldBorrowOf :: forall s a (bk :: BorrowKind) (α :: Lifetime). Fold s a %1 -> Fold (Borrow bk α s) (Borrow bk α a)
- type GenericFoldable (t :: Type -> Type) = (Generic1 t, Foldable (Rep1 t))
- genericFoldMap :: (GenericFoldable t, Monoid w) => (a %1 -> w) -> t a %1 -> w
- ifoldMapDefault :: forall (t :: Type -> Type) a. Foldable t => IndexedFold Int (t a) a
Documentation
data Borrows (bk :: BorrowKind) (α :: Lifetime) (xs :: [Type]) where Source #
Constructors
| BNil :: forall (bk :: BorrowKind) (α :: Lifetime). Borrows bk α ('[] :: [Type]) | |
| (:-) :: forall (bk :: BorrowKind) (α :: Lifetime) x (xs1 :: [Type]). !(Borrow bk α x) -> !(Borrows bk α xs1) -> Borrows bk α (x ': xs1) infixr 5 |
forReborrowing :: forall {k} t bor (α :: Lifetime) (xs :: k) b c. (Traversable t, Reborrowable bor) => bor α xs %1 -> t b %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> b %1 -> BO (β /\ α) c) -> BO α (t c, bor α xs) Source #
tforReborrowingN iterates over the elements of Traversable
inside the delimited sublifetime, reborrowing the bors@ for that sublifetime.Borrows in
forReborrowingOf_ :: forall {k} bor s a (α :: Lifetime) (xs :: k). Reborrowable bor => Fold s a %1 -> bor α xs %1 -> s %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs) Source #
forReborrowing_ :: forall {k} t bor (α :: Lifetime) (xs :: k) a. (Foldable t, Reborrowable bor) => bor α xs %1 -> t a %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs) Source #
iforReborrowingOf_ :: forall {k} bor i s a (α :: Lifetime) (xs :: k). Reborrowable bor => IndexedFold i s a %1 -> bor α xs %1 -> s %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> i %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs) Source #
iforReborrowing_ :: forall {k} i t bor (α :: Lifetime) (xs :: k) a. (FoldableWithIndex i t, Reborrowable bor) => bor α xs %1 -> t a %1 -> (forall (β :: Lifetime). bor (β /\ α) xs %1 -> i %1 -> a %1 -> BO (β /\ α) ()) -> BO α (bor α xs) Source #
class Foldable (t :: Type -> Type) where Source #
Instances
| Foldable NonEmpty Source # | |
| Foldable Vector Source # | |
| Foldable Maybe Source # | |
| Foldable [] Source # | |
Defined in Control.Monad.Borrow.Pure.Experimental.Loop | |
| Consumable e => Foldable (Either e) Source # | |
| Foldable (U1 :: Type -> Type) Source # | |
| Foldable (V1 :: Type -> Type) Source # | |
| Foldable (HashMap k) Source # | |
| Consumable e => Foldable ((,) e) Source # | |
Defined in Control.Monad.Borrow.Pure.Experimental.Loop | |
| GenericFoldable t => Foldable (Generically1 t) Source # | |
Defined in Control.Monad.Borrow.Pure.Experimental.Loop Methods foldMap :: Monoid w => (a %1 -> w) -> Generically1 t a %1 -> w Source # | |
| (Foldable f, Foldable g) => Foldable (f :*: g) Source # | |
| (Foldable f, Foldable g) => Foldable (f :+: g) Source # | |
| Foldable f => Foldable (MP1 m f) Source # | |
| Foldable f => Foldable (M1 i c f) Source # | |
type IndexedFold i s a = forall w. Monoid w => (i %1 -> a %1 -> w) -> s %1 -> w Source #
ifoldMapDefaultOf :: Fold s a %1 -> IndexedFold Int s a Source #
class Foldable t => FoldableWithIndex i (t :: Type -> Type) | t -> i where Source #
Minimal complete definition
Nothing
Instances
traverse_ :: (Foldable t, Applicative m) => (a %1 -> m ()) -> t a %1 -> m () Source #
for_ :: (Foldable t, Applicative m) => t a %1 -> (a %1 -> m ()) -> m () Source #
foldBorrow :: forall (t :: Type -> Type) (bk :: BorrowKind) (α :: Lifetime) a. Foldable t => Fold (Borrow bk α (t a)) (Borrow bk α a) Source #
foldBorrowOf :: forall s a (bk :: BorrowKind) (α :: Lifetime). Fold s a %1 -> Fold (Borrow bk α s) (Borrow bk α a) Source #
genericFoldMap :: (GenericFoldable t, Monoid w) => (a %1 -> w) -> t a %1 -> w Source #
ifoldMapDefault :: forall (t :: Type -> Type) a. Foldable t => IndexedFold Int (t a) a Source #