Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.Singletons.Prelude.Functor
Description
Defines the promoted and singled versions of the Functor
type class.
Synopsis
- class PFunctor (f :: Type -> Type) where
- class SFunctor (f :: Type -> Type) where
- type family (a :: f a) $> (a :: b) :: f b where ...
- (%$>) :: forall f a b (t :: f a) (t :: b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: f b)
- type family (a :: (~>) a b) <$> (a :: f a) :: f b where ...
- (%<$>) :: forall a b f (t :: (~>) a b) (t :: f a). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<$>@#@$) t) t :: f b)
- type family (a :: f a) <&> (a :: (~>) a b) :: f b where ...
- (%<&>) :: forall f a b (t :: f a) (t :: (~>) a b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<&>@#@$) t) t :: f b)
- type family Void (a :: f a) :: f () where ...
- sVoid :: forall f a (t :: f a). SFunctor f => Sing t -> Sing (Apply VoidSym0 t :: f ())
- data FmapSym0 :: forall a6989586621679566946 b6989586621679566947 f6989586621679566945. (~>) ((~>) a6989586621679566946 b6989586621679566947) ((~>) (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947))
- data FmapSym1 (arg6989586621679567337 :: (~>) a6989586621679566946 b6989586621679566947) :: forall f6989586621679566945. (~>) (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947)
- type FmapSym2 (arg6989586621679567337 :: (~>) a6989586621679566946 b6989586621679566947) (arg6989586621679567338 :: f6989586621679566945 a6989586621679566946) = Fmap arg6989586621679567337 arg6989586621679567338
- data (<$@#@$) :: forall a6989586621679566948 f6989586621679566945 b6989586621679566949. (~>) a6989586621679566948 ((~>) (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948))
- data (<$@#@$$) (arg6989586621679567341 :: a6989586621679566948) :: forall f6989586621679566945 b6989586621679566949. (~>) (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948)
- type (<$@#@$$$) (arg6989586621679567341 :: a6989586621679566948) (arg6989586621679567342 :: f6989586621679566945 b6989586621679566949) = (<$) arg6989586621679567341 arg6989586621679567342
- data ($>@#@$) :: forall f6989586621679737115 a6989586621679737116 b6989586621679737117. (~>) (f6989586621679737115 a6989586621679737116) ((~>) b6989586621679737117 (f6989586621679737115 b6989586621679737117))
- data ($>@#@$$) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) :: forall b6989586621679737117. (~>) b6989586621679737117 (f6989586621679737115 b6989586621679737117)
- type ($>@#@$$$) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) (a6989586621679737188 :: b6989586621679737117) = ($>) a6989586621679737187 a6989586621679737188
- data (<$>@#@$) :: forall a6989586621679737122 b6989586621679737123 f6989586621679737121. (~>) ((~>) a6989586621679737122 b6989586621679737123) ((~>) (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123))
- data (<$>@#@$$) (a6989586621679737203 :: (~>) a6989586621679737122 b6989586621679737123) :: forall f6989586621679737121. (~>) (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123)
- type (<$>@#@$$$) (a6989586621679737203 :: (~>) a6989586621679737122 b6989586621679737123) (a6989586621679737204 :: f6989586621679737121 a6989586621679737122) = (<$>) a6989586621679737203 a6989586621679737204
- data (<&>@#@$) :: forall f6989586621679737118 a6989586621679737119 b6989586621679737120. (~>) (f6989586621679737118 a6989586621679737119) ((~>) ((~>) a6989586621679737119 b6989586621679737120) (f6989586621679737118 b6989586621679737120))
- data (<&>@#@$$) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) :: forall b6989586621679737120. (~>) ((~>) a6989586621679737119 b6989586621679737120) (f6989586621679737118 b6989586621679737120)
- type (<&>@#@$$$) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) (a6989586621679737194 :: (~>) a6989586621679737119 b6989586621679737120) = (<&>) a6989586621679737193 a6989586621679737194
- data VoidSym0 :: forall f6989586621679737113 a6989586621679737114. (~>) (f6989586621679737113 a6989586621679737114) (f6989586621679737113 ())
- type VoidSym1 (a6989586621679737180 :: f6989586621679737113 a6989586621679737114) = Void a6989586621679737180
Documentation
class PFunctor (f :: Type -> Type) Source #
Instances
PFunctor [] Source # | |
PFunctor Maybe Source # | |
PFunctor NonEmpty Source # | |
PFunctor Down Source # | |
PFunctor Identity Source # | |
PFunctor First Source # | |
PFunctor Last Source # | |
PFunctor Max Source # | |
PFunctor Min Source # | |
PFunctor Option Source # | |
PFunctor Dual Source # | |
PFunctor Product Source # | |
PFunctor Sum Source # | |
PFunctor First Source # | |
PFunctor Last Source # | |
PFunctor (Either a) Source # | |
PFunctor ((,) a) Source # | |
PFunctor (Arg a) Source # | |
PFunctor (Const m :: Type -> Type) Source # | |
class SFunctor (f :: Type -> Type) where Source #
Minimal complete definition
Methods
sFmap :: forall a b (t :: (~>) a b) (t :: f a). Sing t -> Sing t -> Sing (Apply (Apply FmapSym0 t) t :: f b) Source #
(%<$) :: forall a b (t :: a) (t :: f b). Sing t -> Sing t -> Sing (Apply (Apply (<$@#@$) t) t :: f a) infixl 4 Source #
Instances
SFunctor [] Source # | |
SFunctor Maybe Source # | |
SFunctor NonEmpty Source # | |
SFunctor Down Source # | |
SFunctor Identity Source # | |
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor Max Source # | |
SFunctor Min Source # | |
SFunctor Option Source # | |
SFunctor Dual Source # | |
SFunctor Product Source # | |
SFunctor Sum Source # | |
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor (Either a) Source # | |
SFunctor ((,) a) Source # | |
SFunctor (Arg a) Source # | |
SFunctor (Const m :: Type -> Type) Source # | |
(%$>) :: forall f a b (t :: f a) (t :: b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: f b) infixl 4 Source #
(%<$>) :: forall a b f (t :: (~>) a b) (t :: f a). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<$>@#@$) t) t :: f b) infixl 4 Source #
(%<&>) :: forall f a b (t :: f a) (t :: (~>) a b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<&>@#@$) t) t :: f b) infixl 1 Source #
type family Void (a :: f a) :: f () where ... Source #
Equations
Void x = Apply (Apply (<$@#@$) Tuple0Sym0) x |
Defunctionalization symbols
data FmapSym0 :: forall a6989586621679566946 b6989586621679566947 f6989586621679566945. (~>) ((~>) a6989586621679566946 b6989586621679566947) ((~>) (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679566946 ~> b6989586621679566947) (f6989586621679566945 a6989586621679566946 ~> f6989586621679566945 b6989586621679566947) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym0 :: TyFun (a6989586621679566946 ~> b6989586621679566947) (f6989586621679566945 a6989586621679566946 ~> f6989586621679566945 b6989586621679566947) -> Type) (arg6989586621679567337 :: a6989586621679566946 ~> b6989586621679566947) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679566946 ~> b6989586621679566947) (f6989586621679566945 a6989586621679566946 ~> f6989586621679566945 b6989586621679566947) -> Type) (arg6989586621679567337 :: a6989586621679566946 ~> b6989586621679566947) = FmapSym1 arg6989586621679567337 f6989586621679566945 :: TyFun (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947) -> Type |
data FmapSym1 (arg6989586621679567337 :: (~>) a6989586621679566946 b6989586621679566947) :: forall f6989586621679566945. (~>) (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947) Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 arg6989586621679567337 f6989586621679566945 :: TyFun (f6989586621679566945 a6989586621679566946) (f6989586621679566945 b6989586621679566947) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym1 arg6989586621679567337 f :: TyFun (f a) (f b) -> Type) (arg6989586621679567338 :: f a) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal |
type FmapSym2 (arg6989586621679567337 :: (~>) a6989586621679566946 b6989586621679566947) (arg6989586621679567338 :: f6989586621679566945 a6989586621679566946) = Fmap arg6989586621679567337 arg6989586621679567338 Source #
data (<$@#@$) :: forall a6989586621679566948 f6989586621679566945 b6989586621679566949. (~>) a6989586621679566948 ((~>) (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679566948 (f6989586621679566945 b6989586621679566949 ~> f6989586621679566945 a6989586621679566948) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$) :: TyFun a6989586621679566948 (f6989586621679566945 b6989586621679566949 ~> f6989586621679566945 a6989586621679566948) -> Type) (arg6989586621679567341 :: a6989586621679566948) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679566948 (f6989586621679566945 b6989586621679566949 ~> f6989586621679566945 a6989586621679566948) -> Type) (arg6989586621679567341 :: a6989586621679566948) = (arg6989586621679567341 <$@#@$$ f6989586621679566945) b6989586621679566949 :: TyFun (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948) -> Type |
data (<$@#@$$) (arg6989586621679567341 :: a6989586621679566948) :: forall f6989586621679566945 b6989586621679566949. (~>) (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((d <$@#@$$ f) b :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((arg6989586621679567341 <$@#@$$ f6989586621679566945) b6989586621679566949 :: TyFun (f6989586621679566945 b6989586621679566949) (f6989586621679566945 a6989586621679566948) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
type Apply ((arg6989586621679567341 <$@#@$$ f) b :: TyFun (f b) (f a) -> Type) (arg6989586621679567342 :: f b) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal |
type (<$@#@$$$) (arg6989586621679567341 :: a6989586621679566948) (arg6989586621679567342 :: f6989586621679566945 b6989586621679566949) = (<$) arg6989586621679567341 arg6989586621679567342 Source #
data ($>@#@$) :: forall f6989586621679737115 a6989586621679737116 b6989586621679737117. (~>) (f6989586621679737115 a6989586621679737116) ((~>) b6989586621679737117 (f6989586621679737115 b6989586621679737117)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679737115 a6989586621679737116) (b6989586621679737117 ~> f6989586621679737115 b6989586621679737117) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$) :: TyFun (f6989586621679737115 a6989586621679737116) (b6989586621679737117 ~> f6989586621679737115 b6989586621679737117) -> Type) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679737115 a6989586621679737116) (b6989586621679737117 ~> f6989586621679737115 b6989586621679737117) -> Type) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) = a6989586621679737187 $>@#@$$ b6989586621679737117 :: TyFun b6989586621679737117 (f6989586621679737115 b6989586621679737117) -> Type |
data ($>@#@$$) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) :: forall b6989586621679737117. (~>) b6989586621679737117 (f6989586621679737115 b6989586621679737117) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679737187 $>@#@$$ b6989586621679737117 :: TyFun b6989586621679737117 (f6989586621679737115 b6989586621679737117) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679737187 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679737188 :: b) Source # | |
Defined in Data.Singletons.Prelude.Functor |
type ($>@#@$$$) (a6989586621679737187 :: f6989586621679737115 a6989586621679737116) (a6989586621679737188 :: b6989586621679737117) = ($>) a6989586621679737187 a6989586621679737188 Source #
data (<$>@#@$) :: forall a6989586621679737122 b6989586621679737123 f6989586621679737121. (~>) ((~>) a6989586621679737122 b6989586621679737123) ((~>) (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679737122 ~> b6989586621679737123) (f6989586621679737121 a6989586621679737122 ~> f6989586621679737121 b6989586621679737123) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$) :: TyFun (a6989586621679737122 ~> b6989586621679737123) (f6989586621679737121 a6989586621679737122 ~> f6989586621679737121 b6989586621679737123) -> Type) (a6989586621679737203 :: a6989586621679737122 ~> b6989586621679737123) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679737122 ~> b6989586621679737123) (f6989586621679737121 a6989586621679737122 ~> f6989586621679737121 b6989586621679737123) -> Type) (a6989586621679737203 :: a6989586621679737122 ~> b6989586621679737123) = a6989586621679737203 <$>@#@$$ f6989586621679737121 :: TyFun (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123) -> Type |
data (<$>@#@$$) (a6989586621679737203 :: (~>) a6989586621679737122 b6989586621679737123) :: forall f6989586621679737121. (~>) (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679737203 <$>@#@$$ f6989586621679737121 :: TyFun (f6989586621679737121 a6989586621679737122) (f6989586621679737121 b6989586621679737123) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679737203 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679737204 :: f a) Source # | |
Defined in Data.Singletons.Prelude.Functor |
type (<$>@#@$$$) (a6989586621679737203 :: (~>) a6989586621679737122 b6989586621679737123) (a6989586621679737204 :: f6989586621679737121 a6989586621679737122) = (<$>) a6989586621679737203 a6989586621679737204 Source #
data (<&>@#@$) :: forall f6989586621679737118 a6989586621679737119 b6989586621679737120. (~>) (f6989586621679737118 a6989586621679737119) ((~>) ((~>) a6989586621679737119 b6989586621679737120) (f6989586621679737118 b6989586621679737120)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679737118 a6989586621679737119) ((a6989586621679737119 ~> b6989586621679737120) ~> f6989586621679737118 b6989586621679737120) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$) :: TyFun (f6989586621679737118 a6989586621679737119) ((a6989586621679737119 ~> b6989586621679737120) ~> f6989586621679737118 b6989586621679737120) -> Type) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679737118 a6989586621679737119) ((a6989586621679737119 ~> b6989586621679737120) ~> f6989586621679737118 b6989586621679737120) -> Type) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) = a6989586621679737193 <&>@#@$$ b6989586621679737120 :: TyFun (a6989586621679737119 ~> b6989586621679737120) (f6989586621679737118 b6989586621679737120) -> Type |
data (<&>@#@$$) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) :: forall b6989586621679737120. (~>) ((~>) a6989586621679737119 b6989586621679737120) (f6989586621679737118 b6989586621679737120) infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679737193 <&>@#@$$ b6989586621679737120 :: TyFun (a6989586621679737119 ~> b6989586621679737120) (f6989586621679737118 b6989586621679737120) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679737193 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679737194 :: a ~> b) Source # | |
type (<&>@#@$$$) (a6989586621679737193 :: f6989586621679737118 a6989586621679737119) (a6989586621679737194 :: (~>) a6989586621679737119 b6989586621679737120) = (<&>) a6989586621679737193 a6989586621679737194 Source #
data VoidSym0 :: forall f6989586621679737113 a6989586621679737114. (~>) (f6989586621679737113 a6989586621679737114) (f6989586621679737113 ()) Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679737113 a6989586621679737114) (f6989586621679737113 ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679737180 :: f a) Source # | |
Defined in Data.Singletons.Prelude.Functor |
type VoidSym1 (a6989586621679737180 :: f6989586621679737113 a6989586621679737114) = Void a6989586621679737180 Source #