HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulepipes-safe-2.3.5Haskell2010

Pipes.Safe.Prelude

Simple resource management functions

Contents
  1. Handle management
  2. String I/O
  3. Registering/releasing
Synopsis
  • Packagepipes-safe-2.3.5
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePrelude.hs

Handle management

String I/O

Note that Strings are very inefficient, and I will release future separate packages with ByteString and Text operations. I only provide these to allow users to test simple I/O without requiring any additional library dependencies.

Registering/releasing

valueallocate
  1. :: MonadSafe m
  2. => Base m a

    Acquire

  3. -> (a -> Base m ())

    Release

  4. -> m (ReleaseKey, a)

Acquire some resource with a guarantee that it will eventually be released

The ReleaseKey can be passed to release to release the resource manually. If this has not been done by the end of the MonadSafe block, the resource will be released automatically.