| Copyright | (c) Fumiaki Kinoshita 2017 |
|---|---|
| License | BSD3 |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Extensible.Wrapper
Description
Documentation
class Wrapper h where Source #
The extensible data types should take k -> * as a parameter.
This class allows us to take a shortcut for direct representation.
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 k (Proxy k) Source # | |
| Wrapper k (Const' k a) Source # | |
| Wrapper k h => Wrapper k (Nullable k h) Source # | |
| (Wrapper k f, Wrapper k g) => Wrapper k (Prod k f g) Source # | |
| Wrapper k h => Wrapper k (Match k h r) Source # | |
| (Functor f, Wrapper k g) => Wrapper k (Comp k * f g) Source # | |
| Wrapper * [] Source # | |
| Wrapper * Maybe Source # | |
| Wrapper * Identity Source # | |
| Wrapper * OptDescr' Source # | |
| Wrapper v h => Wrapper (Assoc k v) (Field k v h) 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.
Poly-kinded Const
Instances
| Wrapper k (Const' k a) Source # | |
| Functor (Const' * a) Source # | |
| Foldable (Const' * a) Source # | |
| Traversable (Const' * a) Source # | |
| Eq a => Eq (Const' k a x) Source # | |
| Ord a => Ord (Const' k a x) Source # | |
| Show a => Show (Const' k a x) Source # | |
| Generic (Const' k a x) Source # | |
| Arbitrary a => Arbitrary (Const' k a x) Source # | |
| NFData a => NFData (Const' k a x) Source # | |
| Hashable a => Hashable (Const' k a x) Source # | |
| type Repr k (Const' k a) b Source # | |
| data MVector s (Const' k a b) # | |
| type Rep (Const' k a x) Source # | |
| data Vector (Const' k a b) # | |
Poly-kinded composition
Instances
| (Functor f, Wrapper k g) => Wrapper k (Comp k * f g) Source # | |
| (Functor f, Functor g) => Functor (Comp * * f g) Source # | |
| (Foldable f, Foldable g) => Foldable (Comp * * f g) Source # | |
| (Traversable f, Traversable g) => Traversable (Comp * * f g) Source # | |
| Eq (f (g a)) => Eq (Comp i j f g a) Source # | |
| Ord (f (g a)) => Ord (Comp i j f g a) Source # | |
| Show (f (g a)) => Show (Comp i j f g a) Source # | |
| Generic (Comp i j f g a) Source # | |
| Semigroup (f (g a)) => Semigroup (Comp i j f g a) Source # | |
| Monoid (f (g a)) => Monoid (Comp i j f g a) Source # | |
| Arbitrary (f (g a)) => Arbitrary (Comp i j f g a) Source # | |
| NFData (f (g a)) => NFData (Comp i j f g a) Source # | |
| Hashable (f (g a)) => Hashable (Comp i j f g a) Source # | |
| type Repr k (Comp k * f g) x Source # | |
| type Rep (Comp i j f g a) Source # | |
Poly-kinded product
Constructors
| Prod (f a) (g a) |
Instances
| (Wrapper k f, Wrapper k g) => Wrapper k (Prod k f g) Source # | |
| (Functor g, Functor f) => Functor (Prod * f g) Source # | |
| (Foldable g, Foldable f) => Foldable (Prod * f g) Source # | |
| (Traversable g, Traversable f) => Traversable (Prod * f g) Source # | |
| (Eq (g a), Eq (f a)) => Eq (Prod k f g a) Source # | |
| (Ord (g a), Ord (f a)) => Ord (Prod k f g a) Source # | |
| (Show (g a), Show (f a)) => Show (Prod k f g a) Source # | |
| Generic (Prod k f g a) Source # | |
| (Semigroup (f a), Semigroup (g a)) => Semigroup (Prod k f g a) Source # | |
| (Monoid (f a), Monoid (g a)) => Monoid (Prod k f g a) Source # | |
| (Arbitrary (f a), Arbitrary (g a)) => Arbitrary (Prod k f g a) Source # | |
| (NFData (f a), NFData (g a)) => NFData (Prod k f g a) Source # | |
| (Hashable (f a), Hashable (g a)) => Hashable (Prod k f g a) Source # | |
| type Repr k (Prod k f g) a Source # | |
| type Rep (Prod k f g a) Source # | |