Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | GHC2021 |
Defines the promoted and singled versions of the MonadZip
type class.
Synopsis
- class PMonadZip (m :: Type -> Type) where
- class SMonad m => SMonadZip (m :: Type -> Type) where
- sMzip :: forall a b (t1 :: m a) (t2 :: m b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) t1) t2)
- sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: m a) (t3 :: m b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) t1) t2) t3)
- sMunzip :: forall a b (t :: m (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) t)
- data MzipSym0 (a1 :: TyFun (m a) (m b ~> m (a, b)))
- data MzipSym1 (a6989586621681100711 :: m a) (b1 :: TyFun (m b) (m (a, b)))
- type family MzipSym2 (a6989586621681100711 :: m a) (a6989586621681100712 :: m b) :: m (a, b) where ...
- data MzipWithSym0 (a1 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)))
- data MzipWithSym1 (a6989586621681100717 :: a ~> (b ~> c)) (b1 :: TyFun (m a) (m b ~> m c))
- data MzipWithSym2 (a6989586621681100717 :: a ~> (b ~> c)) (a6989586621681100718 :: m a) (c1 :: TyFun (m b) (m c))
- type family MzipWithSym3 (a6989586621681100717 :: a ~> (b ~> c)) (a6989586621681100718 :: m a) (a6989586621681100719 :: m b) :: m c where ...
- data MunzipSym0 (a1 :: TyFun (m (a, b)) (m a, m b))
- type family MunzipSym1 (a6989586621681100722 :: m (a, b)) :: (m a, m b) where ...
Documentation
class PMonadZip (m :: Type -> Type) Source #
type Mzip (arg :: m a) (arg1 :: m b) :: m (a, b) Source #
type Mzip (arg :: m a) (arg1 :: m b) = Apply (Apply (Mzip_6989586621681100725Sym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) arg) arg1
type MzipWith (arg :: a ~> (b ~> c)) (arg1 :: m a) (arg2 :: m b) :: m c Source #
Instances
class SMonad m => SMonadZip (m :: Type -> Type) where Source #
Nothing
sMzip :: forall a b (t1 :: m a) (t2 :: m b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) t1) t2) Source #
default sMzip :: forall a b (t1 :: m a) (t2 :: m b). Apply (Apply (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) t1) t2 ~ Apply (Apply (Mzip_6989586621681100725Sym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) t1) t2 => Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) t1) t2) Source #
sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: m a) (t3 :: m b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) t1) t2) t3) Source #
default sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: m a) (t3 :: m b). Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) t1) t2) t3 ~ Apply (Apply (Apply (MzipWith_6989586621681100741Sym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) t1) t2) t3 => Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) t1) t2) t3) Source #
sMunzip :: forall a b (t :: m (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) t) Source #
Instances
SMonadZip NonEmpty Source # | |
Defined in Data.List.NonEmpty.Singletons sMzip :: forall a b (t1 :: NonEmpty a) (t2 :: NonEmpty b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (NonEmpty a) (NonEmpty b ~> NonEmpty (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: NonEmpty a) (t3 :: NonEmpty b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (NonEmpty a ~> (NonEmpty b ~> NonEmpty c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: NonEmpty (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (NonEmpty (a, b)) (NonEmpty a, NonEmpty b) -> Type) t) Source # | |
SMonadZip Identity Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Identity a) (t2 :: Identity b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Identity a) (Identity b ~> Identity (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Identity a) (t3 :: Identity b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Identity a ~> (Identity b ~> Identity c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Identity (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Identity (a, b)) (Identity a, Identity b) -> Type) t) Source # | |
SMonadZip First Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: First a) (t2 :: First b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (First a) (First b ~> First (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: First a) (t3 :: First b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (First a ~> (First b ~> First c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: First (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (First (a, b)) (First a, First b) -> Type) t) Source # | |
SMonadZip Last Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Last a) (t2 :: Last b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Last a) (Last b ~> Last (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Last a) (t3 :: Last b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Last a ~> (Last b ~> Last c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Last (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Last (a, b)) (Last a, Last b) -> Type) t) Source # | |
SMonadZip Dual Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Dual a) (t2 :: Dual b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Dual a) (Dual b ~> Dual (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Dual a) (t3 :: Dual b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Dual a ~> (Dual b ~> Dual c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Dual (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Dual (a, b)) (Dual a, Dual b) -> Type) t) Source # | |
SMonadZip Product Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Product a) (t2 :: Product b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Product a) (Product b ~> Product (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Product a) (t3 :: Product b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Product a ~> (Product b ~> Product c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Product (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Product (a, b)) (Product a, Product b) -> Type) t) Source # | |
SMonadZip Sum Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Sum a) (t2 :: Sum b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Sum a) (Sum b ~> Sum (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Sum a) (t3 :: Sum b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Sum a ~> (Sum b ~> Sum c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Sum (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Sum (a, b)) (Sum a, Sum b) -> Type) t) Source # | |
SMonadZip Maybe Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Maybe a) (t2 :: Maybe b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Maybe a) (Maybe b ~> Maybe (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Maybe a) (t3 :: Maybe b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Maybe a ~> (Maybe b ~> Maybe c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Maybe (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Maybe (a, b)) (Maybe a, Maybe b) -> Type) t) Source # | |
SMonadZip [] Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: [a]) (t2 :: [b]). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun [a] ([b] ~> [(a, b)]) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: [a]) (t3 :: [b]). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) ([a] ~> ([b] ~> [c])) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: [(a, b)]). Sing t -> Sing (Apply (MunzipSym0 :: TyFun [(a, b)] ([a], [b]) -> Type) t) Source # | |
SMonadZip (Proxy :: Type -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons sMzip :: forall a b (t1 :: Proxy a) (t2 :: Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Proxy a) (Proxy b ~> Proxy (a, b)) -> Type) t1) t2) Source # sMzipWith :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Proxy a) (t3 :: Proxy b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Proxy a ~> (Proxy b ~> Proxy c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Proxy (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Proxy (a, b)) (Proxy a, Proxy b) -> Type) t) Source # | |
(SMonadZip f, SMonadZip g) => SMonadZip (Product f g) Source # | |
Defined in Data.Functor.Product.Singletons sMzip :: forall a b (t1 :: Product f g a) (t2 :: Product f g b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (MzipSym0 :: TyFun (Product f g a) (Product f g b ~> Product f g (a, b)) -> Type) 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 (Apply (Apply (Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (Product f g a ~> (Product f g b ~> Product f g c)) -> Type) t1) t2) t3) Source # sMunzip :: forall a b (t :: Product f g (a, b)). Sing t -> Sing (Apply (MunzipSym0 :: TyFun (Product f g (a, b)) (Product f g a, Product f g b) -> Type) t) Source # |
Defunctionalization symbols
data MzipSym0 (a1 :: TyFun (m a) (m b ~> m (a, b))) Source #
Instances
SMonadZip m => SingI (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) Source # | |
SuppressUnusedWarnings (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MzipSym0 :: TyFun (m a) (m b ~> m (a, b)) -> Type) (a6989586621681100711 :: m a) Source # | |
data MzipSym1 (a6989586621681100711 :: m a) (b1 :: TyFun (m b) (m (a, b))) Source #
Instances
SMonadZip m => SingI1 (MzipSym1 :: m a -> TyFun (m b) (m (a, b)) -> Type) Source # | |
(SMonadZip m, SingI d) => SingI (MzipSym1 d :: TyFun (m b) (m (a, b)) -> Type) Source # | |
SuppressUnusedWarnings (MzipSym1 a6989586621681100711 :: TyFun (m b) (m (a, b)) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MzipSym1 a6989586621681100711 :: TyFun (m b) (m (a, b)) -> Type) (a6989586621681100712 :: m b) Source # | |
type family MzipSym2 (a6989586621681100711 :: m a) (a6989586621681100712 :: m b) :: m (a, b) where ... Source #
data MzipWithSym0 (a1 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c))) Source #
Instances
SMonadZip m => SingI (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) Source # | |
SuppressUnusedWarnings (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MzipWithSym0 :: TyFun (a ~> (b ~> c)) (m a ~> (m b ~> m c)) -> Type) (a6989586621681100717 :: a ~> (b ~> c)) Source # | |
Defined in Control.Monad.Zip.Singletons |
data MzipWithSym1 (a6989586621681100717 :: a ~> (b ~> c)) (b1 :: TyFun (m a) (m b ~> m c)) Source #
Instances
SMonadZip m => SingI1 (MzipWithSym1 :: (a ~> (b ~> c)) -> TyFun (m a) (m b ~> m c) -> Type) Source # | |
(SMonadZip m, SingI d) => SingI (MzipWithSym1 d :: TyFun (m a) (m b ~> m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons | |
SuppressUnusedWarnings (MzipWithSym1 a6989586621681100717 :: TyFun (m a) (m b ~> m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MzipWithSym1 a6989586621681100717 :: TyFun (m a) (m b ~> m c) -> Type) (a6989586621681100718 :: m a) Source # | |
Defined in Control.Monad.Zip.Singletons type Apply (MzipWithSym1 a6989586621681100717 :: TyFun (m a) (m b ~> m c) -> Type) (a6989586621681100718 :: m a) = MzipWithSym2 a6989586621681100717 a6989586621681100718 |
data MzipWithSym2 (a6989586621681100717 :: a ~> (b ~> c)) (a6989586621681100718 :: m a) (c1 :: TyFun (m b) (m c)) Source #
Instances
(SMonadZip m, SingI d) => SingI1 (MzipWithSym2 d :: m a -> TyFun (m b) (m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons liftSing :: forall (x :: m a). Sing x -> Sing (MzipWithSym2 d x) # | |
SMonadZip m => SingI2 (MzipWithSym2 :: (a ~> (b ~> c)) -> m a -> TyFun (m b) (m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons | |
(SMonadZip m, SingI d1, SingI d2) => SingI (MzipWithSym2 d1 d2 :: TyFun (m b) (m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons sing :: Sing (MzipWithSym2 d1 d2) # | |
SuppressUnusedWarnings (MzipWithSym2 a6989586621681100717 a6989586621681100718 :: TyFun (m b) (m c) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MzipWithSym2 a6989586621681100717 a6989586621681100718 :: TyFun (m b) (m c) -> Type) (a6989586621681100719 :: m b) Source # | |
Defined in Control.Monad.Zip.Singletons type Apply (MzipWithSym2 a6989586621681100717 a6989586621681100718 :: TyFun (m b) (m c) -> Type) (a6989586621681100719 :: m b) = MzipWith a6989586621681100717 a6989586621681100718 a6989586621681100719 |
type family MzipWithSym3 (a6989586621681100717 :: a ~> (b ~> c)) (a6989586621681100718 :: m a) (a6989586621681100719 :: m b) :: m c where ... Source #
MzipWithSym3 (a6989586621681100717 :: a ~> (b ~> c)) (a6989586621681100718 :: m a) (a6989586621681100719 :: m b) = MzipWith a6989586621681100717 a6989586621681100718 a6989586621681100719 |
data MunzipSym0 (a1 :: TyFun (m (a, b)) (m a, m b)) Source #
Instances
SMonadZip m => SingI (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons | |
SuppressUnusedWarnings (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) Source # | |
Defined in Control.Monad.Zip.Singletons suppressUnusedWarnings :: () # | |
type Apply (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) (a6989586621681100722 :: m (a, b)) Source # | |
Defined in Control.Monad.Zip.Singletons type Apply (MunzipSym0 :: TyFun (m (a, b)) (m a, m b) -> Type) (a6989586621681100722 :: m (a, b)) = Munzip a6989586621681100722 |
type family MunzipSym1 (a6989586621681100722 :: m (a, b)) :: (m a, m b) where ... Source #
MunzipSym1 (a6989586621681100722 :: m (a, b)) = Munzip a6989586621681100722 |