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 where
- class SFunctor f 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 :: (~>) ((~>) a b) ((~>) (f a) (f b))
- data FmapSym1 (a6989586621679319155 :: (~>) a b) :: (~>) (f a) (f b)
- type family FmapSym2 (a6989586621679319155 :: (~>) a b) (a6989586621679319156 :: f a) :: f b where ...
- data (<$@#@$) :: (~>) a ((~>) (f b) (f a))
- data (<$@#@$$) (a6989586621679319160 :: a) :: (~>) (f b) (f a)
- type family (a6989586621679319160 :: a) <$@#@$$$ (a6989586621679319161 :: f b) :: f a where ...
- data ($>@#@$) :: (~>) (f a) ((~>) b (f b))
- data ($>@#@$$) (a6989586621679497613 :: f a) :: (~>) b (f b)
- type family (a6989586621679497613 :: f a) $>@#@$$$ (a6989586621679497614 :: b) :: f b where ...
- data (<$>@#@$) :: (~>) ((~>) a b) ((~>) (f a) (f b))
- data (<$>@#@$$) (a6989586621679497631 :: (~>) a b) :: (~>) (f a) (f b)
- type family (a6989586621679497631 :: (~>) a b) <$>@#@$$$ (a6989586621679497632 :: f a) :: f b where ...
- data (<&>@#@$) :: (~>) (f a) ((~>) ((~>) a b) (f b))
- data (<&>@#@$$) (a6989586621679497620 :: f a) :: (~>) ((~>) a b) (f b)
- type family (a6989586621679497620 :: f a) <&>@#@$$$ (a6989586621679497621 :: (~>) a b) :: f b where ...
- data VoidSym0 :: (~>) (f a) (f ())
- type family VoidSym1 (a6989586621679497604 :: f a) :: f () where ...
Documentation
Instances
PFunctor [] Source # | |
PFunctor Maybe Source # | |
PFunctor Min Source # | |
PFunctor Max Source # | |
PFunctor First Source # | |
PFunctor Last 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 (Proxy :: Type -> Type) Source # | |
PFunctor (Const m :: Type -> Type) Source # | |
class SFunctor f 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 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 (Proxy :: Type -> Type) 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 :: (~>) ((~>) a b) ((~>) (f a) (f b)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679319155 :: a ~> b) Source # | |
data FmapSym1 (a6989586621679319155 :: (~>) a b) :: (~>) (f a) (f b) Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings (FmapSym1 a6989586621679319155 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply (FmapSym1 a6989586621679319155 :: TyFun (f a) (f b) -> Type) (a6989586621679319156 :: f a) Source # | |
type family FmapSym2 (a6989586621679319155 :: (~>) a b) (a6989586621679319156 :: f a) :: f b where ... Source #
data (<$@#@$) :: (~>) a ((~>) (f b) (f a)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) (a6989586621679319160 :: a) Source # | |
data (<$@#@$$) (a6989586621679319160 :: a) :: (~>) (f b) (f a) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((<$@#@$$) d :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings ((<$@#@$$) a6989586621679319160 :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply ((<$@#@$$) a6989586621679319160 :: TyFun (f b) (f a) -> Type) (a6989586621679319161 :: f b) Source # | |
type family (a6989586621679319160 :: a) <$@#@$$$ (a6989586621679319161 :: f b) :: f a where ... infixl 4 Source #
data ($>@#@$) :: (~>) (f a) ((~>) b (f b)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) (a6989586621679497613 :: f a) Source # | |
data ($>@#@$$) (a6989586621679497613 :: f a) :: (~>) b (f b) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (($>@#@$$) d :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings (($>@#@$$) a6989586621679497613 :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (($>@#@$$) a6989586621679497613 :: TyFun b (f b) -> Type) (a6989586621679497614 :: b) Source # | |
type family (a6989586621679497613 :: f a) $>@#@$$$ (a6989586621679497614 :: b) :: f b where ... infixl 4 Source #
data (<$>@#@$) :: (~>) ((~>) a b) ((~>) (f a) (f b)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679497631 :: a ~> b) Source # | |
data (<$>@#@$$) (a6989586621679497631 :: (~>) a b) :: (~>) (f a) (f b) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((<$>@#@$$) d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons sing :: Sing ((<$>@#@$$) d) # | |
SuppressUnusedWarnings ((<$>@#@$$) a6989586621679497631 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<$>@#@$$) a6989586621679497631 :: TyFun (f a) (f b) -> Type) (a6989586621679497632 :: f a) Source # | |
Defined in Data.Functor.Singletons type Apply ((<$>@#@$$) a6989586621679497631 :: TyFun (f a) (f b) -> Type) (a6989586621679497632 :: f a) = a6989586621679497631 <$> a6989586621679497632 |
type family (a6989586621679497631 :: (~>) a b) <$>@#@$$$ (a6989586621679497632 :: f a) :: f b where ... infixl 4 Source #
data (<&>@#@$) :: (~>) (f a) ((~>) ((~>) a b) (f b)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) (a6989586621679497620 :: f a) Source # | |
data (<&>@#@$$) (a6989586621679497620 :: f a) :: (~>) ((~>) a b) (f b) infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI ((<&>@#@$$) d :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons sing :: Sing ((<&>@#@$$) d) # | |
SuppressUnusedWarnings ((<&>@#@$$) a6989586621679497620 :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<&>@#@$$) a6989586621679497620 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679497621 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons |
type family (a6989586621679497620 :: f a) <&>@#@$$$ (a6989586621679497621 :: (~>) a b) :: f b where ... infixl 1 Source #
data VoidSym0 :: (~>) (f a) (f ()) Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679497604 :: f a) Source # | |