Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Compatibility copypasta from the future to derive Applicative without incurring dependency and boilerplate from Distributive/Representable.
Synopsis
- class Generic1 (f :: k -> Type) where
- newtype Generically1 f a where
- Generically1 :: f a -> Generically1 f a
Documentation
class Generic1 (f :: k -> Type) where #
Representable types of kind * -> *
(or kind k -> *
, when PolyKinds
is enabled).
This class is derivable in GHC with the DeriveGeneric
flag on.
A Generic1
instance must satisfy the following laws:
from1
.to1
≡id
to1
.from1
≡id
from1 :: forall (a :: k). f a -> Rep1 f a #
Convert from the datatype to its representation
to1 :: forall (a :: k). Rep1 f a -> f a #
Convert from the representation to the datatype
Instances
Generic1 ZipList | |
Generic1 Complex | |
Generic1 Identity | |
Generic1 Down | |
Generic1 Digit | |
Generic1 Elem | |
Generic1 Node | |
Generic1 ViewR | |
Generic1 Tree | |
Generic1 Stages Source # | |
Generic1 Stages Source # | |
Generic1 Stages Source # | |
Generic1 Collection Source # | |
Defined in Engine.Window.MouseButton type Rep1 Collection :: k -> Type # from1 :: forall (a :: k). Collection a -> Rep1 Collection a # to1 :: forall (a :: k). Rep1 Collection a -> Collection a # | |
Generic1 Collection Source # | |
Defined in Render.Samplers type Rep1 Collection :: k -> Type # from1 :: forall (a :: k). Collection a -> Rep1 Collection a # to1 :: forall (a :: k). Rep1 Collection a -> Collection a # | |
Generic1 Maybe | |
Generic1 NonEmpty | |
Generic1 Maybe | |
Generic1 Solo | |
Generic1 [] | |
Generic1 (WrappedMonad m :: Type -> Type) | |
Defined in Control.Applicative type Rep1 (WrappedMonad m) :: k -> Type # from1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a # to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a # | |
Generic1 (Either a :: Type -> Type) | |
Generic1 (Either a :: Type -> Type) | |
Generic1 (These a :: Type -> Type) | |
Generic1 (Pair a :: Type -> Type) | |
Generic1 (These a :: Type -> Type) | |
Generic1 ((,) a :: Type -> Type) | |
Generic1 (Proxy :: k -> Type) | |
Generic1 (U1 :: k -> Type) | |
Generic1 (V1 :: k -> Type) | |
Generic1 (WrappedArrow a b :: Type -> Type) | |
Defined in Control.Applicative type Rep1 (WrappedArrow a b) :: k -> Type # from1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 # to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 # | |
Generic1 (Kleisli m a :: Type -> TYPE LiftedRep) | |
Generic1 ((,,) a b :: Type -> Type) | |
Generic1 (Const a :: k -> Type) | |
Generic1 (Ap f :: k -> Type) | |
Generic1 (Alt f :: k -> Type) | |
Generic1 (Rec1 f :: k -> Type) | |
Generic1 (URec (Ptr ()) :: k -> Type) | |
Generic1 (URec Char :: k -> Type) | |
Generic1 (URec Double :: k -> Type) | |
Generic1 (URec Float :: k -> Type) | |
Generic1 (URec Int :: k -> Type) | |
Generic1 (URec Word :: k -> Type) | |
Generic1 ((,,,) a b c :: Type -> Type) | |
Generic1 (Product f g :: k -> Type) | |
Generic1 (Sum f g :: k -> Type) | |
Generic1 (f :*: g :: k -> Type) | |
Generic1 (f :+: g :: k -> Type) | |
Generic1 (K1 i c :: k -> Type) | |
Generic1 ((,,,,) a b c d :: Type -> Type) | |
Functor f => Generic1 (Compose f g :: k -> Type) | |
Functor f => Generic1 (f :.: g :: k -> Type) | |
Generic1 (M1 i c f :: k -> Type) | |
Generic1 (Clown f a :: k1 -> Type) | |
Generic1 (Joker g a :: k1 -> Type) | |
Generic1 (WrappedBifunctor p a :: k1 -> Type) | |
Generic1 ((,,,,,) a b c d e :: Type -> Type) | |
Generic1 (Product f g a :: k1 -> Type) | |
Generic1 (Sum p q a :: k1 -> Type) | |
Generic1 ((,,,,,,) a b c d e f :: Type -> Type) | |
Functor f => Generic1 (Tannen f p a :: k2 -> Type) | |
Generic1 ((,,,,,,,) a b c d e f g :: Type -> Type) | |
Generic1 ((,,,,,,,,) a b c d e f g h :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,) a b c d e f g h) :: k -> Type # from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, a0) -> Rep1 ((,,,,,,,,) a b c d e f g h) a0 # to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,) a b c d e f g h) a0 -> (a, b, c, d, e, f, g, h, a0) # | |
Functor (p (f a)) => Generic1 (Biff p f g a :: k3 -> Type) | |
Generic1 ((,,,,,,,,,) a b c d e f g h i :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,) a b c d e f g h i) :: k -> Type # from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, i, a0) -> Rep1 ((,,,,,,,,,) a b c d e f g h i) a0 # to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,,) a b c d e f g h i) a0 -> (a, b, c, d, e, f, g, h, i, a0) # | |
Generic1 ((,,,,,,,,,,) a b c d e f g h i j :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,,) a b c d e f g h i j) :: k -> Type # from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, i, j, a0) -> Rep1 ((,,,,,,,,,,) a b c d e f g h i j) a0 # to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,,,) a b c d e f g h i j) a0 -> (a, b, c, d, e, f, g, h, i, j, a0) # | |
Generic1 ((,,,,,,,,,,,) a b c d e f g h i j k :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) :: k -> Type # from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, a0) -> Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) a0 # to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) a0 -> (a, b, c, d, e, f, g, h, i, j, k, a0) # | |
Generic1 ((,,,,,,,,,,,,) a b c d e f g h i j k l :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) :: k -> Type # from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) a0 # to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) # | |
Generic1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) :: k -> Type # from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) a0 # to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) # | |
Generic1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n :: Type -> Type) | |
Defined in GHC.Generics type Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) :: k -> Type # from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) a0 # to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) # | |
Generic1 First | |
Generic1 Last | |
Generic1 First | |
Generic1 Last | |
Generic1 Max | |
Generic1 Min | |
Generic1 WrappedMonoid | |
Defined in Data.Semigroup type Rep1 WrappedMonoid :: k -> Type # from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a # to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a # | |
Generic1 Dual | |
Generic1 Product | |
Generic1 Sum | |
Generic1 Par1 | |
Generic1 FingerTree | |
Defined in Data.Sequence.Internal type Rep1 FingerTree :: k -> Type # from1 :: forall (a :: k). FingerTree a -> Rep1 FingerTree a # to1 :: forall (a :: k). Rep1 FingerTree a -> FingerTree a # | |
Generic1 ViewL | |
Generic1 (Arg a :: Type -> Type) | |
Generic1 (Tagged s :: Type -> Type) | |
newtype Generically1 f a where Source #
Generically1 :: f a -> Generically1 f a |