Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
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 a6989586621679570820 b6989586621679570821 f6989586621679570819. (~>) ((~>) a6989586621679570820 b6989586621679570821) ((~>) (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821))
- data FmapSym1 (arg6989586621679571211 :: (~>) a6989586621679570820 b6989586621679570821) :: forall f6989586621679570819. (~>) (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821)
- type FmapSym2 (arg6989586621679571211 :: (~>) a6989586621679570820 b6989586621679570821) (arg6989586621679571212 :: f6989586621679570819 a6989586621679570820) = Fmap arg6989586621679571211 arg6989586621679571212
- data (<$@#@$) :: forall a6989586621679570822 f6989586621679570819 b6989586621679570823. (~>) a6989586621679570822 ((~>) (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822))
- data (<$@#@$$) (arg6989586621679571215 :: a6989586621679570822) :: forall f6989586621679570819 b6989586621679570823. (~>) (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822)
- type (<$@#@$$$) (arg6989586621679571215 :: a6989586621679570822) (arg6989586621679571216 :: f6989586621679570819 b6989586621679570823) = (<$) arg6989586621679571215 arg6989586621679571216
- data ($>@#@$) :: forall f6989586621679740989 a6989586621679740990 b6989586621679740991. (~>) (f6989586621679740989 a6989586621679740990) ((~>) b6989586621679740991 (f6989586621679740989 b6989586621679740991))
- data ($>@#@$$) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) :: forall b6989586621679740991. (~>) b6989586621679740991 (f6989586621679740989 b6989586621679740991)
- type ($>@#@$$$) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) (a6989586621679741062 :: b6989586621679740991) = ($>) a6989586621679741061 a6989586621679741062
- data (<$>@#@$) :: forall a6989586621679740996 b6989586621679740997 f6989586621679740995. (~>) ((~>) a6989586621679740996 b6989586621679740997) ((~>) (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997))
- data (<$>@#@$$) (a6989586621679741077 :: (~>) a6989586621679740996 b6989586621679740997) :: forall f6989586621679740995. (~>) (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997)
- type (<$>@#@$$$) (a6989586621679741077 :: (~>) a6989586621679740996 b6989586621679740997) (a6989586621679741078 :: f6989586621679740995 a6989586621679740996) = (<$>) a6989586621679741077 a6989586621679741078
- data (<&>@#@$) :: forall f6989586621679740992 a6989586621679740993 b6989586621679740994. (~>) (f6989586621679740992 a6989586621679740993) ((~>) ((~>) a6989586621679740993 b6989586621679740994) (f6989586621679740992 b6989586621679740994))
- data (<&>@#@$$) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) :: forall b6989586621679740994. (~>) ((~>) a6989586621679740993 b6989586621679740994) (f6989586621679740992 b6989586621679740994)
- type (<&>@#@$$$) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) (a6989586621679741068 :: (~>) a6989586621679740993 b6989586621679740994) = (<&>) a6989586621679741067 a6989586621679741068
- data VoidSym0 :: forall f6989586621679740987 a6989586621679740988. (~>) (f6989586621679740987 a6989586621679740988) (f6989586621679740987 ())
- type VoidSym1 (a6989586621679741054 :: f6989586621679740987 a6989586621679740988) = Void a6989586621679741054
Documentation
class PFunctor (f :: Type -> Type) Source #
Instances
PFunctor [] Source # | |
PFunctor Maybe Source # | |
PFunctor Min Source # | |
PFunctor Max Source # | |
PFunctor First Source # | |
PFunctor Last Source # | |
PFunctor Option Source # | |
PFunctor Identity Source # | |
PFunctor First Source # | |
PFunctor Last Source # | |
PFunctor Dual Source # | |
PFunctor Sum Source # | |
PFunctor Product Source # | |
PFunctor Down Source # | |
PFunctor NonEmpty 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 #
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 Min Source # | |
SFunctor Max Source # | |
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor Option Source # | |
SFunctor Identity Source # | |
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor Dual Source # | |
SFunctor Sum Source # | |
SFunctor Product Source # | |
SFunctor Down Source # | |
SFunctor NonEmpty 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 #
Defunctionalization symbols
data FmapSym0 :: forall a6989586621679570820 b6989586621679570821 f6989586621679570819. (~>) ((~>) a6989586621679570820 b6989586621679570821) ((~>) (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679570820 ~> b6989586621679570821) (f6989586621679570819 a6989586621679570820 ~> f6989586621679570819 b6989586621679570821) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym0 :: TyFun (a6989586621679570820 ~> b6989586621679570821) (f6989586621679570819 a6989586621679570820 ~> f6989586621679570819 b6989586621679570821) -> Type) (arg6989586621679571211 :: a6989586621679570820 ~> b6989586621679570821) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679570820 ~> b6989586621679570821) (f6989586621679570819 a6989586621679570820 ~> f6989586621679570819 b6989586621679570821) -> Type) (arg6989586621679571211 :: a6989586621679570820 ~> b6989586621679570821) = FmapSym1 arg6989586621679571211 f6989586621679570819 :: TyFun (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821) -> Type |
data FmapSym1 (arg6989586621679571211 :: (~>) a6989586621679570820 b6989586621679570821) :: forall f6989586621679570819. (~>) (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821) Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 arg6989586621679571211 f6989586621679570819 :: TyFun (f6989586621679570819 a6989586621679570820) (f6989586621679570819 b6989586621679570821) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym1 arg6989586621679571211 f :: TyFun (f a) (f b) -> Type) (arg6989586621679571212 :: f a) Source # | |
type FmapSym2 (arg6989586621679571211 :: (~>) a6989586621679570820 b6989586621679570821) (arg6989586621679571212 :: f6989586621679570819 a6989586621679570820) = Fmap arg6989586621679571211 arg6989586621679571212 Source #
data (<$@#@$) :: forall a6989586621679570822 f6989586621679570819 b6989586621679570823. (~>) a6989586621679570822 ((~>) (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679570822 (f6989586621679570819 b6989586621679570823 ~> f6989586621679570819 a6989586621679570822) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$) :: TyFun a6989586621679570822 (f6989586621679570819 b6989586621679570823 ~> f6989586621679570819 a6989586621679570822) -> Type) (arg6989586621679571215 :: a6989586621679570822) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679570822 (f6989586621679570819 b6989586621679570823 ~> f6989586621679570819 a6989586621679570822) -> Type) (arg6989586621679571215 :: a6989586621679570822) = (arg6989586621679571215 <$@#@$$ f6989586621679570819) b6989586621679570823 :: TyFun (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822) -> Type |
data (<$@#@$$) (arg6989586621679571215 :: a6989586621679570822) :: forall f6989586621679570819 b6989586621679570823. (~>) (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((d <$@#@$$ f) b :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((arg6989586621679571215 <$@#@$$ f6989586621679570819) b6989586621679570823 :: TyFun (f6989586621679570819 b6989586621679570823) (f6989586621679570819 a6989586621679570822) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((arg6989586621679571215 <$@#@$$ f) b :: TyFun (f b) (f a) -> Type) (arg6989586621679571216 :: f b) Source # | |
type (<$@#@$$$) (arg6989586621679571215 :: a6989586621679570822) (arg6989586621679571216 :: f6989586621679570819 b6989586621679570823) = (<$) arg6989586621679571215 arg6989586621679571216 Source #
data ($>@#@$) :: forall f6989586621679740989 a6989586621679740990 b6989586621679740991. (~>) (f6989586621679740989 a6989586621679740990) ((~>) b6989586621679740991 (f6989586621679740989 b6989586621679740991)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679740989 a6989586621679740990) (b6989586621679740991 ~> f6989586621679740989 b6989586621679740991) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$) :: TyFun (f6989586621679740989 a6989586621679740990) (b6989586621679740991 ~> f6989586621679740989 b6989586621679740991) -> Type) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679740989 a6989586621679740990) (b6989586621679740991 ~> f6989586621679740989 b6989586621679740991) -> Type) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) = a6989586621679741061 $>@#@$$ b6989586621679740991 :: TyFun b6989586621679740991 (f6989586621679740989 b6989586621679740991) -> Type |
data ($>@#@$$) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) :: forall b6989586621679740991. (~>) b6989586621679740991 (f6989586621679740989 b6989586621679740991) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679741061 $>@#@$$ b6989586621679740991 :: TyFun b6989586621679740991 (f6989586621679740989 b6989586621679740991) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679741061 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679741062 :: b) Source # | |
type ($>@#@$$$) (a6989586621679741061 :: f6989586621679740989 a6989586621679740990) (a6989586621679741062 :: b6989586621679740991) = ($>) a6989586621679741061 a6989586621679741062 Source #
data (<$>@#@$) :: forall a6989586621679740996 b6989586621679740997 f6989586621679740995. (~>) ((~>) a6989586621679740996 b6989586621679740997) ((~>) (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679740996 ~> b6989586621679740997) (f6989586621679740995 a6989586621679740996 ~> f6989586621679740995 b6989586621679740997) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$) :: TyFun (a6989586621679740996 ~> b6989586621679740997) (f6989586621679740995 a6989586621679740996 ~> f6989586621679740995 b6989586621679740997) -> Type) (a6989586621679741077 :: a6989586621679740996 ~> b6989586621679740997) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679740996 ~> b6989586621679740997) (f6989586621679740995 a6989586621679740996 ~> f6989586621679740995 b6989586621679740997) -> Type) (a6989586621679741077 :: a6989586621679740996 ~> b6989586621679740997) = a6989586621679741077 <$>@#@$$ f6989586621679740995 :: TyFun (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997) -> Type |
data (<$>@#@$$) (a6989586621679741077 :: (~>) a6989586621679740996 b6989586621679740997) :: forall f6989586621679740995. (~>) (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679741077 <$>@#@$$ f6989586621679740995 :: TyFun (f6989586621679740995 a6989586621679740996) (f6989586621679740995 b6989586621679740997) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679741077 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679741078 :: f a) Source # | |
type (<$>@#@$$$) (a6989586621679741077 :: (~>) a6989586621679740996 b6989586621679740997) (a6989586621679741078 :: f6989586621679740995 a6989586621679740996) = (<$>) a6989586621679741077 a6989586621679741078 Source #
data (<&>@#@$) :: forall f6989586621679740992 a6989586621679740993 b6989586621679740994. (~>) (f6989586621679740992 a6989586621679740993) ((~>) ((~>) a6989586621679740993 b6989586621679740994) (f6989586621679740992 b6989586621679740994)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679740992 a6989586621679740993) ((a6989586621679740993 ~> b6989586621679740994) ~> f6989586621679740992 b6989586621679740994) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$) :: TyFun (f6989586621679740992 a6989586621679740993) ((a6989586621679740993 ~> b6989586621679740994) ~> f6989586621679740992 b6989586621679740994) -> Type) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679740992 a6989586621679740993) ((a6989586621679740993 ~> b6989586621679740994) ~> f6989586621679740992 b6989586621679740994) -> Type) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) = a6989586621679741067 <&>@#@$$ b6989586621679740994 :: TyFun (a6989586621679740993 ~> b6989586621679740994) (f6989586621679740992 b6989586621679740994) -> Type |
data (<&>@#@$$) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) :: forall b6989586621679740994. (~>) ((~>) a6989586621679740993 b6989586621679740994) (f6989586621679740992 b6989586621679740994) infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679741067 <&>@#@$$ b6989586621679740994 :: TyFun (a6989586621679740993 ~> b6989586621679740994) (f6989586621679740992 b6989586621679740994) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679741067 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679741068 :: a ~> b) Source # | |
type (<&>@#@$$$) (a6989586621679741067 :: f6989586621679740992 a6989586621679740993) (a6989586621679741068 :: (~>) a6989586621679740993 b6989586621679740994) = (<&>) a6989586621679741067 a6989586621679741068 Source #
data VoidSym0 :: forall f6989586621679740987 a6989586621679740988. (~>) (f6989586621679740987 a6989586621679740988) (f6989586621679740987 ()) Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679740987 a6989586621679740988) (f6989586621679740987 ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679741054 :: f a) Source # | |
type VoidSym1 (a6989586621679741054 :: f6989586621679740987 a6989586621679740988) = Void a6989586621679741054 Source #