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 :: 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 a6989586621679545127 b6989586621679545128 f6989586621679545126. (~>) ((~>) a6989586621679545127 b6989586621679545128) ((~>) (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128))
- data FmapSym1 (arg6989586621679545520 :: (~>) a6989586621679545127 b6989586621679545128) :: forall f6989586621679545126. (~>) (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128)
- type FmapSym2 (arg6989586621679545520 :: (~>) a6989586621679545127 b6989586621679545128) (arg6989586621679545521 :: f6989586621679545126 a6989586621679545127) = Fmap arg6989586621679545520 arg6989586621679545521
- data (<$@#@$) :: forall a6989586621679545129 b6989586621679545130 f6989586621679545126. (~>) a6989586621679545129 ((~>) (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129))
- data (<$@#@$$) (arg6989586621679545524 :: a6989586621679545129) :: forall b6989586621679545130 f6989586621679545126. (~>) (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129)
- type (<$@#@$$$) (arg6989586621679545524 :: a6989586621679545129) (arg6989586621679545525 :: f6989586621679545126 b6989586621679545130) = (<$) arg6989586621679545524 arg6989586621679545525
- data ($>@#@$) :: forall a6989586621679714512 b6989586621679714513 f6989586621679714511. (~>) (f6989586621679714511 a6989586621679714512) ((~>) b6989586621679714513 (f6989586621679714511 b6989586621679714513))
- data ($>@#@$$) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) :: forall b6989586621679714513. (~>) b6989586621679714513 (f6989586621679714511 b6989586621679714513)
- type ($>@#@$$$) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) (a6989586621679714589 :: b6989586621679714513) = ($>) a6989586621679714588 a6989586621679714589
- data (<$>@#@$) :: forall a6989586621679714518 b6989586621679714519 f6989586621679714517. (~>) ((~>) a6989586621679714518 b6989586621679714519) ((~>) (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519))
- data (<$>@#@$$) (a6989586621679714598 :: (~>) a6989586621679714518 b6989586621679714519) :: forall f6989586621679714517. (~>) (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519)
- type (<$>@#@$$$) (a6989586621679714598 :: (~>) a6989586621679714518 b6989586621679714519) (a6989586621679714599 :: f6989586621679714517 a6989586621679714518) = (<$>) a6989586621679714598 a6989586621679714599
- data (<&>@#@$) :: forall a6989586621679714515 b6989586621679714516 f6989586621679714514. (~>) (f6989586621679714514 a6989586621679714515) ((~>) ((~>) a6989586621679714515 b6989586621679714516) (f6989586621679714514 b6989586621679714516))
- data (<&>@#@$$) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) :: forall b6989586621679714516. (~>) ((~>) a6989586621679714515 b6989586621679714516) (f6989586621679714514 b6989586621679714516)
- type (<&>@#@$$$) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) (a6989586621679714605 :: (~>) a6989586621679714515 b6989586621679714516) = (<&>) a6989586621679714604 a6989586621679714605
- data VoidSym0 :: forall a6989586621679714510 f6989586621679714509. (~>) (f6989586621679714509 a6989586621679714510) (f6989586621679714509 ())
- type VoidSym1 (a6989586621679714581 :: f6989586621679714509 a6989586621679714510) = Void a6989586621679714581
Documentation
class PFunctor (f :: Type -> Type) Source #
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 (Const m :: Type -> Type) Source # | |
class SFunctor (f :: Type -> Type) 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 #
(%<$) :: forall a b (t :: a) (t :: f b). (Apply (Apply (<$@#@$) t) t :: f a) ~ Apply (Apply TFHelper_6989586621679545540Sym0 t) t => 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 (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 f a b (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 :: forall a6989586621679545127 b6989586621679545128 f6989586621679545126. (~>) ((~>) a6989586621679545127 b6989586621679545128) ((~>) (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128)) Source #
Instances
SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679545127 ~> b6989586621679545128) (f6989586621679545126 a6989586621679545127 ~> f6989586621679545126 b6989586621679545128) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym0 :: TyFun (a6989586621679545127 ~> b6989586621679545128) (f6989586621679545126 a6989586621679545127 ~> f6989586621679545126 b6989586621679545128) -> Type) (arg6989586621679545520 :: a6989586621679545127 ~> b6989586621679545128) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679545127 ~> b6989586621679545128) (f6989586621679545126 a6989586621679545127 ~> f6989586621679545126 b6989586621679545128) -> Type) (arg6989586621679545520 :: a6989586621679545127 ~> b6989586621679545128) = (FmapSym1 arg6989586621679545520 f6989586621679545126 :: TyFun (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128) -> Type) |
data FmapSym1 (arg6989586621679545520 :: (~>) a6989586621679545127 b6989586621679545128) :: forall f6989586621679545126. (~>) (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128) Source #
Instances
(SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (FmapSym1 arg6989586621679545520 f6989586621679545126 :: TyFun (f6989586621679545126 a6989586621679545127) (f6989586621679545126 b6989586621679545128) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply (FmapSym1 arg6989586621679545520 f :: TyFun (f a) (f b) -> Type) (arg6989586621679545521 :: f a) Source # | |
type FmapSym2 (arg6989586621679545520 :: (~>) a6989586621679545127 b6989586621679545128) (arg6989586621679545521 :: f6989586621679545126 a6989586621679545127) = Fmap arg6989586621679545520 arg6989586621679545521 Source #
data (<$@#@$) :: forall a6989586621679545129 b6989586621679545130 f6989586621679545126. (~>) a6989586621679545129 ((~>) (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679545129 (f6989586621679545126 b6989586621679545130 ~> f6989586621679545126 a6989586621679545129) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((<$@#@$) :: TyFun a6989586621679545129 (f6989586621679545126 b6989586621679545130 ~> f6989586621679545126 a6989586621679545129) -> Type) (arg6989586621679545524 :: a6989586621679545129) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679545129 (f6989586621679545126 b6989586621679545130 ~> f6989586621679545126 a6989586621679545129) -> Type) (arg6989586621679545524 :: a6989586621679545129) = ((arg6989586621679545524 <$@#@$$ b6989586621679545130) f6989586621679545126 :: TyFun (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129) -> Type) |
data (<$@#@$$) (arg6989586621679545524 :: a6989586621679545129) :: forall b6989586621679545130 f6989586621679545126. (~>) (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI ((d <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) Source # | |
SuppressUnusedWarnings ((arg6989586621679545524 <$@#@$$ b6989586621679545130) f6989586621679545126 :: TyFun (f6989586621679545126 b6989586621679545130) (f6989586621679545126 a6989586621679545129) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal suppressUnusedWarnings :: () Source # | |
type Apply ((arg6989586621679545524 <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) (arg6989586621679545525 :: f b) Source # | |
type (<$@#@$$$) (arg6989586621679545524 :: a6989586621679545129) (arg6989586621679545525 :: f6989586621679545126 b6989586621679545130) = (<$) arg6989586621679545524 arg6989586621679545525 Source #
data ($>@#@$) :: forall a6989586621679714512 b6989586621679714513 f6989586621679714511. (~>) (f6989586621679714511 a6989586621679714512) ((~>) b6989586621679714513 (f6989586621679714511 b6989586621679714513)) infixl 4 Source #
Instances
SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679714511 a6989586621679714512) (b6989586621679714513 ~> f6989586621679714511 b6989586621679714513) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (($>@#@$) :: TyFun (f6989586621679714511 a6989586621679714512) (b6989586621679714513 ~> f6989586621679714511 b6989586621679714513) -> Type) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679714511 a6989586621679714512) (b6989586621679714513 ~> f6989586621679714511 b6989586621679714513) -> Type) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) = (a6989586621679714588 $>@#@$$ b6989586621679714513 :: TyFun b6989586621679714513 (f6989586621679714511 b6989586621679714513) -> Type) |
data ($>@#@$$) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) :: forall b6989586621679714513. (~>) b6989586621679714513 (f6989586621679714511 b6989586621679714513) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679714588 $>@#@$$ b6989586621679714513 :: TyFun b6989586621679714513 (f6989586621679714511 b6989586621679714513) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679714588 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679714589 :: b) Source # | |
type ($>@#@$$$) (a6989586621679714588 :: f6989586621679714511 a6989586621679714512) (a6989586621679714589 :: b6989586621679714513) = ($>) a6989586621679714588 a6989586621679714589 Source #
data (<$>@#@$) :: forall a6989586621679714518 b6989586621679714519 f6989586621679714517. (~>) ((~>) a6989586621679714518 b6989586621679714519) ((~>) (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519)) infixl 4 Source #
Instances
SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679714518 ~> b6989586621679714519) (f6989586621679714517 a6989586621679714518 ~> f6989586621679714517 b6989586621679714519) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<$>@#@$) :: TyFun (a6989586621679714518 ~> b6989586621679714519) (f6989586621679714517 a6989586621679714518 ~> f6989586621679714517 b6989586621679714519) -> Type) (a6989586621679714598 :: a6989586621679714518 ~> b6989586621679714519) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679714518 ~> b6989586621679714519) (f6989586621679714517 a6989586621679714518 ~> f6989586621679714517 b6989586621679714519) -> Type) (a6989586621679714598 :: a6989586621679714518 ~> b6989586621679714519) = (a6989586621679714598 <$>@#@$$ f6989586621679714517 :: TyFun (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519) -> Type) |
data (<$>@#@$$) (a6989586621679714598 :: (~>) a6989586621679714518 b6989586621679714519) :: forall f6989586621679714517. (~>) (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519) infixl 4 Source #
Instances
(SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679714598 <$>@#@$$ f6989586621679714517 :: TyFun (f6989586621679714517 a6989586621679714518) (f6989586621679714517 b6989586621679714519) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679714598 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679714599 :: f a) Source # | |
type (<$>@#@$$$) (a6989586621679714598 :: (~>) a6989586621679714518 b6989586621679714519) (a6989586621679714599 :: f6989586621679714517 a6989586621679714518) = (<$>) a6989586621679714598 a6989586621679714599 Source #
data (<&>@#@$) :: forall a6989586621679714515 b6989586621679714516 f6989586621679714514. (~>) (f6989586621679714514 a6989586621679714515) ((~>) ((~>) a6989586621679714515 b6989586621679714516) (f6989586621679714514 b6989586621679714516)) infixl 1 Source #
Instances
SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679714514 a6989586621679714515) ((a6989586621679714515 ~> b6989586621679714516) ~> f6989586621679714514 b6989586621679714516) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply ((<&>@#@$) :: TyFun (f6989586621679714514 a6989586621679714515) ((a6989586621679714515 ~> b6989586621679714516) ~> f6989586621679714514 b6989586621679714516) -> Type) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679714514 a6989586621679714515) ((a6989586621679714515 ~> b6989586621679714516) ~> f6989586621679714514 b6989586621679714516) -> Type) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) = (a6989586621679714604 <&>@#@$$ b6989586621679714516 :: TyFun (a6989586621679714515 ~> b6989586621679714516) (f6989586621679714514 b6989586621679714516) -> Type) |
data (<&>@#@$$) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) :: forall b6989586621679714516. (~>) ((~>) a6989586621679714515 b6989586621679714516) (f6989586621679714514 b6989586621679714516) infixl 1 Source #
Instances
(SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) Source # | |
SuppressUnusedWarnings (a6989586621679714604 <&>@#@$$ b6989586621679714516 :: TyFun (a6989586621679714515 ~> b6989586621679714516) (f6989586621679714514 b6989586621679714516) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (a6989586621679714604 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679714605 :: a ~> b) Source # | |
type (<&>@#@$$$) (a6989586621679714604 :: f6989586621679714514 a6989586621679714515) (a6989586621679714605 :: (~>) a6989586621679714515 b6989586621679714516) = (<&>) a6989586621679714604 a6989586621679714605 Source #
data VoidSym0 :: forall a6989586621679714510 f6989586621679714509. (~>) (f6989586621679714509 a6989586621679714510) (f6989586621679714509 ()) Source #
Instances
SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679714509 a6989586621679714510) (f6989586621679714509 ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor suppressUnusedWarnings :: () Source # | |
type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679714581 :: f a) Source # | |
type VoidSym1 (a6989586621679714581 :: f6989586621679714509 a6989586621679714510) = Void a6989586621679714581 Source #