| Copyright | (C) 2018 Ryan Scott |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Ryan Scott |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | GHC2021 |
Data.Functor.Singletons
Description
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 (t :: f a) (t :: b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: f b) :: Type
- type family (a :: (~>) a b) <$> (a :: f a) :: f b where ...
- (%<$>) :: forall (t :: (~>) a b) (t :: f a). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<$>@#@$) t) t :: f b) :: Type
- type family (a :: f a) <&> (a :: (~>) a b) :: f b where ...
- (%<&>) :: forall (t :: f a) (t :: (~>) a b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<&>@#@$) t) t :: f b) :: Type
- type family Void (a :: f a) :: f () where ...
- sVoid :: forall (t :: f a). SFunctor f => Sing t -> Sing (Apply VoidSym0 t :: f ()) :: Type
- data FmapSym0 :: (~>) ((~>) a b) ((~>) (f a) (f b))
- data FmapSym1 (a6989586621679276541 :: (~>) a b) :: (~>) (f a) (f b)
- type family FmapSym2 (a6989586621679276541 :: (~>) a b) (a6989586621679276542 :: f a) :: f b where ...
- data (<$@#@$) :: (~>) a ((~>) (f b) (f a))
- data (<$@#@$$) (a6989586621679276546 :: a) :: (~>) (f b) (f a)
- type family (a6989586621679276546 :: a) <$@#@$$$ (a6989586621679276547 :: f b) :: f a where ...
- data ($>@#@$) :: (~>) (f a) ((~>) b (f b))
- data ($>@#@$$) (a6989586621679430447 :: f a) :: (~>) b (f b)
- type family (a6989586621679430447 :: f a) $>@#@$$$ (a6989586621679430448 :: b) :: f b where ...
- data (<$>@#@$) :: (~>) ((~>) a b) ((~>) (f a) (f b))
- data (<$>@#@$$) (a6989586621679430465 :: (~>) a b) :: (~>) (f a) (f b)
- type family (a6989586621679430465 :: (~>) a b) <$>@#@$$$ (a6989586621679430466 :: f a) :: f b where ...
- data (<&>@#@$) :: (~>) (f a) ((~>) ((~>) a b) (f b))
- data (<&>@#@$$) (a6989586621679430454 :: f a) :: (~>) ((~>) a b) (f b)
- type family (a6989586621679430454 :: f a) <&>@#@$$$ (a6989586621679430455 :: (~>) a b) :: f b where ...
- data VoidSym0 :: (~>) (f a) (f ())
- type family VoidSym1 (a6989586621679430438 :: f a) :: f () where ...
Documentation
Instances
| PFunctor Identity Source # | |
| PFunctor First Source # | |
| PFunctor Last Source # | |
| PFunctor Down Source # | |
| PFunctor First Source # | |
| PFunctor Last Source # | |
| PFunctor Max Source # | |
| PFunctor Min Source # | |
| PFunctor Dual Source # | |
| PFunctor Product Source # | |
| PFunctor Sum Source # | |
| PFunctor NonEmpty Source # | |
| PFunctor Maybe Source # | |
| PFunctor List Source # | |
| PFunctor (Either a) Source # | |
| PFunctor (Proxy :: Type -> Type) Source # | |
| PFunctor (Arg a) Source # | |
| PFunctor ((,) a) Source # | |
| PFunctor (Const m :: Type -> Type) Source # | |
| PFunctor (Product f g) Source # | |
| PFunctor (Sum f g) Source # | |
| PFunctor (Compose f g) Source # | |
class SFunctor f where Source #
Minimal complete definition
Methods
sFmap :: forall (t :: (~>) a b) (t :: f a). Sing t -> Sing t -> Sing (Apply (Apply FmapSym0 t) t :: f b) :: Type Source #
(%<$) :: forall (t :: a) (t :: f b). Sing t -> Sing t -> Sing (Apply (Apply (<$@#@$) t) t :: f a) :: Type infixl 4 Source #
Instances
| SFunctor Identity Source # | |
| SFunctor First Source # | |
| SFunctor Last Source # | |
| SFunctor Down Source # | |
| SFunctor First Source # | |
| SFunctor Last Source # | |
| SFunctor Max Source # | |
| SFunctor Min Source # | |
| SFunctor Dual Source # | |
| SFunctor Product Source # | |
| SFunctor Sum Source # | |
| SFunctor NonEmpty Source # | |
| SFunctor Maybe Source # | |
| SFunctor List Source # | |
| SFunctor (Either a) Source # | |
| SFunctor (Proxy :: Type -> Type) Source # | |
| SFunctor (Arg a) 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 (t :: f a) (t :: b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: f b) :: Type infixl 4 Source #
(%<$>) :: forall (t :: (~>) a b) (t :: f a). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<$>@#@$) t) t :: f b) :: Type infixl 4 Source #
(%<&>) :: forall (t :: f a) (t :: (~>) a b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply (<&>@#@$) t) t :: f b) :: Type infixl 1 Source #
type family Void (a :: f a) :: f () where ... Source #
Equations
| Void x = Apply (Apply (<$@#@$) Tuple0Sym0) x |
sVoid :: forall (t :: f a). SFunctor f => Sing t -> Sing (Apply VoidSym0 t :: f ()) :: Type 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 Methods suppressUnusedWarnings :: () # | |
| type Apply (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679276541 :: a ~> b) Source # | |
data FmapSym1 (a6989586621679276541 :: (~>) a b) :: (~>) (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 # | |
Defined in Control.Monad.Singletons.Internal | |
| SuppressUnusedWarnings (FmapSym1 a6989586621679276541 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (FmapSym1 a6989586621679276541 :: TyFun (f a) (f b) -> Type) (a6989586621679276542 :: f a) Source # | |
Defined in Control.Monad.Singletons.Internal | |
type family FmapSym2 (a6989586621679276541 :: (~>) a b) (a6989586621679276542 :: 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 Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) (a6989586621679276546 :: a) Source # | |
data (<$@#@$$) (a6989586621679276546 :: a) :: (~>) (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 # | |
Defined in Control.Monad.Singletons.Internal | |
| SuppressUnusedWarnings ((<$@#@$$) a6989586621679276546 :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$@#@$$) a6989586621679276546 :: TyFun (f b) (f a) -> Type) (a6989586621679276547 :: f b) Source # | |
Defined in Control.Monad.Singletons.Internal | |
type family (a6989586621679276546 :: a) <$@#@$$$ (a6989586621679276547 :: 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 Methods suppressUnusedWarnings :: () # | |
| type Apply (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) (a6989586621679430447 :: f a) Source # | |
data ($>@#@$$) (a6989586621679430447 :: f a) :: (~>) 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 # | |
Defined in Data.Functor.Singletons | |
| SuppressUnusedWarnings (($>@#@$$) a6989586621679430447 :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons Methods suppressUnusedWarnings :: () # | |
| type Apply (($>@#@$$) a6989586621679430447 :: TyFun b (f b) -> Type) (a6989586621679430448 :: b) Source # | |
Defined in Data.Functor.Singletons | |
type family (a6989586621679430447 :: f a) $>@#@$$$ (a6989586621679430448 :: 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 Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679430465 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons | |
data (<$>@#@$$) (a6989586621679430465 :: (~>) a b) :: (~>) (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 Methods liftSing :: forall (x :: k1). Sing x -> Sing ((<$>@#@$$) x) # | |
| (SFunctor f, SingI d) => SingI ((<$>@#@$$) d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons Methods sing :: Sing ((<$>@#@$$) d) # | |
| SuppressUnusedWarnings ((<$>@#@$$) a6989586621679430465 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$>@#@$$) a6989586621679430465 :: TyFun (f a) (f b) -> Type) (a6989586621679430466 :: f a) Source # | |
Defined in Data.Functor.Singletons type Apply ((<$>@#@$$) a6989586621679430465 :: TyFun (f a) (f b) -> Type) (a6989586621679430466 :: f a) = a6989586621679430465 <$> a6989586621679430466 | |
type family (a6989586621679430465 :: (~>) a b) <$>@#@$$$ (a6989586621679430466 :: 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 Methods suppressUnusedWarnings :: () # | |
| type Apply ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) (a6989586621679430454 :: f a) Source # | |
Defined in Data.Functor.Singletons | |
data (<&>@#@$$) (a6989586621679430454 :: f a) :: (~>) ((~>) 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 Methods liftSing :: forall (x :: k1). Sing x -> Sing ((<&>@#@$$) x) # | |
| (SFunctor f, SingI d) => SingI ((<&>@#@$$) d :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons Methods sing :: Sing ((<&>@#@$$) d) # | |
| SuppressUnusedWarnings ((<&>@#@$$) a6989586621679430454 :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons Methods suppressUnusedWarnings :: () # | |
| type Apply ((<&>@#@$$) a6989586621679430454 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679430455 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons | |
type family (a6989586621679430454 :: f a) <&>@#@$$$ (a6989586621679430455 :: (~>) 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 Methods suppressUnusedWarnings :: () # | |
| type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679430438 :: f a) Source # | |
Defined in Data.Functor.Singletons | |