Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
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 (a6989586621679337015 :: (~>) a b) :: (~>) (f a) (f b)
- type family FmapSym2 (a6989586621679337015 :: (~>) a b) (a6989586621679337016 :: f a) :: f b where ...
- data (<$@#@$) :: (~>) a ((~>) (f b) (f a))
- data (<$@#@$$) (a6989586621679337020 :: a) :: (~>) (f b) (f a)
- type family (a6989586621679337020 :: a) <$@#@$$$ (a6989586621679337021 :: f b) :: f a where ...
- data ($>@#@$) :: (~>) (f a) ((~>) b (f b))
- data ($>@#@$$) (a6989586621679524000 :: f a) :: (~>) b (f b)
- type family (a6989586621679524000 :: f a) $>@#@$$$ (a6989586621679524001 :: b) :: f b where ...
- data (<$>@#@$) :: (~>) ((~>) a b) ((~>) (f a) (f b))
- data (<$>@#@$$) (a6989586621679524018 :: (~>) a b) :: (~>) (f a) (f b)
- type family (a6989586621679524018 :: (~>) a b) <$>@#@$$$ (a6989586621679524019 :: f a) :: f b where ...
- data (<&>@#@$) :: (~>) (f a) ((~>) ((~>) a b) (f b))
- data (<&>@#@$$) (a6989586621679524007 :: f a) :: (~>) ((~>) a b) (f b)
- type family (a6989586621679524007 :: f a) <&>@#@$$$ (a6989586621679524008 :: (~>) a b) :: f b where ...
- data VoidSym0 :: (~>) (f a) (f ())
- type family VoidSym1 (a6989586621679523991 :: f a) :: f () where ...
Documentation
type Fmap (arg :: (~>) a b) (arg :: f a) :: f b Source #
type (arg :: a) <$ (arg :: f b) :: f a infixl 4 Source #
type a <$ a = Apply (Apply TFHelper_6989586621679337024Sym0 a) a
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 [] 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 #
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 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 [] 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 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) (a6989586621679337015 :: a ~> b) Source # | |
Defined in Control.Monad.Singletons.Internal |
data FmapSym1 (a6989586621679337015 :: (~>) a b) :: (~>) (f a) (f b) Source #
Instances
SFunctor f => SingI1 (FmapSym1 :: (a ~> b) -> TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
(SFunctor f, SingI d) => SingI (FmapSym1 d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings (FmapSym1 a6989586621679337015 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply (FmapSym1 a6989586621679337015 :: TyFun (f a) (f b) -> Type) (a6989586621679337016 :: f a) Source # | |
Defined in Control.Monad.Singletons.Internal |
type family FmapSym2 (a6989586621679337015 :: (~>) a b) (a6989586621679337016 :: 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) (a6989586621679337020 :: a) Source # | |
Defined in Control.Monad.Singletons.Internal |
data (<$@#@$$) (a6989586621679337020 :: a) :: (~>) (f b) (f a) infixl 4 Source #
Instances
SFunctor f => SingI1 ((<$@#@$$) :: a -> TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
(SFunctor f, SingI d) => SingI ((<$@#@$$) d :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal | |
SuppressUnusedWarnings ((<$@#@$$) a6989586621679337020 :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Control.Monad.Singletons.Internal suppressUnusedWarnings :: () # | |
type Apply ((<$@#@$$) a6989586621679337020 :: TyFun (f b) (f a) -> Type) (a6989586621679337021 :: f b) Source # | |
Defined in Control.Monad.Singletons.Internal |
type family (a6989586621679337020 :: a) <$@#@$$$ (a6989586621679337021 :: 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) (a6989586621679524000 :: f a) Source # | |
Defined in Data.Functor.Singletons |
data ($>@#@$$) (a6989586621679524000 :: f a) :: (~>) b (f b) infixl 4 Source #
Instances
SFunctor f => SingI1 (($>@#@$$) :: f a -> TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
(SFunctor f, SingI d) => SingI (($>@#@$$) d :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons | |
SuppressUnusedWarnings (($>@#@$$) a6989586621679524000 :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply (($>@#@$$) a6989586621679524000 :: TyFun b (f b) -> Type) (a6989586621679524001 :: b) Source # | |
Defined in Data.Functor.Singletons |
type family (a6989586621679524000 :: f a) $>@#@$$$ (a6989586621679524001 :: 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) (a6989586621679524018 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons type Apply ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679524018 :: a ~> b) = (<$>@#@$$) a6989586621679524018 :: TyFun (f a) (f b) -> Type |
data (<$>@#@$$) (a6989586621679524018 :: (~>) 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 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 sing :: Sing ((<$>@#@$$) d) | |
SuppressUnusedWarnings ((<$>@#@$$) a6989586621679524018 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<$>@#@$$) a6989586621679524018 :: TyFun (f a) (f b) -> Type) (a6989586621679524019 :: f a) Source # | |
Defined in Data.Functor.Singletons type Apply ((<$>@#@$$) a6989586621679524018 :: TyFun (f a) (f b) -> Type) (a6989586621679524019 :: f a) = a6989586621679524018 <$> a6989586621679524019 |
type family (a6989586621679524018 :: (~>) a b) <$>@#@$$$ (a6989586621679524019 :: 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) (a6989586621679524007 :: f a) Source # | |
Defined in Data.Functor.Singletons type Apply ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) (a6989586621679524007 :: f a) = (<&>@#@$$) a6989586621679524007 :: TyFun (a ~> b) (f b) -> Type |
data (<&>@#@$$) (a6989586621679524007 :: 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 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 sing :: Sing ((<&>@#@$$) d) | |
SuppressUnusedWarnings ((<&>@#@$$) a6989586621679524007 :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Functor.Singletons suppressUnusedWarnings :: () # | |
type Apply ((<&>@#@$$) a6989586621679524007 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679524008 :: a ~> b) Source # | |
Defined in Data.Functor.Singletons type Apply ((<&>@#@$$) a6989586621679524007 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679524008 :: a ~> b) = a6989586621679524007 <&> a6989586621679524008 |
type family (a6989586621679524007 :: f a) <&>@#@$$$ (a6989586621679524008 :: (~>) 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) (a6989586621679523991 :: f a) Source # | |
Defined in Data.Functor.Singletons |