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 f a b (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 a6989586621679536044 b6989586621679536045 f6989586621679536043. (~>) ((~>) a6989586621679536044 b6989586621679536045) ((~>) (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045))
- data FmapSym1 (arg6989586621679536437 :: (~>) a6989586621679536044 b6989586621679536045) :: forall f6989586621679536043. (~>) (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045)
- type FmapSym2 (arg6989586621679536437 :: (~>) a6989586621679536044 b6989586621679536045) (arg6989586621679536438 :: f6989586621679536043 a6989586621679536044) = Fmap arg6989586621679536437 arg6989586621679536438
- data (<$@#@$) :: forall a6989586621679536046 b6989586621679536047 f6989586621679536043. (~>) a6989586621679536046 ((~>) (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046))
- data (<$@#@$$) (arg6989586621679536441 :: a6989586621679536046) :: forall b6989586621679536047 f6989586621679536043. (~>) (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046)
- type (<$@#@$$$) (arg6989586621679536441 :: a6989586621679536046) (arg6989586621679536442 :: f6989586621679536043 b6989586621679536047) = (<$) arg6989586621679536441 arg6989586621679536442
- data ($>@#@$) :: forall a6989586621679705373 b6989586621679705374 f6989586621679705372. (~>) (f6989586621679705372 a6989586621679705373) ((~>) b6989586621679705374 (f6989586621679705372 b6989586621679705374))
- data ($>@#@$$) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) :: forall b6989586621679705374. (~>) b6989586621679705374 (f6989586621679705372 b6989586621679705374)
- type ($>@#@$$$) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) (a6989586621679705450 :: b6989586621679705374) = ($>) a6989586621679705449 a6989586621679705450
- data (<$>@#@$) :: forall a6989586621679705379 b6989586621679705380 f6989586621679705378. (~>) ((~>) a6989586621679705379 b6989586621679705380) ((~>) (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380))
- data (<$>@#@$$) (a6989586621679705459 :: (~>) a6989586621679705379 b6989586621679705380) :: forall f6989586621679705378. (~>) (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380)
- type (<$>@#@$$$) (a6989586621679705459 :: (~>) a6989586621679705379 b6989586621679705380) (a6989586621679705460 :: f6989586621679705378 a6989586621679705379) = (<$>) a6989586621679705459 a6989586621679705460
- data (<&>@#@$) :: forall a6989586621679705376 b6989586621679705377 f6989586621679705375. (~>) (f6989586621679705375 a6989586621679705376) ((~>) ((~>) a6989586621679705376 b6989586621679705377) (f6989586621679705375 b6989586621679705377))
- data (<&>@#@$$) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) :: forall b6989586621679705377. (~>) ((~>) a6989586621679705376 b6989586621679705377) (f6989586621679705375 b6989586621679705377)
- type (<&>@#@$$$) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) (a6989586621679705466 :: (~>) a6989586621679705376 b6989586621679705377) = (<&>) a6989586621679705465 a6989586621679705466
- data VoidSym0 :: forall a6989586621679705371 f6989586621679705370. (~>) (f6989586621679705370 a6989586621679705371) (f6989586621679705370 ())
- type VoidSym1 (a6989586621679705442 :: f6989586621679705370 a6989586621679705371) = Void a6989586621679705442
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 #
(%<$) :: forall a b (t :: a) (t :: f b). (Apply (Apply (<$@#@$) t) t :: f a) ~ Apply (Apply TFHelper_6989586621679536457Sym0 t) t => 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 f a b (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 a6989586621679536044 b6989586621679536045 f6989586621679536043. (~>) ((~>) a6989586621679536044 b6989586621679536045) ((~>) (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679536044 ~> b6989586621679536045) (f6989586621679536043 a6989586621679536044 ~> f6989586621679536043 b6989586621679536045) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym0 :: TyFun (a6989586621679536044 ~> b6989586621679536045) (f6989586621679536043 a6989586621679536044 ~> f6989586621679536043 b6989586621679536045) -> Type) (arg6989586621679536437 :: a6989586621679536044 ~> b6989586621679536045) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679536044 ~> b6989586621679536045) (f6989586621679536043 a6989586621679536044 ~> f6989586621679536043 b6989586621679536045) -> Type) (arg6989586621679536437 :: a6989586621679536044 ~> b6989586621679536045) = (FmapSym1 arg6989586621679536437 f6989586621679536043 :: TyFun (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045) -> Type) |
data FmapSym1 (arg6989586621679536437 :: (~>) a6989586621679536044 b6989586621679536045) :: forall f6989586621679536043. (~>) (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045) Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 arg6989586621679536437 f6989586621679536043 :: TyFun (f6989586621679536043 a6989586621679536044) (f6989586621679536043 b6989586621679536045) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym1 arg6989586621679536437 f :: TyFun (f a) (f b) -> Type) (arg6989586621679536438 :: f a) Source # | |
type FmapSym2 (arg6989586621679536437 :: (~>) a6989586621679536044 b6989586621679536045) (arg6989586621679536438 :: f6989586621679536043 a6989586621679536044) = Fmap arg6989586621679536437 arg6989586621679536438 Source #
data (<$@#@$) :: forall a6989586621679536046 b6989586621679536047 f6989586621679536043. (~>) a6989586621679536046 ((~>) (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679536046 (f6989586621679536043 b6989586621679536047 ~> f6989586621679536043 a6989586621679536046) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$) :: TyFun a6989586621679536046 (f6989586621679536043 b6989586621679536047 ~> f6989586621679536043 a6989586621679536046) -> Type) (arg6989586621679536441 :: a6989586621679536046) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679536046 (f6989586621679536043 b6989586621679536047 ~> f6989586621679536043 a6989586621679536046) -> Type) (arg6989586621679536441 :: a6989586621679536046) = ((arg6989586621679536441 <$@#@$$ b6989586621679536047) f6989586621679536043 :: TyFun (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046) -> Type) |
data (<$@#@$$) (arg6989586621679536441 :: a6989586621679536046) :: forall b6989586621679536047 f6989586621679536043. (~>) (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((d <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((arg6989586621679536441 <$@#@$$ b6989586621679536047) f6989586621679536043 :: TyFun (f6989586621679536043 b6989586621679536047) (f6989586621679536043 a6989586621679536046) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((arg6989586621679536441 <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) (arg6989586621679536442 :: f b) Source # | |
type (<$@#@$$$) (arg6989586621679536441 :: a6989586621679536046) (arg6989586621679536442 :: f6989586621679536043 b6989586621679536047) = (<$) arg6989586621679536441 arg6989586621679536442 Source #
data ($>@#@$) :: forall a6989586621679705373 b6989586621679705374 f6989586621679705372. (~>) (f6989586621679705372 a6989586621679705373) ((~>) b6989586621679705374 (f6989586621679705372 b6989586621679705374)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679705372 a6989586621679705373) (b6989586621679705374 ~> f6989586621679705372 b6989586621679705374) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$) :: TyFun (f6989586621679705372 a6989586621679705373) (b6989586621679705374 ~> f6989586621679705372 b6989586621679705374) -> Type) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679705372 a6989586621679705373) (b6989586621679705374 ~> f6989586621679705372 b6989586621679705374) -> Type) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) = (a6989586621679705449 $>@#@$$ b6989586621679705374 :: TyFun b6989586621679705374 (f6989586621679705372 b6989586621679705374) -> Type) |
data ($>@#@$$) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) :: forall b6989586621679705374. (~>) b6989586621679705374 (f6989586621679705372 b6989586621679705374) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679705449 $>@#@$$ b6989586621679705374 :: TyFun b6989586621679705374 (f6989586621679705372 b6989586621679705374) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679705449 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679705450 :: b) Source # | |
type ($>@#@$$$) (a6989586621679705449 :: f6989586621679705372 a6989586621679705373) (a6989586621679705450 :: b6989586621679705374) = ($>) a6989586621679705449 a6989586621679705450 Source #
data (<$>@#@$) :: forall a6989586621679705379 b6989586621679705380 f6989586621679705378. (~>) ((~>) a6989586621679705379 b6989586621679705380) ((~>) (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679705379 ~> b6989586621679705380) (f6989586621679705378 a6989586621679705379 ~> f6989586621679705378 b6989586621679705380) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$) :: TyFun (a6989586621679705379 ~> b6989586621679705380) (f6989586621679705378 a6989586621679705379 ~> f6989586621679705378 b6989586621679705380) -> Type) (a6989586621679705459 :: a6989586621679705379 ~> b6989586621679705380) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679705379 ~> b6989586621679705380) (f6989586621679705378 a6989586621679705379 ~> f6989586621679705378 b6989586621679705380) -> Type) (a6989586621679705459 :: a6989586621679705379 ~> b6989586621679705380) = (a6989586621679705459 <$>@#@$$ f6989586621679705378 :: TyFun (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380) -> Type) |
data (<$>@#@$$) (a6989586621679705459 :: (~>) a6989586621679705379 b6989586621679705380) :: forall f6989586621679705378. (~>) (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679705459 <$>@#@$$ f6989586621679705378 :: TyFun (f6989586621679705378 a6989586621679705379) (f6989586621679705378 b6989586621679705380) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679705459 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679705460 :: f a) Source # | |
type (<$>@#@$$$) (a6989586621679705459 :: (~>) a6989586621679705379 b6989586621679705380) (a6989586621679705460 :: f6989586621679705378 a6989586621679705379) = (<$>) a6989586621679705459 a6989586621679705460 Source #
data (<&>@#@$) :: forall a6989586621679705376 b6989586621679705377 f6989586621679705375. (~>) (f6989586621679705375 a6989586621679705376) ((~>) ((~>) a6989586621679705376 b6989586621679705377) (f6989586621679705375 b6989586621679705377)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679705375 a6989586621679705376) ((a6989586621679705376 ~> b6989586621679705377) ~> f6989586621679705375 b6989586621679705377) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$) :: TyFun (f6989586621679705375 a6989586621679705376) ((a6989586621679705376 ~> b6989586621679705377) ~> f6989586621679705375 b6989586621679705377) -> Type) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679705375 a6989586621679705376) ((a6989586621679705376 ~> b6989586621679705377) ~> f6989586621679705375 b6989586621679705377) -> Type) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) = (a6989586621679705465 <&>@#@$$ b6989586621679705377 :: TyFun (a6989586621679705376 ~> b6989586621679705377) (f6989586621679705375 b6989586621679705377) -> Type) |
data (<&>@#@$$) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) :: forall b6989586621679705377. (~>) ((~>) a6989586621679705376 b6989586621679705377) (f6989586621679705375 b6989586621679705377) infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679705465 <&>@#@$$ b6989586621679705377 :: TyFun (a6989586621679705376 ~> b6989586621679705377) (f6989586621679705375 b6989586621679705377) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679705465 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679705466 :: a ~> b) Source # | |
type (<&>@#@$$$) (a6989586621679705465 :: f6989586621679705375 a6989586621679705376) (a6989586621679705466 :: (~>) a6989586621679705376 b6989586621679705377) = (<&>) a6989586621679705465 a6989586621679705466 Source #
data VoidSym0 :: forall a6989586621679705371 f6989586621679705370. (~>) (f6989586621679705370 a6989586621679705371) (f6989586621679705370 ()) Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679705370 a6989586621679705371) (f6989586621679705370 ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679705442 :: f a) Source # | |
type VoidSym1 (a6989586621679705442 :: f6989586621679705370 a6989586621679705371) = Void a6989586621679705442 Source #