HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulepipes-4.3.16Haskell2010

Pipes.Internal

This is an internal module, meaning that it is unsafe to import unless you understand the risks.

This module provides a fast implementation by weakening the monad transformer laws. These laws do not hold if you can pattern match on the constructors, as the following counter-example illustrates:

lift . return = M . return . Pure

return = Pure

lift . return /= return

You do not need to worry about this if you do not import this module, since the other modules in this library do not export the constructors or export any functions which can violate the monad transformer laws.

  • 2 types
  • 3 values
  • Packagepipes-4.3.16
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

Internal

5 declarations
datadata Proxy a' a b' b (m :: Type -> Type) r
#

A Proxy is a monad transformer that receives and sends information on both an upstream and downstream interface.

The type variables signify:

  • a' and a - The upstream interface, where (a')s go out and (a)s come in

  • b' and b - The downstream interface, where (b)s go out and (b')s come in

  • m - The base monad

  • r - The return value

Constructors

Instances16MFunctor, MonadError, MonadReader, MonadState, MonadWriter, MonadTrans, …
valueunsafeHoist
  1. :: Functor m
  2. => forall x. m x -> n x
  3. -> Proxy a' a b' b m r
  4. -> Proxy a' a b' b n r
#

unsafeHoist is like hoist, but faster.

This is labeled as unsafe because you will break the monad transformer laws if you do not pass a monad morphism as the first argument. This function is safe if you pass a monad morphism as the first argument.

typetype X = Void
#

The empty type, used to close output ends