Copyright | (c) Nils Schweinsberg 2011, (c) George Giorgidze 2011 (c) University Tuebingen 2011 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
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)
MonadZip [] Source # | |
MonadZip Maybe Source # | |
MonadZip U1 Source # | |
MonadZip Par1 Source # | |
MonadZip Last Source # | |
MonadZip First Source # | |
MonadZip Product Source # | |
MonadZip Sum Source # | |
MonadZip Dual Source # | |
MonadZip NonEmpty Source # | |
MonadZip Identity Source # | |
MonadZip f => MonadZip (Rec1 f) Source # | |
MonadZip (Proxy *) Source # | |
(MonadZip f, MonadZip g) => MonadZip ((:*:) f g) Source # | |
MonadZip f => MonadZip (Alt * f) Source # | |
MonadZip f => MonadZip (M1 i c f) Source # | |
(MonadZip f, MonadZip g) => MonadZip (Product * f g) Source # | |