| 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 a6989586621679545962 b6989586621679545963 f6989586621679545961. (~>) ((~>) a6989586621679545962 b6989586621679545963) ((~>) (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963))
- data FmapSym1 (arg6989586621679546355 :: (~>) a6989586621679545962 b6989586621679545963) :: forall f6989586621679545961. (~>) (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963)
- type FmapSym2 (arg6989586621679546355 :: (~>) a6989586621679545962 b6989586621679545963) (arg6989586621679546356 :: f6989586621679545961 a6989586621679545962) = Fmap arg6989586621679546355 arg6989586621679546356
- data (<$@#@$) :: forall a6989586621679545964 b6989586621679545965 f6989586621679545961. (~>) a6989586621679545964 ((~>) (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964))
- data (<$@#@$$) (arg6989586621679546359 :: a6989586621679545964) :: forall b6989586621679545965 f6989586621679545961. (~>) (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964)
- type (<$@#@$$$) (arg6989586621679546359 :: a6989586621679545964) (arg6989586621679546360 :: f6989586621679545961 b6989586621679545965) = (<$) arg6989586621679546359 arg6989586621679546360
- data ($>@#@$) :: forall a6989586621679715291 b6989586621679715292 f6989586621679715290. (~>) (f6989586621679715290 a6989586621679715291) ((~>) b6989586621679715292 (f6989586621679715290 b6989586621679715292))
- data ($>@#@$$) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) :: forall b6989586621679715292. (~>) b6989586621679715292 (f6989586621679715290 b6989586621679715292)
- type ($>@#@$$$) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) (a6989586621679715368 :: b6989586621679715292) = ($>) a6989586621679715367 a6989586621679715368
- data (<$>@#@$) :: forall a6989586621679715297 b6989586621679715298 f6989586621679715296. (~>) ((~>) a6989586621679715297 b6989586621679715298) ((~>) (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298))
- data (<$>@#@$$) (a6989586621679715377 :: (~>) a6989586621679715297 b6989586621679715298) :: forall f6989586621679715296. (~>) (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298)
- type (<$>@#@$$$) (a6989586621679715377 :: (~>) a6989586621679715297 b6989586621679715298) (a6989586621679715378 :: f6989586621679715296 a6989586621679715297) = (<$>) a6989586621679715377 a6989586621679715378
- data (<&>@#@$) :: forall a6989586621679715294 b6989586621679715295 f6989586621679715293. (~>) (f6989586621679715293 a6989586621679715294) ((~>) ((~>) a6989586621679715294 b6989586621679715295) (f6989586621679715293 b6989586621679715295))
- data (<&>@#@$$) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) :: forall b6989586621679715295. (~>) ((~>) a6989586621679715294 b6989586621679715295) (f6989586621679715293 b6989586621679715295)
- type (<&>@#@$$$) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) (a6989586621679715384 :: (~>) a6989586621679715294 b6989586621679715295) = (<&>) a6989586621679715383 a6989586621679715384
- data VoidSym0 :: forall a6989586621679715289 f6989586621679715288. (~>) (f6989586621679715288 a6989586621679715289) (f6989586621679715288 ())
- type VoidSym1 (a6989586621679715360 :: f6989586621679715288 a6989586621679715289) = Void a6989586621679715360
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 #
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) 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_6989586621679546375Sym0 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 #
type family Void (a :: f a) :: f () where ... Source #
Equations
| Void x = Apply (Apply (<$@#@$) Tuple0Sym0) x |
Defunctionalization symbols
data FmapSym0 :: forall a6989586621679545962 b6989586621679545963 f6989586621679545961. (~>) ((~>) a6989586621679545962 b6989586621679545963) ((~>) (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963)) Source #
Instances
| SFunctor f => SingI (FmapSym0 :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
| SuppressUnusedWarnings (FmapSym0 :: TyFun (a6989586621679545962 ~> b6989586621679545963) (f6989586621679545961 a6989586621679545962 ~> f6989586621679545961 b6989586621679545963) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
| type Apply (FmapSym0 :: TyFun (a6989586621679545962 ~> b6989586621679545963) (f6989586621679545961 a6989586621679545962 ~> f6989586621679545961 b6989586621679545963) -> Type) (arg6989586621679546355 :: a6989586621679545962 ~> b6989586621679545963) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply (FmapSym0 :: TyFun (a6989586621679545962 ~> b6989586621679545963) (f6989586621679545961 a6989586621679545962 ~> f6989586621679545961 b6989586621679545963) -> Type) (arg6989586621679546355 :: a6989586621679545962 ~> b6989586621679545963) = (FmapSym1 arg6989586621679546355 f6989586621679545961 :: TyFun (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963) -> Type) | |
data FmapSym1 (arg6989586621679546355 :: (~>) a6989586621679545962 b6989586621679545963) :: forall f6989586621679545961. (~>) (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963) Source #
Instances
| (SFunctor f, SingI d) => SingI (FmapSym1 d f :: TyFun (f a) (f b) -> Type) Source # | |
| SuppressUnusedWarnings (FmapSym1 arg6989586621679546355 f6989586621679545961 :: TyFun (f6989586621679545961 a6989586621679545962) (f6989586621679545961 b6989586621679545963) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
| type Apply (FmapSym1 arg6989586621679546355 f :: TyFun (f a) (f b) -> Type) (arg6989586621679546356 :: f a) Source # | |
type FmapSym2 (arg6989586621679546355 :: (~>) a6989586621679545962 b6989586621679545963) (arg6989586621679546356 :: f6989586621679545961 a6989586621679545962) = Fmap arg6989586621679546355 arg6989586621679546356 Source #
data (<$@#@$) :: forall a6989586621679545964 b6989586621679545965 f6989586621679545961. (~>) a6989586621679545964 ((~>) (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964)) infixl 4 Source #
Instances
| SFunctor f => SingI ((<$@#@$) :: TyFun a (f b ~> f a) -> Type) Source # | |
| SuppressUnusedWarnings ((<$@#@$) :: TyFun a6989586621679545964 (f6989586621679545961 b6989586621679545965 ~> f6989586621679545961 a6989586621679545964) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
| type Apply ((<$@#@$) :: TyFun a6989586621679545964 (f6989586621679545961 b6989586621679545965 ~> f6989586621679545961 a6989586621679545964) -> Type) (arg6989586621679546359 :: a6989586621679545964) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal type Apply ((<$@#@$) :: TyFun a6989586621679545964 (f6989586621679545961 b6989586621679545965 ~> f6989586621679545961 a6989586621679545964) -> Type) (arg6989586621679546359 :: a6989586621679545964) = ((arg6989586621679546359 <$@#@$$ b6989586621679545965) f6989586621679545961 :: TyFun (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964) -> Type) | |
data (<$@#@$$) (arg6989586621679546359 :: a6989586621679545964) :: forall b6989586621679545965 f6989586621679545961. (~>) (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964) infixl 4 Source #
Instances
| (SFunctor f, SingI d) => SingI ((d <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) Source # | |
| SuppressUnusedWarnings ((arg6989586621679546359 <$@#@$$ b6989586621679545965) f6989586621679545961 :: TyFun (f6989586621679545961 b6989586621679545965) (f6989586621679545961 a6989586621679545964) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Monad.Internal Methods suppressUnusedWarnings :: () Source # | |
| type Apply ((arg6989586621679546359 <$@#@$$ b) f :: TyFun (f b) (f a) -> Type) (arg6989586621679546360 :: f b) Source # | |
type (<$@#@$$$) (arg6989586621679546359 :: a6989586621679545964) (arg6989586621679546360 :: f6989586621679545961 b6989586621679545965) = (<$) arg6989586621679546359 arg6989586621679546360 Source #
data ($>@#@$) :: forall a6989586621679715291 b6989586621679715292 f6989586621679715290. (~>) (f6989586621679715290 a6989586621679715291) ((~>) b6989586621679715292 (f6989586621679715290 b6989586621679715292)) infixl 4 Source #
Instances
| SFunctor f => SingI (($>@#@$) :: TyFun (f a) (b ~> f b) -> Type) Source # | |
| SuppressUnusedWarnings (($>@#@$) :: TyFun (f6989586621679715290 a6989586621679715291) (b6989586621679715292 ~> f6989586621679715290 b6989586621679715292) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply (($>@#@$) :: TyFun (f6989586621679715290 a6989586621679715291) (b6989586621679715292 ~> f6989586621679715290 b6989586621679715292) -> Type) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply (($>@#@$) :: TyFun (f6989586621679715290 a6989586621679715291) (b6989586621679715292 ~> f6989586621679715290 b6989586621679715292) -> Type) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) = (a6989586621679715367 $>@#@$$ b6989586621679715292 :: TyFun b6989586621679715292 (f6989586621679715290 b6989586621679715292) -> Type) | |
data ($>@#@$$) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) :: forall b6989586621679715292. (~>) b6989586621679715292 (f6989586621679715290 b6989586621679715292) infixl 4 Source #
Instances
| (SFunctor f, SingI d) => SingI (d $>@#@$$ b :: TyFun b (f b) -> Type) Source # | |
| SuppressUnusedWarnings (a6989586621679715367 $>@#@$$ b6989586621679715292 :: TyFun b6989586621679715292 (f6989586621679715290 b6989586621679715292) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply (a6989586621679715367 $>@#@$$ b :: TyFun b (f b) -> Type) (a6989586621679715368 :: b) Source # | |
type ($>@#@$$$) (a6989586621679715367 :: f6989586621679715290 a6989586621679715291) (a6989586621679715368 :: b6989586621679715292) = ($>) a6989586621679715367 a6989586621679715368 Source #
data (<$>@#@$) :: forall a6989586621679715297 b6989586621679715298 f6989586621679715296. (~>) ((~>) a6989586621679715297 b6989586621679715298) ((~>) (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298)) infixl 4 Source #
Instances
| SFunctor f => SingI ((<$>@#@$) :: TyFun (a ~> b) (f a ~> f b) -> Type) Source # | |
| SuppressUnusedWarnings ((<$>@#@$) :: TyFun (a6989586621679715297 ~> b6989586621679715298) (f6989586621679715296 a6989586621679715297 ~> f6989586621679715296 b6989586621679715298) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply ((<$>@#@$) :: TyFun (a6989586621679715297 ~> b6989586621679715298) (f6989586621679715296 a6989586621679715297 ~> f6989586621679715296 b6989586621679715298) -> Type) (a6989586621679715377 :: a6989586621679715297 ~> b6989586621679715298) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<$>@#@$) :: TyFun (a6989586621679715297 ~> b6989586621679715298) (f6989586621679715296 a6989586621679715297 ~> f6989586621679715296 b6989586621679715298) -> Type) (a6989586621679715377 :: a6989586621679715297 ~> b6989586621679715298) = (a6989586621679715377 <$>@#@$$ f6989586621679715296 :: TyFun (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298) -> Type) | |
data (<$>@#@$$) (a6989586621679715377 :: (~>) a6989586621679715297 b6989586621679715298) :: forall f6989586621679715296. (~>) (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298) infixl 4 Source #
Instances
| (SFunctor f, SingI d) => SingI (d <$>@#@$$ f :: TyFun (f a) (f b) -> Type) Source # | |
| SuppressUnusedWarnings (a6989586621679715377 <$>@#@$$ f6989586621679715296 :: TyFun (f6989586621679715296 a6989586621679715297) (f6989586621679715296 b6989586621679715298) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply (a6989586621679715377 <$>@#@$$ f :: TyFun (f a) (f b) -> Type) (a6989586621679715378 :: f a) Source # | |
type (<$>@#@$$$) (a6989586621679715377 :: (~>) a6989586621679715297 b6989586621679715298) (a6989586621679715378 :: f6989586621679715296 a6989586621679715297) = (<$>) a6989586621679715377 a6989586621679715378 Source #
data (<&>@#@$) :: forall a6989586621679715294 b6989586621679715295 f6989586621679715293. (~>) (f6989586621679715293 a6989586621679715294) ((~>) ((~>) a6989586621679715294 b6989586621679715295) (f6989586621679715293 b6989586621679715295)) infixl 1 Source #
Instances
| SFunctor f => SingI ((<&>@#@$) :: TyFun (f a) ((a ~> b) ~> f b) -> Type) Source # | |
| SuppressUnusedWarnings ((<&>@#@$) :: TyFun (f6989586621679715293 a6989586621679715294) ((a6989586621679715294 ~> b6989586621679715295) ~> f6989586621679715293 b6989586621679715295) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply ((<&>@#@$) :: TyFun (f6989586621679715293 a6989586621679715294) ((a6989586621679715294 ~> b6989586621679715295) ~> f6989586621679715293 b6989586621679715295) -> Type) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) Source # | |
Defined in Data.Singletons.Prelude.Functor type Apply ((<&>@#@$) :: TyFun (f6989586621679715293 a6989586621679715294) ((a6989586621679715294 ~> b6989586621679715295) ~> f6989586621679715293 b6989586621679715295) -> Type) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) = (a6989586621679715383 <&>@#@$$ b6989586621679715295 :: TyFun (a6989586621679715294 ~> b6989586621679715295) (f6989586621679715293 b6989586621679715295) -> Type) | |
data (<&>@#@$$) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) :: forall b6989586621679715295. (~>) ((~>) a6989586621679715294 b6989586621679715295) (f6989586621679715293 b6989586621679715295) infixl 1 Source #
Instances
| (SFunctor f, SingI d) => SingI (d <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) Source # | |
| SuppressUnusedWarnings (a6989586621679715383 <&>@#@$$ b6989586621679715295 :: TyFun (a6989586621679715294 ~> b6989586621679715295) (f6989586621679715293 b6989586621679715295) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply (a6989586621679715383 <&>@#@$$ b :: TyFun (a ~> b) (f b) -> Type) (a6989586621679715384 :: a ~> b) Source # | |
type (<&>@#@$$$) (a6989586621679715383 :: f6989586621679715293 a6989586621679715294) (a6989586621679715384 :: (~>) a6989586621679715294 b6989586621679715295) = (<&>) a6989586621679715383 a6989586621679715384 Source #
data VoidSym0 :: forall a6989586621679715289 f6989586621679715288. (~>) (f6989586621679715288 a6989586621679715289) (f6989586621679715288 ()) Source #
Instances
| SFunctor f => SingI (VoidSym0 :: TyFun (f a) (f ()) -> Type) Source # | |
| SuppressUnusedWarnings (VoidSym0 :: TyFun (f6989586621679715288 a6989586621679715289) (f6989586621679715288 ()) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Functor Methods suppressUnusedWarnings :: () Source # | |
| type Apply (VoidSym0 :: TyFun (f a) (f ()) -> Type) (a6989586621679715360 :: f a) Source # | |
type VoidSym1 (a6989586621679715360 :: f6989586621679715288 a6989586621679715289) = Void a6989586621679715360 Source #