| Copyright | (C) 2018 Ryan Scott |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Ryan Scott |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Singletons.Prelude.Functor
Description
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 a6989586621679563423 b6989586621679563424 f6989586621679563422. (~>) ((~>) a6989586621679563423 b6989586621679563424) ((~>) (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424))
- data FmapSym1 (arg6989586621679563816 :: (~>) a6989586621679563423 b6989586621679563424) :: forall f6989586621679563422. (~>) (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424)
- type FmapSym2 (arg6989586621679563816 :: (~>) a6989586621679563423 b6989586621679563424) (arg6989586621679563817 :: f6989586621679563422 a6989586621679563423) = Fmap arg6989586621679563816 arg6989586621679563817
- data (<$@#@$) :: forall a6989586621679563425 b6989586621679563426 f6989586621679563422. (~>) a6989586621679563425 ((~>) (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425))
- data (<$@#@$$) (arg6989586621679563820 :: a6989586621679563425) :: forall b6989586621679563426 f6989586621679563422. (~>) (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425)
- type (<$@#@$$$) (arg6989586621679563820 :: a6989586621679563425) (arg6989586621679563821 :: f6989586621679563422 b6989586621679563426) = (<$) arg6989586621679563820 arg6989586621679563821
- data ($>@#@$) :: forall a6989586621679735746 b6989586621679735747 f6989586621679735745. (~>) (f6989586621679735745 a6989586621679735746) ((~>) b6989586621679735747 (f6989586621679735745 b6989586621679735747))
- data ($>@#@$$) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) :: forall b6989586621679735747. (~>) b6989586621679735747 (f6989586621679735745 b6989586621679735747)
- type ($>@#@$$$) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) (a6989586621679735823 :: b6989586621679735747) = ($>) a6989586621679735822 a6989586621679735823
- data (<$>@#@$) :: forall a6989586621679735752 b6989586621679735753 f6989586621679735751. (~>) ((~>) a6989586621679735752 b6989586621679735753) ((~>) (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753))
- data (<$>@#@$$) (a6989586621679735832 :: (~>) a6989586621679735752 b6989586621679735753) :: forall f6989586621679735751. (~>) (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753)
- type (<$>@#@$$$) (a6989586621679735832 :: (~>) a6989586621679735752 b6989586621679735753) (a6989586621679735833 :: f6989586621679735751 a6989586621679735752) = (<$>) a6989586621679735832 a6989586621679735833
- data (<&>@#@$) :: forall a6989586621679735749 b6989586621679735750 f6989586621679735748. (~>) (f6989586621679735748 a6989586621679735749) ((~>) ((~>) a6989586621679735749 b6989586621679735750) (f6989586621679735748 b6989586621679735750))
- data (<&>@#@$$) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) :: forall b6989586621679735750. (~>) ((~>) a6989586621679735749 b6989586621679735750) (f6989586621679735748 b6989586621679735750)
- type (<&>@#@$$$) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) (a6989586621679735839 :: (~>) a6989586621679735749 b6989586621679735750) = (<&>) a6989586621679735838 a6989586621679735839
- data VoidSym0 :: forall a6989586621679735744 f6989586621679735743. (~>) (f6989586621679735743 a6989586621679735744) (f6989586621679735743 ())
- type VoidSym1 (a6989586621679735815 :: f6989586621679735743 a6989586621679735744) = Void a6989586621679735815
Documentation
class PFunctor (f :: Type -> Type) #
Instances
class SFunctor (f :: Type -> Type) where #
Minimal complete definition
Methods
sFmap :: forall a b (t :: (~>) a b) (t :: f a). Sing t -> Sing t -> Sing (Apply (Apply FmapSym0 t) t :: f b) #
(%<$) :: forall a b (t :: a) (t :: f b). Sing t -> Sing t -> Sing (Apply (Apply (<$@#@$) t) t :: f a) infixl 4 #
(%<$) :: forall a b (t :: a) (t :: f b). (Apply (Apply (<$@#@$) t) t :: f a) ~ Apply (Apply TFHelper_6989586621679563836Sym0 t) t => Sing t -> Sing t -> Sing (Apply (Apply (<$@#@$) t) t :: f a) infixl 4 #
Instances
| SFunctor [] # | |
| SFunctor Maybe # | |
| SFunctor Min # | |
| SFunctor Max # | |
| SFunctor First # | |
| SFunctor Last # | |
| SFunctor Option # | |
| SFunctor Identity # | |
| SFunctor First # | |
| SFunctor Last # | |
| SFunctor Dual # | |
| SFunctor Sum # | |
| SFunctor Product # | |
| SFunctor Down # | |
| SFunctor NonEmpty # | |
| SFunctor (Either a) # | |
| SFunctor ((,) a) # | |
| SFunctor (Arg a) # | |
| SFunctor (Const m :: Type -> Type) # | |
(%$>) :: forall f a b (t :: f a) (t :: b). SFunctor f => Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: f b) infixl 4 #
(%<$>) :: 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 #
(%<&>) :: 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 #
type family Void (a :: f a) :: f () where ... #
Equations
| Void x = Apply (Apply (<$@#@$) Tuple0Sym0) x |
Defunctionalization symbols
data FmapSym0 :: forall a6989586621679563423 b6989586621679563424 f6989586621679563422. (~>) ((~>) a6989586621679563423 b6989586621679563424) ((~>) (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424)) #
Instances
| SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal | |
| SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679563423 ~> b6989586621679563424) (f6989586621679563422 a6989586621679563423 ~> f6989586621679563422 b6989586621679563424) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (FmapSym0 :: TyFun (a6989586621679563423 ~> b6989586621679563424) (f6989586621679563422 a6989586621679563423 ~> f6989586621679563422 b6989586621679563424) -> Type) (arg6989586621679563816 :: a6989586621679563423 ~> b6989586621679563424) # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679563423 ~> b6989586621679563424) (f6989586621679563422 a6989586621679563423 ~> f6989586621679563422 b6989586621679563424) -> Type) (arg6989586621679563816 :: a6989586621679563423 ~> b6989586621679563424) = (FmapSym1 arg6989586621679563816 f6989586621679563422 :: TyFun (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424) -> Type) | |
data FmapSym1 (arg6989586621679563816 :: (~>) a6989586621679563423 b6989586621679563424) :: forall f6989586621679563422. (~>) (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424) #
Instances
| (SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal | |
| SuppressUnusedWarnings (FmapSym1 arg6989586621679563816 f6989586621679563422 :: TyFun (f6989586621679563422 a6989586621679563423) (f6989586621679563422 b6989586621679563424) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (FmapSym1 arg6989586621679563816 f :: TyFun (f a) (f b) -> Type) (arg6989586621679563817 :: f a) # | |
type FmapSym2 (arg6989586621679563816 :: (~>) a6989586621679563423 b6989586621679563424) (arg6989586621679563817 :: f6989586621679563422 a6989586621679563423) = Fmap arg6989586621679563816 arg6989586621679563817 #
data (<$@#@$) :: forall a6989586621679563425 b6989586621679563426 f6989586621679563422. (~>) a6989586621679563425 ((~>) (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425)) infixl 4 #
Instances
| SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal | |
| SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679563425 (f6989586621679563422 b6989586621679563426 ~> f6989586621679563422 a6989586621679563425) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$@#@$) :: TyFun a6989586621679563425 (f6989586621679563422 b6989586621679563426 ~> f6989586621679563422 a6989586621679563425) -> Type) (arg6989586621679563820 :: a6989586621679563425) # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679563425 (f6989586621679563422 b6989586621679563426 ~> f6989586621679563422 a6989586621679563425) -> Type) (arg6989586621679563820 :: a6989586621679563425) = ((arg6989586621679563820 <$@#@$$ b6989586621679563426) f6989586621679563422 :: TyFun (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425) -> Type) | |
data (<$@#@$$) (arg6989586621679563820 :: a6989586621679563425) :: forall b6989586621679563426 f6989586621679563422. (~>) (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425) infixl 4 #
Instances
| (SFunctor f, SingI d) => SingI ((d <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal | |
| SuppressUnusedWarnings ((arg6989586621679563820 <$@#@$$ b6989586621679563426) f6989586621679563422 :: TyFun (f6989586621679563422 b6989586621679563426) (f6989586621679563422 a6989586621679563425) -> Type) # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply ((arg6989586621679563820 <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) (arg6989586621679563821 :: f b) # | |
type (<$@#@$$$) (arg6989586621679563820 :: a6989586621679563425) (arg6989586621679563821 :: f6989586621679563422 b6989586621679563426) = (<$) arg6989586621679563820 arg6989586621679563821 #
data ($>@#@$) :: forall a6989586621679735746 b6989586621679735747 f6989586621679735745. (~>) (f6989586621679735745 a6989586621679735746) ((~>) b6989586621679735747 (f6989586621679735745 b6989586621679735747)) infixl 4 #
Instances
| SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679735745 a6989586621679735746) (b6989586621679735747 ~> f6989586621679735745 b6989586621679735747) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply (($>@#@$) :: TyFun (f6989586621679735745 a6989586621679735746) (b6989586621679735747 ~> f6989586621679735745 b6989586621679735747) -> Type) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679735745 a6989586621679735746) (b6989586621679735747 ~> f6989586621679735745 b6989586621679735747) -> Type) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) = (a6989586621679735822 $>@#@$$ b6989586621679735747 :: TyFun b6989586621679735747 (f6989586621679735745 b6989586621679735747) -> Type) | |
data ($>@#@$$) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) :: forall b6989586621679735747. (~>) b6989586621679735747 (f6989586621679735745 b6989586621679735747) infixl 4 #
Instances
| (SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings (a6989586621679735822 $>@#@$$ b6989586621679735747 :: TyFun b6989586621679735747 (f6989586621679735745 b6989586621679735747) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply (a6989586621679735822 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679735823 :: b) # | |
type ($>@#@$$$) (a6989586621679735822 :: f6989586621679735745 a6989586621679735746) (a6989586621679735823 :: b6989586621679735747) = ($>) a6989586621679735822 a6989586621679735823 #
data (<$>@#@$) :: forall a6989586621679735752 b6989586621679735753 f6989586621679735751. (~>) ((~>) a6989586621679735752 b6989586621679735753) ((~>) (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753)) infixl 4 #
Instances
| SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679735752 ~> b6989586621679735753) (f6989586621679735751 a6989586621679735752 ~> f6989586621679735751 b6989586621679735753) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply ((<$>@#@$) :: TyFun (a6989586621679735752 ~> b6989586621679735753) (f6989586621679735751 a6989586621679735752 ~> f6989586621679735751 b6989586621679735753) -> Type) (a6989586621679735832 :: a6989586621679735752 ~> b6989586621679735753) # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679735752 ~> b6989586621679735753) (f6989586621679735751 a6989586621679735752 ~> f6989586621679735751 b6989586621679735753) -> Type) (a6989586621679735832 :: a6989586621679735752 ~> b6989586621679735753) = (a6989586621679735832 <$>@#@$$ f6989586621679735751 :: TyFun (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753) -> Type) | |
data (<$>@#@$$) (a6989586621679735832 :: (~>) a6989586621679735752 b6989586621679735753) :: forall f6989586621679735751. (~>) (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753) infixl 4 #
Instances
| (SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings (a6989586621679735832 <$>@#@$$ f6989586621679735751 :: TyFun (f6989586621679735751 a6989586621679735752) (f6989586621679735751 b6989586621679735753) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply (a6989586621679735832 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679735833 :: f a) # | |
type (<$>@#@$$$) (a6989586621679735832 :: (~>) a6989586621679735752 b6989586621679735753) (a6989586621679735833 :: f6989586621679735751 a6989586621679735752) = (<$>) a6989586621679735832 a6989586621679735833 #
data (<&>@#@$) :: forall a6989586621679735749 b6989586621679735750 f6989586621679735748. (~>) (f6989586621679735748 a6989586621679735749) ((~>) ((~>) a6989586621679735749 b6989586621679735750) (f6989586621679735748 b6989586621679735750)) infixl 1 #
Instances
| SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679735748 a6989586621679735749) ((a6989586621679735749 ~> b6989586621679735750) ~> f6989586621679735748 b6989586621679735750) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply ((<&>@#@$) :: TyFun (f6989586621679735748 a6989586621679735749) ((a6989586621679735749 ~> b6989586621679735750) ~> f6989586621679735748 b6989586621679735750) -> Type) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679735748 a6989586621679735749) ((a6989586621679735749 ~> b6989586621679735750) ~> f6989586621679735748 b6989586621679735750) -> Type) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) = (a6989586621679735838 <&>@#@$$ b6989586621679735750 :: TyFun (a6989586621679735749 ~> b6989586621679735750) (f6989586621679735748 b6989586621679735750) -> Type) | |
data (<&>@#@$$) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) :: forall b6989586621679735750. (~>) ((~>) a6989586621679735749 b6989586621679735750) (f6989586621679735748 b6989586621679735750) infixl 1 #
Instances
| (SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings (a6989586621679735838 <&>@#@$$ b6989586621679735750 :: TyFun (a6989586621679735749 ~> b6989586621679735750) (f6989586621679735748 b6989586621679735750) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply (a6989586621679735838 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679735839 :: a ~> b) # | |
type (<&>@#@$$$) (a6989586621679735838 :: f6989586621679735748 a6989586621679735749) (a6989586621679735839 :: (~>) a6989586621679735749 b6989586621679735750) = (<&>) a6989586621679735838 a6989586621679735839 #
data VoidSym0 :: forall a6989586621679735744 f6989586621679735743. (~>) (f6989586621679735743 a6989586621679735744) (f6989586621679735743 ()) #
Instances
| SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor | |
| SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679735743 a6989586621679735744) (f6989586621679735743 ()) -> Type) # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () # | |
| type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679735815 :: f a) # | |
type VoidSym1 (a6989586621679735815 :: f6989586621679735743 a6989586621679735744) = Void a6989586621679735815 #