MIT licensed by Michael Snoyman
Maintained by [email protected]
This version can be pinned in stack with:conduit-1.3.5@sha256:22665df25c9c158d5fcfb299e46b0b642868add42a6bb13b79d457dc7ff7be1a,5092


conduit is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I/O which guarantees deterministic resource handling.

For more information about conduit in general, and how this package in particular fits into the ecosystem, see the conduit homepage.


ChangeLog for conduit


  • Add groupOn

  • Fix GHC 9.2 build #473

  • Library and tests compile and run with GHC 9.0.1 #455



  • Add uncons, unconsM, unconsEither, unconsEitherM.


  • Add mapInputM #435

  • More eagerly emit groups in chunksOf #427

  • Use lower-case imports (better for cross-compilation) #408


  • Add MonadFail instance for ConduitT.

  • Improve fusion framework rewrite rules

  • Replace ReadMode with WriteMode in withSinkFile

  • Test suite compatibility with GHC 8.4.1 #358


  • Drop monad-control and exceptions in favor of unliftio
  • Drop mmorph dependency
  • Deprecate old type synonyms and operators
  • Drop finalizers from the library entirely
    • Much simpler
    • Less guarantees about prompt finalization
    • No more yieldOr, addCleanup
    • Replace the Resumable types with SealedConduitT
  • Add the Conduit and Data.Conduit.Combinators modules, stolen from conduit-combinators


  • Add Semigroup instances #345

  • Fix pass in ConduitM MonadWriter instance


  • Add exceptC, runExceptC and catchExceptC to Data.Conduit.Lift


  • Add unfoldEither and unfoldEitherM to Data.Conduit.List


  • Add PrimMonad instances for ConduitM and Pipe #306

  • Ensure downstream and inner sink receive same inputs in passthroughSink #304




  • Expose yieldM for ConduitM #270

  • Fix test suite compilation on older GHCs

  • In zipConduitApp, left bias not respected mixing monadic and non-monadic conduits #263

  • Fix benchmark by adding a type signature

  • Doc updates

  • resourcet cannot be built with GHC 8 #242
  • Remove upper bound on transformers #253


  • sourceToList
  • Canonicalise Monad instances #237


  • mapAccum and mapAccumM should be strict in their state #218

  • Some documentation improvements


1.2.3 Expose connect and fuse as synonyms for $$ and =$=, respectively.

1.2.2 Lots more stream fusion.

1.2 Two performance optimizations added. (1) A stream fusion framework. This is a non-breaking change. (2) Codensity transform applied to the ConduitM datatype. This only affects users importing the .Internal module. Both changes are thoroughly described in the following to blog posts: Speeding up conduit, and conduit stream fusion.

1.1 Refactoring into conduit and conduit-extra packages. Core functionality is now in conduit, whereas most common helper modules (including Text, Binary, Zlib, etc) are in conduit-extra. To upgrade to this version, there should only be import list and conduit file changes necessary.

1.0 Simplified the user-facing interface back to the Source, Sink, and Conduit types, with Producer and Consumer for generic code. Error messages have been simplified, and optional leftovers and upstream terminators have been removed from the external API. Some long-deprecated functions were finally removed.

0.5 The internals of the package are now separated to the .Internal module, leaving only the higher-level interface in the advertised API. Internally, switched to a Leftover constructor and slightly tweaked the finalization semantics.

0.4 Inspired by the design of the pipes package: we now have a single unified type underlying Source, Sink, and Conduit. This type is named Pipe. There are type synonyms provided for the other three types. Additionally, BufferedSource is no longer provided. Instead, the connect-and-resume operator, $$+, can be used for the same purpose.

0.3 ResourceT has been greatly simplified, specialized for IO, and moved into a separate package. Instead of hard-coding ResourceT into the conduit datatypes, they can now live around any monad. The Conduit datatype has been enhanced to better allow generation of streaming output. The SourceResult, SinkResult, and ConduitResult datatypes have been removed entirely.

0.2 Instead of storing state in mutable variables, we now use CPS. A Source returns the next Source, and likewise for Sinks and Conduits. Not only does this take better advantage of GHC's optimizations (about a 20% speedup), but it allows some operations to have a reduction in algorithmic complexity from exponential to linear. This also allowed us to remove the Prepared set of types. Also, the State functions (e.g., sinkState) use better constructors for return types, avoiding the need for a dummy state on completion.

0.1 BufferedSource is now an abstract type, and has a much more efficient internal representation. The result was a 41% speedup on microbenchmarks (note: do not expect speedups anywhere near that in real usage). In general, we are moving towards BufferedSource being a specific tool used internally as needed, but using Source for all external APIs.

0.0 Initial release.