| Copyright | (c) Fumiaki Kinoshita 2018 |
|---|---|
| License | BSD3 |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Extensible.Wrapper
Description
Synopsis
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.
Associated Types
type Repr h (v :: k) :: Type Source #
is the user-facing representation of Repr h vh v.
Methods
_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
| Wrapper (Proxy :: k -> Type) Source # | |
| Wrapper (Const a :: k -> Type) Source # | |
| Wrapper h => Wrapper (Nullable h :: k -> Type) Source # | |
Defined in Data.Extensible.Nullable | |
| Wrapper (OptionDescr h :: k -> Type) Source # | |
Defined in Data.Extensible.GetOpt Associated Types type Repr (OptionDescr h) v :: Type Source # Methods _Wrapper :: (Functor f, Profunctor p) => Optic' p f (OptionDescr h v) (Repr (OptionDescr h) v) Source # wrap :: Repr (OptionDescr h) v -> OptionDescr h v Source # unwrap :: OptionDescr h v -> Repr (OptionDescr h) v Source # | |
| (Wrapper f, Wrapper g) => Wrapper (Prod f g :: k -> Type) Source # | |
| Wrapper h => Wrapper (Match h r :: k -> Type) Source # | |
| (Functor f, Wrapper g) => Wrapper (Comp f g :: k -> Type) Source # | |
| Wrapper [] Source # | |
| Wrapper Maybe Source # | |
| Wrapper Identity Source # | |
| Wrapper (Either e :: Type -> Type) Source # | |
| Wrapper h => Wrapper (Field h :: Assoc k v -> Type) Source # | |
_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.
newtype Comp (f :: j -> Type) (g :: i -> j) (a :: i) Source #
Poly-kinded composition
Instances
| (Functor f, Wrapper g) => Wrapper (Comp f g :: k -> Type) Source # | |
| (Functor f, Functor g) => Functor (Comp f g) Source # | |
| (Foldable f, Foldable g) => Foldable (Comp f g) Source # | |
Defined in Data.Extensible.Wrapper Methods fold :: Monoid m => Comp f g m -> m # foldMap :: Monoid m => (a -> m) -> Comp f g a -> m # foldr :: (a -> b -> b) -> b -> Comp f g a -> b # foldr' :: (a -> b -> b) -> b -> Comp f g a -> b # foldl :: (b -> a -> b) -> b -> Comp f g a -> b # foldl' :: (b -> a -> b) -> b -> Comp f g a -> b # foldr1 :: (a -> a -> a) -> Comp f g a -> a # foldl1 :: (a -> a -> a) -> Comp f g a -> a # elem :: Eq a => a -> Comp f g a -> Bool # maximum :: Ord a => Comp f g a -> a # minimum :: Ord a => Comp f g a -> a # | |
| (Traversable f, Traversable g) => Traversable (Comp f g) Source # | |
Defined in Data.Extensible.Wrapper | |
| Eq (f (g a)) => Eq (Comp f g a) Source # | |
| Ord (f (g a)) => Ord (Comp f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| Show (f (g a)) => Show (Comp f g a) Source # | |
| Generic (Comp f g a) Source # | |
| Semigroup (f (g a)) => Semigroup (Comp f g a) Source # | |
| Monoid (f (g a)) => Monoid (Comp f g a) Source # | |
| Lift (f (g a)) => Lift (Comp f g a) Source # | |
| NFData (f (g a)) => NFData (Comp f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| Hashable (f (g a)) => Hashable (Comp f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| Pretty (f (g a)) => Pretty (Comp f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| Arbitrary (f (g a)) => Arbitrary (Comp f g a) Source # | |
| type Repr (Comp f g :: k -> Type) (x :: k) Source # | |
Defined in Data.Extensible.Wrapper | |
| type Rep (Comp f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
Poly-kinded product
Constructors
| Prod (f a) (g a) |
Instances
| (Wrapper f, Wrapper g) => Wrapper (Prod f g :: k -> Type) Source # | |
| (Functor f, Functor g) => Functor (Prod f g) Source # | |
| (Foldable f, Foldable g) => Foldable (Prod f g) Source # | |
Defined in Data.Extensible.Wrapper Methods fold :: Monoid m => Prod f g m -> 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 # | |
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 # | |
Defined in Data.Extensible.Wrapper | |
| (Show (f a), Show (g a)) => Show (Prod f g a) Source # | |
| Generic (Prod f g a) Source # | |
| (Semigroup (f a), Semigroup (g a)) => Semigroup (Prod f g a) Source # | |
| (Monoid (f a), Monoid (g a)) => Monoid (Prod f g a) Source # | |
| (NFData (f a), NFData (g a)) => NFData (Prod f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| (Hashable (f a), Hashable (g a)) => Hashable (Prod f g a) Source # | |
Defined in Data.Extensible.Wrapper | |
| (Arbitrary (f a), Arbitrary (g a)) => Arbitrary (Prod f g a) Source # | |
| 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.7-inplace" 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)))) | |