Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | GHC2021 |
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 (a1 :: f a) $> (a2 :: b) :: f b where ...
- (%$>) :: forall (f :: Type -> Type) a b (t1 :: f a) (t2 :: b). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 $> t2)
- type family (a1 :: a ~> b) <$> (a2 :: f a) :: f b where ...
- (%<$>) :: forall a b (f :: Type -> Type) (t1 :: a ~> b) (t2 :: f a). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 <$> t2)
- type family (a1 :: f a) <&> (a2 :: a ~> b) :: f b where ...
- (%<&>) :: forall (f :: Type -> Type) a b (t1 :: f a) (t2 :: a ~> b). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 <&> t2)
- type family Void (a1 :: f a) :: f () where ...
- sVoid :: forall (f :: Type -> Type) a (t :: f a). SFunctor f => Sing t -> Sing (Void t)
- data FmapSym0 (a1 :: TyFun (a ~> b) (f a ~> f b))
- data FmapSym1 (a6989586621679271227 :: a ~> b) (b1 :: TyFun (f a) (f b))
- type family FmapSym2 (a6989586621679271227 :: a ~> b) (a6989586621679271228 :: f a) :: f b where ...
- data (<$@#@$) (a1 :: TyFun a (f b ~> f a))
- data (a6989586621679271232 :: a) <$@#@$$ (b1 :: TyFun (f b) (f a))
- type family (a6989586621679271232 :: a) <$@#@$$$ (a6989586621679271233 :: f b) :: f a where ...
- data ($>@#@$) (a1 :: TyFun (f a) (b ~> f b))
- data (a6989586621679357502 :: f a) $>@#@$$ (b1 :: TyFun b (f b))
- type family (a6989586621679357502 :: f a) $>@#@$$$ (a6989586621679357503 :: b) :: f b where ...
- data (<$>@#@$) (a1 :: TyFun (a ~> b) (f a ~> f b))
- data (a6989586621679357520 :: a ~> b) <$>@#@$$ (b1 :: TyFun (f a) (f b))
- type family (a6989586621679357520 :: a ~> b) <$>@#@$$$ (a6989586621679357521 :: f a) :: f b where ...
- data (<&>@#@$) (a1 :: TyFun (f a) ((a ~> b) ~> f b))
- data (a6989586621679357509 :: f a) <&>@#@$$ (b1 :: TyFun (a ~> b) (f b))
- type family (a6989586621679357509 :: f a) <&>@#@$$$ (a6989586621679357510 :: a ~> b) :: f b where ...
- data VoidSym0 (a1 :: TyFun (f a) (f ()))
- type family VoidSym1 (a6989586621679357493 :: f a) :: f () where ...
Documentation
class PFunctor (f :: Type -> Type) Source #
type Fmap (arg :: a ~> b) (arg1 :: f a) :: f b Source #
type (arg :: a) <$ (arg1 :: f b) :: f a infixl 4 Source #
type (arg :: a) <$ (arg1 :: f b) = TFHelper_6989586621679271236 arg arg1
Instances
class SFunctor (f :: Type -> Type) where Source #
sFmap :: forall a b (t1 :: a ~> b) (t2 :: f a). Sing t1 -> Sing t2 -> Sing (Fmap t1 t2) Source #
(%<$) :: forall a b (t1 :: a) (t2 :: f b). Sing t1 -> Sing t2 -> Sing (t1 <$ t2) infixl 4 Source #
Instances
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor Max Source # | |
SFunctor Min Source # | |
SFunctor NonEmpty Source # | |
SFunctor Identity Source # | |
SFunctor First Source # | |
SFunctor Last Source # | |
SFunctor Down Source # | |
SFunctor Dual Source # | |
SFunctor Product Source # | |
SFunctor Sum Source # | |
SFunctor Maybe Source # | |
SFunctor [] Source # | |
SFunctor (Arg a) Source # | |
SFunctor (Either a) Source # | |
SFunctor (Proxy :: Type -> Type) Source # | |
SFunctor ((,) a) Source # | |
SFunctor (Const m :: Type -> Type) Source # | |
(SFunctor f, SFunctor g) => SFunctor (Product f g) Source # | |
(SFunctor f, SFunctor g) => SFunctor (Sum f g) Source # | |
(SFunctor f, SFunctor g) => SFunctor (Compose f g) Source # | |
(%$>) :: forall (f :: Type -> Type) a b (t1 :: f a) (t2 :: b). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 $> t2) infixl 4 Source #
(%<$>) :: forall a b (f :: Type -> Type) (t1 :: a ~> b) (t2 :: f a). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 <$> t2) infixl 4 Source #
(%<&>) :: forall (f :: Type -> Type) a b (t1 :: f a) (t2 :: a ~> b). SFunctor f => Sing t1 -> Sing t2 -> Sing (t1 <&> t2) infixl 1 Source #
Defunctionalization symbols
data FmapSym0 (a1 :: TyFun (a ~> b) (f a ~> f b)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
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) (a6989586621679271227 :: a ~> b) Source # | |
data FmapSym1 (a6989586621679271227 :: a ~> b) (b1 :: TyFun (f a) (f b)) Source #
Instances
SFunctor f => SingI1 (FmapSym1 :: (a ~> b) -> TyFun (f a) (f b) -> Type) Source # | |
(SFunctor f, SingI d) => SingI (FmapSym1 d :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 a6989586621679271227 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply (FmapSym1 a6989586621679271227 :: TyFun (f a) (f b) -> Type) (a6989586621679271228 :: f a) Source # | |
type family FmapSym2 (a6989586621679271227 :: a ~> b) (a6989586621679271228 :: f a) :: f b where ... Source #
data (<$@#@$) (a1 :: TyFun a (f b ~> f a)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
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) (a6989586621679271232 :: a) Source # | |
data (a6989586621679271232 :: a) <$@#@$$ (b1 :: TyFun (f b) (f a)) infixl 4 Source #
Instances
SFunctor f => SingI1 ((<$@#@$$) :: a -> TyFun (f b) (f a) -> Type) Source # | |
(SFunctor f, SingI d) => SingI ((<$@#@$$) d :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$$) a6989586621679271232 :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply ((<$@#@$$) a6989586621679271232 :: TyFun (f b) (f a) -> Type) (a6989586621679271233 :: f b) Source # | |
type family (a6989586621679271232 :: a) <$@#@$$$ (a6989586621679271233 :: f b) :: f a where ... infixl 4 Source #
data ($>@#@$) (a1 :: TyFun (f a) (b ~> f b)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) (a6989586621679357502 :: f a) Source # | |
data (a6989586621679357502 :: f a) $>@#@$$ (b1 :: TyFun b (f b)) infixl 4 Source #
Instances
SFunctor f => SingI1 (($>@#@$$) :: f a -> TyFun b (f b) -> Type) Source # | |
(SFunctor f, SingI d) => SingI (($>@#@$$) d :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$$) a6989586621679357502 :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (($>@#@$$) a6989586621679357502 :: TyFun b (f b) -> Type) (a6989586621679357503 :: b) Source # | |
type family (a6989586621679357502 :: f a) $>@#@$$$ (a6989586621679357503 :: b) :: f b where ... infixl 4 Source #
data (<$>@#@$) (a1 :: TyFun (a ~> b) (f a ~> f b)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
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) (a6989586621679357520 :: a ~> b) Source # | |
data (a6989586621679357520 :: a ~> b) <$>@#@$$ (b1 :: TyFun (f a) (f b)) infixl 4 Source #
Instances
SFunctor f => SingI1 ((<$>@#@$$) :: (a ~> b) -> TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
(SFunctor f, SingI d) => SingI ((<$>@#@$$) d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings ((<$>@#@$$) a6989586621679357520 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<$>@#@$$) a6989586621679357520 :: TyFun (f a) (f b) -> Type) (a6989586621679357521 :: f a) Source # | |
Defined in Data.Functor.Singletons type Apply ((<$>@#@$$) a6989586621679357520 :: TyFun (f a) (f b) -> Type) (a6989586621679357521 :: f a) = a6989586621679357520 <$> a6989586621679357521 |
type family (a6989586621679357520 :: a ~> b) <$>@#@$$$ (a6989586621679357521 :: f a) :: f b where ... infixl 4 Source #
data (<&>@#@$) (a1 :: TyFun (f a) ((a ~> b) ~> f b)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
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) (a6989586621679357509 :: f a) Source # | |
data (a6989586621679357509 :: f a) <&>@#@$$ (b1 :: TyFun (a ~> b) (f b)) infixl 1 Source #
Instances
SFunctor f => SingI1 ((<&>@#@$$) :: f a -> TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
(SFunctor f, SingI d) => SingI ((<&>@#@$$) d :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings ((<&>@#@$$) a6989586621679357509 :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<&>@#@$$) a6989586621679357509 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679357510 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons |
type family (a6989586621679357509 :: f a) <&>@#@$$$ (a6989586621679357510 :: a ~> b) :: f b where ... infixl 1 Source #
data VoidSym0 (a1 :: TyFun (f a) (f ())) Source #