Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class Wrapper (h :: k -> Type) where
- _WrapperAs :: (Functor f, Profunctor p, Wrapper h) => proxy v -> Optic' p f (h v) (Repr h v)
- type Comp = Compose
- pattern Comp :: f (g a) -> Compose f g a
- getComp :: Compose f g a -> f (g a)
- comp :: Functor f => (a -> g b) -> f a -> Compose f g b
- data Prod f g a = Prod (f a) (g a)
Documentation
class Wrapper (h :: k -> Type) where Source #
The extensible data types should take k -> Type
as a parameter.
This class allows us to take a shortcut for direct representation.
_Wrapper :: (Functor f, Profunctor p) => Optic' p f (h v) (Repr h v) Source #
This is an isomorphism between h v
and
.Repr
h v
_Wrapper :: Iso' (h v) (Repr h v)
Instances
_WrapperAs :: (Functor f, Profunctor p, Wrapper h) => proxy v -> Optic' p f (h v) (Repr h v) Source #
Restricted version of _Wrapper
.
It is useful for eliminating ambiguousness.
Poly-kinded product
Prod (f a) (g a) |
Instances
(Wrapper f, Wrapper g) => Wrapper (Prod f g :: k -> Type) Source # | |
Defined in Data.Extensible.Wrapper | |
(Foldable f, Foldable g) => Foldable (Prod f g) Source # | |
Defined in Data.Extensible.Wrapper fold :: Monoid m => Prod f g m -> m # foldMap :: Monoid m => (a -> m) -> Prod f g a -> m # foldMap' :: Monoid m => (a -> m) -> Prod f g a -> m # foldr :: (a -> b -> b) -> b -> Prod f g a -> b # foldr' :: (a -> b -> b) -> b -> Prod f g a -> b # foldl :: (b -> a -> b) -> b -> Prod f g a -> b # foldl' :: (b -> a -> b) -> b -> Prod f g a -> b # foldr1 :: (a -> a -> a) -> Prod f g a -> a # foldl1 :: (a -> a -> a) -> Prod f g a -> a # elem :: Eq a => a -> Prod f g a -> Bool # maximum :: Ord a => Prod f g a -> a # minimum :: Ord a => Prod f g a -> a # | |
(Traversable f, Traversable g) => Traversable (Prod f g) Source # | |
(Functor f, Functor g) => Functor (Prod f g) Source # | |
(Arbitrary (f a), Arbitrary (g a)) => Arbitrary (Prod f g a) Source # | |
(Monoid (f a), Monoid (g a)) => Monoid (Prod f g a) Source # | |
(Semigroup (f a), Semigroup (g a)) => Semigroup (Prod f g a) Source # | |
Generic (Prod f g a) Source # | |
(Show (f a), Show (g a)) => Show (Prod f g a) Source # | |
(NFData (f a), NFData (g a)) => NFData (Prod f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
(Eq (f a), Eq (g a)) => Eq (Prod f g a) Source # | |
(Ord (f a), Ord (g a)) => Ord (Prod f g a) Source # | |
(Hashable (f a), Hashable (g a)) => Hashable (Prod f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
type Repr (Prod f g :: k -> Type) (a :: k) Source # | |
type Rep (Prod f g a) Source # | |
Defined in Data.Extensible.Wrapper type Rep (Prod f g a) = D1 ('MetaData "Prod" "Data.Extensible.Wrapper" "extensible-0.9.1-FlXPM1oMU0CaPk6p1u6nG" 'False) (C1 ('MetaCons "Prod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g a)))) |