Safe Haskell | None |
---|---|
Language | GHC2021 |
Data.Scoped.Classes
Description
Synopsis
- newtype ((a :: k -> Type) ~> (b :: k -> Type)) (n :: k) = MkArr (a n -> b n)
- class (forall (a :: k -> Type) (n :: k). Coercible (f a n) (k1 (a n)), Functor k1) => ScopedFunctor (k1 :: Type -> Type) (f :: (k -> Type) -> k -> Type) | f -> k1 where
- class (forall (a :: k -> Type) (n :: k). Coercible (f a n) (k1 (a n)), Foldable k1) => ScopedFoldable (k1 :: Type -> Type) (f :: (k -> Type) -> k -> Type) | f -> k1 where
- fold :: forall a (n :: k). Monoid (a n) => f a n -> a n
- foldMap :: forall m a (n :: k). Monoid m => (a n -> m) -> f a n -> m
- foldMap' :: forall m a (n :: k). Monoid m => (a n -> m) -> f a n -> m
- foldr :: forall a (n :: k) b. (a n -> b -> b) -> b -> f a n -> b
- foldr' :: forall a (n :: k) b. (a n -> b -> b) -> b -> f a n -> b
- foldl :: forall b a (n :: k). (b -> a n -> b) -> b -> f a n -> b
- foldl' :: forall b a (n :: k). (b -> a n -> b) -> b -> f a n -> b
- foldr1 :: forall a (n :: k). (a n -> a n -> a n) -> f a n -> a n
- foldl1 :: forall a (n :: k). (a n -> a n -> a n) -> f a n -> a n
- null :: forall (a :: k -> Type) (n :: k). f a n -> Bool
- length :: forall (a :: k -> Type) (n :: k). f a n -> Int
- elem :: forall a (n :: k). Eq (a n) => a n -> f a n -> Bool
- maximum :: forall a (n :: k). Ord (a n) => f a n -> a n
- minimum :: forall a (n :: k). Ord (a n) => f a n -> a n
- sum :: forall a (n :: k). Num (a n) => f a n -> a n
- product :: forall a (n :: k). Num (a n) => f a n -> a n
- any :: forall a (n :: k). (a n -> Bool) -> f a n -> Bool
- all :: forall a (n :: k). (a n -> Bool) -> f a n -> Bool
- mapM_ :: forall m a (n :: k) b. Monad m => (a n -> m b) -> f a n -> m ()
- class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Traversable k1) => ScopedTraversable (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where
- traverse :: forall a b (n :: k) f. Applicative f => (a n -> f (b n)) -> t a n -> f (t b n)
- mapM :: forall m a (n :: k) b. Monad m => (a n -> m (b n)) -> t a n -> m (t b n)
- class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Applicative k1) => ScopedApplicative (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where
- class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Monad k1, ScopedApplicative k1 t) => ScopedMonad (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where
Documentation
newtype ((a :: k -> Type) ~> (b :: k -> Type)) (n :: k) Source #
A scoped function (i.e., a function whose input & output are scoped).
Constructors
MkArr (a n -> b n) |
Instances
(CoArbitrary (a n), Arbitrary (b n)) => Arbitrary ((a ~> b) n) Source # | |||||
(Arbitrary (a n), CoArbitrary (b n)) => CoArbitrary ((a ~> b) n) Source # | |||||
Defined in Data.Scoped.Classes Methods coarbitrary :: (a ~> b) n -> Gen b0 -> Gen b0 # | |||||
(Arbitrary (a n), Show (a n), Testable (b n)) => Testable ((a ~> b) n) Source # | |||||
Monoid (b n) => Monoid ((a ~> b) n) Source # | |||||
Semigroup (b n) => Semigroup ((a ~> b) n) Source # | |||||
Generic ((a ~> b) n) Source # | |||||
Defined in Data.Scoped.Classes Associated Types
| |||||
NFData ((a ~> b) n) Source # | |||||
Defined in Data.Scoped.Classes | |||||
type Rep ((a ~> b) n) Source # | |||||
Defined in Data.Scoped.Classes |
class (forall (a :: k -> Type) (n :: k). Coercible (f a n) (k1 (a n)), Functor k1) => ScopedFunctor (k1 :: Type -> Type) (f :: (k -> Type) -> k -> Type) | f -> k1 where Source #
Scoped Functor
.
Minimal complete definition
Nothing
class (forall (a :: k -> Type) (n :: k). Coercible (f a n) (k1 (a n)), Foldable k1) => ScopedFoldable (k1 :: Type -> Type) (f :: (k -> Type) -> k -> Type) | f -> k1 where Source #
Scoped Foldable
.
Minimal complete definition
Nothing
Methods
fold :: forall a (n :: k). Monoid (a n) => f a n -> a n Source #
foldMap :: forall m a (n :: k). Monoid m => (a n -> m) -> f a n -> m Source #
foldMap' :: forall m a (n :: k). Monoid m => (a n -> m) -> f a n -> m Source #
foldr :: forall a (n :: k) b. (a n -> b -> b) -> b -> f a n -> b Source #
foldr' :: forall a (n :: k) b. (a n -> b -> b) -> b -> f a n -> b Source #
foldl :: forall b a (n :: k). (b -> a n -> b) -> b -> f a n -> b Source #
foldl' :: forall b a (n :: k). (b -> a n -> b) -> b -> f a n -> b Source #
foldr1 :: forall a (n :: k). (a n -> a n -> a n) -> f a n -> a n Source #
foldl1 :: forall a (n :: k). (a n -> a n -> a n) -> f a n -> a n Source #
null :: forall (a :: k -> Type) (n :: k). f a n -> Bool Source #
length :: forall (a :: k -> Type) (n :: k). f a n -> Int Source #
elem :: forall a (n :: k). Eq (a n) => a n -> f a n -> Bool Source #
maximum :: forall a (n :: k). Ord (a n) => f a n -> a n Source #
minimum :: forall a (n :: k). Ord (a n) => f a n -> a n Source #
sum :: forall a (n :: k). Num (a n) => f a n -> a n Source #
product :: forall a (n :: k). Num (a n) => f a n -> a n Source #
any :: forall a (n :: k). (a n -> Bool) -> f a n -> Bool Source #
all :: forall a (n :: k). (a n -> Bool) -> f a n -> Bool Source #
mapM_ :: forall m a (n :: k) b. Monad m => (a n -> m b) -> f a n -> m () Source #
Instances
ScopedFoldable Maybe (Maybe :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.Scoped.Maybe Methods fold :: forall a (n :: k). Monoid (a n) => Maybe a n -> a n Source # foldMap :: forall m a (n :: k). Monoid m => (a n -> m) -> Maybe a n -> m Source # foldMap' :: forall m a (n :: k). Monoid m => (a n -> m) -> Maybe a n -> m Source # foldr :: forall a (n :: k) b. (a n -> b -> b) -> b -> Maybe a n -> b Source # foldr' :: forall a (n :: k) b. (a n -> b -> b) -> b -> Maybe a n -> b Source # foldl :: forall b a (n :: k). (b -> a n -> b) -> b -> Maybe a n -> b Source # foldl' :: forall b a (n :: k). (b -> a n -> b) -> b -> Maybe a n -> b Source # foldr1 :: forall a (n :: k). (a n -> a n -> a n) -> Maybe a n -> a n Source # foldl1 :: forall a (n :: k). (a n -> a n -> a n) -> Maybe a n -> a n Source # null :: forall (a :: k -> Type) (n :: k). Maybe a n -> Bool Source # length :: forall (a :: k -> Type) (n :: k). Maybe a n -> Int Source # elem :: forall a (n :: k). Eq (a n) => a n -> Maybe a n -> Bool Source # maximum :: forall a (n :: k). Ord (a n) => Maybe a n -> a n Source # minimum :: forall a (n :: k). Ord (a n) => Maybe a n -> a n Source # sum :: forall a (n :: k). Num (a n) => Maybe a n -> a n Source # product :: forall a (n :: k). Num (a n) => Maybe a n -> a n Source # any :: forall a (n :: k). (a n -> Bool) -> Maybe a n -> Bool Source # all :: forall a (n :: k). (a n -> Bool) -> Maybe a n -> Bool Source # mapM_ :: forall m a (n :: k) b. Monad m => (a n -> m b) -> Maybe a n -> m () Source # | |
ScopedFoldable [] (List :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.Scoped.List Methods fold :: forall a (n :: k). Monoid (a n) => List a n -> a n Source # foldMap :: forall m a (n :: k). Monoid m => (a n -> m) -> List a n -> m Source # foldMap' :: forall m a (n :: k). Monoid m => (a n -> m) -> List a n -> m Source # foldr :: forall a (n :: k) b. (a n -> b -> b) -> b -> List a n -> b Source # foldr' :: forall a (n :: k) b. (a n -> b -> b) -> b -> List a n -> b Source # foldl :: forall b a (n :: k). (b -> a n -> b) -> b -> List a n -> b Source # foldl' :: forall b a (n :: k). (b -> a n -> b) -> b -> List a n -> b Source # foldr1 :: forall a (n :: k). (a n -> a n -> a n) -> List a n -> a n Source # foldl1 :: forall a (n :: k). (a n -> a n -> a n) -> List a n -> a n Source # null :: forall (a :: k -> Type) (n :: k). List a n -> Bool Source # length :: forall (a :: k -> Type) (n :: k). List a n -> Int Source # elem :: forall a (n :: k). Eq (a n) => a n -> List a n -> Bool Source # maximum :: forall a (n :: k). Ord (a n) => List a n -> a n Source # minimum :: forall a (n :: k). Ord (a n) => List a n -> a n Source # sum :: forall a (n :: k). Num (a n) => List a n -> a n Source # product :: forall a (n :: k). Num (a n) => List a n -> a n Source # any :: forall a (n :: k). (a n -> Bool) -> List a n -> Bool Source # all :: forall a (n :: k). (a n -> Bool) -> List a n -> Bool Source # mapM_ :: forall m a (n :: k) b. Monad m => (a n -> m b) -> List a n -> m () Source # |
class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Traversable k1) => ScopedTraversable (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where Source #
Scoped Traversable
.
Minimal complete definition
Nothing
Methods
traverse :: forall a b (n :: k) f. Applicative f => (a n -> f (b n)) -> t a n -> f (t b n) Source #
mapM :: forall m a (n :: k) b. Monad m => (a n -> m (b n)) -> t a n -> m (t b n) Source #
class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Applicative k1) => ScopedApplicative (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where Source #
Scoped Applicative
.
Minimal complete definition
Nothing
Methods
pure :: forall a (n :: k). a n -> t a n Source #
(<*>) :: forall (a :: k -> Type) (b :: k -> Type) (n :: k). t (a ~> b) n -> t a n -> t b n Source #
class (forall (a :: k -> Type) (n :: k). Coercible (t a n) (k1 (a n)), Monad k1, ScopedApplicative k1 t) => ScopedMonad (k1 :: Type -> Type) (t :: (k -> Type) -> k -> Type) | t -> k1 where Source #
Scoped Monad
.
Minimal complete definition
Nothing
Methods
return :: forall a (n :: k). a n -> t a n Source #
(>>=) :: forall a (n :: k) (b :: k -> Type) (m :: k). t a n -> (a n -> t b m) -> t b m Source #