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 $> a 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 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 <&> a 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 where ...
- sVoid :: forall f a (t :: f a). SFunctor f => Sing t -> Sing (Apply VoidSym0 t :: f ())
- data FmapSym0 a6989586621679559667
- data FmapSym1 a6989586621679559667 a6989586621679559668
- type FmapSym2 (a6989586621679559667 :: (~>) a b) (a6989586621679559668 :: f a) = Fmap a6989586621679559667 a6989586621679559668 :: f b
- data (<$@#@$) a6989586621679559672
- data a6989586621679559672 <$@#@$$ a6989586621679559673
- type (<$@#@$$$) (a6989586621679559672 :: a) (a6989586621679559673 :: f b) = (<$) a6989586621679559672 a6989586621679559673 :: f a
- data ($>@#@$) a6989586621679731612
- data a6989586621679731612 $>@#@$$ a6989586621679731613
- type ($>@#@$$$) (a6989586621679731612 :: f a) (a6989586621679731613 :: b) = ($>) a6989586621679731612 a6989586621679731613 :: f b
- data (<$>@#@$) a6989586621679731630
- data a6989586621679731630 <$>@#@$$ a6989586621679731631
- type (<$>@#@$$$) (a6989586621679731630 :: (~>) a b) (a6989586621679731631 :: f a) = (<$>) a6989586621679731630 a6989586621679731631 :: f b
- data (<&>@#@$) a6989586621679731619
- data a6989586621679731619 <&>@#@$$ a6989586621679731620
- type (<&>@#@$$$) (a6989586621679731619 :: f a) (a6989586621679731620 :: (~>) a b) = (<&>) a6989586621679731619 a6989586621679731620 :: f b
- data VoidSym0 a6989586621679731603
- type VoidSym1 (a6989586621679731603 :: f a) = Void a6989586621679731603 :: f ()
Documentation
Instances
PFunctor [] Source # | |
PFunctor Maybe Source # | |
PFunctor Min Source # | |
PFunctor Max Source # | |
PFunctor First Source # | |
PFunctor Last Source # | |
PFunctor Option 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 Option 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 a6989586621679559667 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 Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679559667 :: a ~> b) Source # | |
data FmapSym1 a6989586621679559667 a6989586621679559668 Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 a6989586621679559667 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym1 a6989586621679559667 :: TyFun (f a) (f b) -> Type) (a6989586621679559668 :: f a) Source # | |
type FmapSym2 (a6989586621679559667 :: (~>) a b) (a6989586621679559668 :: f a) = Fmap a6989586621679559667 a6989586621679559668 :: f b Source #
data (<$@#@$) a6989586621679559672 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 Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) (a6989586621679559672 :: a) Source # | |
data a6989586621679559672 <$@#@$$ a6989586621679559673 infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((<$@#@$$) d :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$$) a6989586621679559672 :: TyFun (f b) (f a) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$$) a6989586621679559672 :: TyFun (f b) (f a) -> Type) (a6989586621679559673 :: f b) Source # | |
type (<$@#@$$$) (a6989586621679559672 :: a) (a6989586621679559673 :: f b) = (<$) a6989586621679559672 a6989586621679559673 :: f a infixl 4 Source #
data ($>@#@$) a6989586621679731612 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.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) (a6989586621679731612 :: f a) Source # | |
data a6989586621679731612 $>@#@$$ a6989586621679731613 infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (($>@#@$$) d :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$$) a6989586621679731612 :: TyFun b (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$$) a6989586621679731612 :: TyFun b (f b) -> Type) (a6989586621679731613 :: b) Source # | |
type ($>@#@$$$) (a6989586621679731612 :: f a) (a6989586621679731613 :: b) = ($>) a6989586621679731612 a6989586621679731613 :: f b infixl 4 Source #
data (<$>@#@$) a6989586621679731630 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.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) (a6989586621679731630 :: a ~> b) Source # | |
data a6989586621679731630 <$>@#@$$ a6989586621679731631 infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((<$>@#@$$) d :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor sing :: Sing ((<$>@#@$$) d) Source # | |
SuppressUnusedWarnings ((<$>@#@$$) a6989586621679731630 :: TyFun (f a) (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$$) a6989586621679731630 :: TyFun (f a) (f b) -> Type) (a6989586621679731631 :: f a) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$$) a6989586621679731630 :: TyFun (f a) (f b) -> Type) (a6989586621679731631 :: f a) = a6989586621679731630 <$>@#@$$$ a6989586621679731631 |
type (<$>@#@$$$) (a6989586621679731630 :: (~>) a b) (a6989586621679731631 :: f a) = (<$>) a6989586621679731630 a6989586621679731631 :: f b infixl 4 Source #
data (<&>@#@$) a6989586621679731619 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.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) (a6989586621679731619 :: f a) Source # | |
data a6989586621679731619 <&>@#@$$ a6989586621679731620 infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI ((<&>@#@$$) d :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor sing :: Sing ((<&>@#@$$) d) Source # | |
SuppressUnusedWarnings ((<&>@#@$$) a6989586621679731619 :: TyFun (a ~> b) (f b) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$$) a6989586621679731619 :: TyFun (a ~> b) (f b) -> Type) (a6989586621679731620 :: a ~> b) Source # | |
Defined in Data.Singletons.Prelude.Functor |
type (<&>@#@$$$) (a6989586621679731619 :: f a) (a6989586621679731620 :: (~>) a b) = (<&>) a6989586621679731619 a6989586621679731620 :: f b infixl 1 Source #
data VoidSym0 a6989586621679731603 Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679731603 :: f a) Source # | |