Copyright | (c) Nils Schweinsberg 2011 (c) George Giorgidze 2011 (c) University Tuebingen 2011 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Monadic zipping (used for monad comprehensions)
Documentation
class Monad m => MonadZip m where Source #
MonadZip
type class. Minimal definition: mzip
or mzipWith
Instances should satisfy the laws:
- Naturality :
liftM (f *** g) (mzip ma mb) = mzip (liftM f ma) (liftM g mb)
- Information Preservation:
liftM (const ()) ma = liftM (const ()) mb ==> munzip (mzip ma mb) = (ma, mb)
Instances
MonadZip [] Source # | Since: base-4.3.1.0 |
MonadZip Maybe Source # | Since: base-4.8.0.0 |
MonadZip Par1 Source # | Since: base-4.9.0.0 |
MonadZip NonEmpty Source # | Since: base-4.9.0.0 |
MonadZip Product Source # | Since: base-4.8.0.0 |
MonadZip Sum Source # | Since: base-4.8.0.0 |
MonadZip Dual Source # | Since: base-4.8.0.0 |
MonadZip Last Source # | Since: base-4.8.0.0 |
MonadZip First Source # | Since: base-4.8.0.0 |
MonadZip Identity Source # | Since: base-4.8.0.0 |
MonadZip (U1 :: * -> *) Source # | Since: base-4.9.0.0 |
MonadZip (Proxy :: * -> *) Source # | Since: base-4.9.0.0 |
MonadZip f => MonadZip (Rec1 f) Source # | Since: base-4.9.0.0 |
MonadZip f => MonadZip (Alt f) Source # | Since: base-4.8.0.0 |
(MonadZip f, MonadZip g) => MonadZip (f :*: g) Source # | Since: base-4.9.0.0 |
(MonadZip f, MonadZip g) => MonadZip (Product f g) Source # | Since: base-4.9.0.0 |
MonadZip f => MonadZip (M1 i c f) Source # | Since: base-4.9.0.0 |