| Copyright | (C) 2021 Ryan Scott |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | GHC2021 |
Data.Functor.Product.Singletons
Description
Exports the promoted and singled versions of the Product data type.
Synopsis
- type family Sing :: k -> Type
- data SProduct (a1 :: Product f g a) where
- data PairSym0 (a1 :: TyFun (f a) (g a ~> Product f g a))
- data PairSym1 (a6989586621680392419 :: f a) (b :: TyFun (g a) (Product f g a))
- type family PairSym2 (a6989586621680392419 :: f a) (a6989586621680392420 :: g a) :: Product f g a where ...
The Product singleton
type family Sing :: k -> Type #
Instances
data SProduct (a1 :: Product f g a) where Source #
Constructors
| SPair :: forall {k} (f :: k -> Type) (g :: k -> Type) (a :: k) (n1 :: f a) (n2 :: g a). Sing n1 -> Sing n2 -> SProduct ('Pair n1 n2) |
Instances
| (SDecide (f a), SDecide (g a)) => TestCoercion (SProduct :: Product f g a -> Type) Source # | |
Defined in Data.Functor.Product.Singletons | |
| (SDecide (f a), SDecide (g a)) => TestEquality (SProduct :: Product f g a -> Type) Source # | |
Defined in Data.Functor.Product.Singletons | |
| Eq (SProduct z) Source # | |
| Ord (SProduct z) Source # | |
Defined in Data.Functor.Product.Singletons | |
Defunctionalization symbols
data PairSym0 (a1 :: TyFun (f a) (g a ~> Product f g a)) Source #
Instances
| SingI (PairSym0 :: TyFun (f a) (g a ~> Product f g a) -> Type) Source # | |
| SuppressUnusedWarnings (PairSym0 :: TyFun (f a) (g a ~> Product f g a) -> Type) Source # | |
Defined in Data.Functor.Product.Singletons Methods suppressUnusedWarnings :: () # | |
| type Apply (PairSym0 :: TyFun (f a) (g a ~> Product f g a) -> Type) (a6989586621680392419 :: f a) Source # | |
data PairSym1 (a6989586621680392419 :: f a) (b :: TyFun (g a) (Product f g a)) Source #
Instances
| SingI1 (PairSym1 :: f a -> TyFun (g a) (Product f g a) -> Type) Source # | |
| SingI d => SingI (PairSym1 d :: TyFun (g a) (Product f g a) -> Type) Source # | |
| SuppressUnusedWarnings (PairSym1 a6989586621680392419 :: TyFun (g a) (Product f g a) -> Type) Source # | |
Defined in Data.Functor.Product.Singletons Methods suppressUnusedWarnings :: () # | |
| type Apply (PairSym1 a6989586621680392419 :: TyFun (g a) (Product f g a) -> Type) (a6989586621680392420 :: g a) Source # | |
type family PairSym2 (a6989586621680392419 :: f a) (a6989586621680392420 :: g a) :: Product f g a where ... Source #
Orphan instances
| SingI2 ('Pair :: f a -> g a -> Product f g a) Source # | |
| SingI n => SingI1 ('Pair n :: g a -> Product f g a) Source # | |
| PAlternative (Product f g) Source # | |
| PApplicative (Product f g) Source # | |
| PFunctor (Product f g) Source # | |
| PMonad (Product f g) Source # | |
| PMonadPlus (Product f g) Source # | |
| (SAlternative f, SAlternative g) => SAlternative (Product f g) Source # | |
| (SApplicative f, SApplicative g) => SApplicative (Product f g) Source # | |
Methods sPure :: forall a (t :: a). Sing t -> Sing (Pure t :: Product f g a) Source # (%<*>) :: forall a b (t1 :: Product f g (a ~> b)) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (t1 <*> t2) Source # sLiftA2 :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Product f g a) (t3 :: Product f g b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (LiftA2 t1 t2 t3) Source # (%*>) :: forall a b (t1 :: Product f g a) (t2 :: Product f g b). Sing t1 -> Sing t2 -> Sing (t1 *> t2) Source # (%<*) :: forall a b (t1 :: Product f g a) (t2 :: Product f g b). Sing t1 -> Sing t2 -> Sing (t1 <* t2) Source # | |
| (SFunctor f, SFunctor g) => SFunctor (Product f g) Source # | |
| (SMonad f, SMonad g) => SMonad (Product f g) Source # | |
Methods (%>>=) :: forall a b (t1 :: Product f g a) (t2 :: a ~> Product f g b). Sing t1 -> Sing t2 -> Sing (t1 >>= t2) Source # (%>>) :: forall a b (t1 :: Product f g a) (t2 :: Product f g b). Sing t1 -> Sing t2 -> Sing (t1 >> t2) Source # sReturn :: forall a (t :: a). Sing t -> Sing (Return t :: Product f g a) Source # | |
| (SMonadPlus f, SMonadPlus g) => SMonadPlus (Product f g) Source # | |
| PMonadZip (Product f g) Source # | |
| (SMonadZip f, SMonadZip g) => SMonadZip (Product f g) Source # | |
Methods sMzip :: forall a b (t1 :: Product f g a) (t2 :: Product f g b). Sing t1 -> Sing t2 -> Sing (Mzip t1 t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Product f g a) (t3 :: Product f g b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (MzipWith t1 t2 t3) Source # sMunzip :: forall a b (t :: Product f g (a, b)). Sing t -> Sing (Munzip t) Source # | |
| PFoldable (Product f g) Source # | |
| (SFoldable f, SFoldable g) => SFoldable (Product f g) Source # | |
Methods sFold :: forall m (t1 :: Product f g m). SMonoid m => Sing t1 -> Sing (Fold t1) Source # sFoldMap :: forall a m (t1 :: a ~> m) (t2 :: Product f g a). SMonoid m => Sing t1 -> Sing t2 -> Sing (FoldMap t1 t2) Source # sFoldr :: forall a b (t1 :: a ~> (b ~> b)) (t2 :: b) (t3 :: Product f g a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldr t1 t2 t3) Source # sFoldr' :: forall a b (t1 :: a ~> (b ~> b)) (t2 :: b) (t3 :: Product f g a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldr' t1 t2 t3) Source # sFoldl :: forall b a (t1 :: b ~> (a ~> b)) (t2 :: b) (t3 :: Product f g a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldl t1 t2 t3) Source # sFoldl' :: forall b a (t1 :: b ~> (a ~> b)) (t2 :: b) (t3 :: Product f g a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldl' t1 t2 t3) Source # sFoldr1 :: forall a (t1 :: a ~> (a ~> a)) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (Foldr1 t1 t2) Source # sFoldl1 :: forall a (t1 :: a ~> (a ~> a)) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (Foldl1 t1 t2) Source # sToList :: forall a (t1 :: Product f g a). Sing t1 -> Sing (ToList t1) Source # sNull :: forall a (t1 :: Product f g a). Sing t1 -> Sing (Null t1) Source # sLength :: forall a (t1 :: Product f g a). Sing t1 -> Sing (Length t1) Source # sElem :: forall a (t1 :: a) (t2 :: Product f g a). SEq a => Sing t1 -> Sing t2 -> Sing (Elem t1 t2) Source # sMaximum :: forall a (t1 :: Product f g a). SOrd a => Sing t1 -> Sing (Maximum t1) Source # sMinimum :: forall a (t1 :: Product f g a). SOrd a => Sing t1 -> Sing (Minimum t1) Source # sSum :: forall a (t1 :: Product f g a). SNum a => Sing t1 -> Sing (Sum t1) Source # sProduct :: forall a (t1 :: Product f g a). SNum a => Sing t1 -> Sing (Product t1) Source # | |
| PTraversable (Product f g) Source # | |
| (STraversable f, STraversable g) => STraversable (Product f g) Source # | |
Methods sTraverse :: forall a (f0 :: Type -> Type) b (t1 :: a ~> f0 b) (t2 :: Product f g a). SApplicative f0 => Sing t1 -> Sing t2 -> Sing (Traverse t1 t2) Source # sSequenceA :: forall (f0 :: Type -> Type) a (t1 :: Product f g (f0 a)). SApplicative f0 => Sing t1 -> Sing (SequenceA t1) Source # sMapM :: forall a (m :: Type -> Type) b (t1 :: a ~> m b) (t2 :: Product f g a). SMonad m => Sing t1 -> Sing t2 -> Sing (MapM t1 t2) Source # sSequence :: forall (m :: Type -> Type) a (t1 :: Product f g (m a)). SMonad m => Sing t1 -> Sing (Sequence t1) Source # | |
| (SDecide (f a), SDecide (g a)) => SDecide (Product f g a) Source # | |
| PEq (Product f g a) Source # | |
| (SEq (f a), SEq (g a)) => SEq (Product f g a) Source # | |
| POrd (Product f g a) Source # | |
| (SOrd (f a), SOrd (g a)) => SOrd (Product f g a) Source # | |
Methods sCompare :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (Compare t1 t2) Source # (%<) :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (t1 < t2) Source # (%<=) :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (t1 <= t2) Source # (%>) :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (t1 > t2) Source # (%>=) :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (t1 >= t2) Source # sMax :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (Max t1 t2) Source # sMin :: forall (t1 :: Product f g a) (t2 :: Product f g a). Sing t1 -> Sing t2 -> Sing (Min t1 t2) Source # | |
| (SingI n1, SingI n2) => SingI ('Pair n1 n2 :: Product f g a) Source # | |