Foundation.Conduit.Textual

foundation-0.0.30: Alternative prelude with batteries and no dependencies

Safe Haskell | None
Language | Haskell2010

Foundation.Conduit.Textual

Synopsis

- lines :: forall (m :: Type -> Type). Monad m => Conduit String String m ()
- words :: forall (m :: Type -> Type). Monad m => Conduit String String m ()
- fromBytes :: forall (m :: Type -> Type). MonadThrow m => Encoding -> Conduit (UArray Word8) String m ()
- toBytes :: forall (m :: Type -> Type). Monad m => Encoding -> Conduit String (UArray Word8) m ()

# Documentation

lines :: forall (m :: Type -> Type). Monad m => Conduit String String m () #

Split conduit of string to its lines

This is very similar to Prelude lines except it work directly on Conduit

Note that if the newline character is not ever appearing in the stream, this function will keep accumulating data until OOM

TODO: make a size-limited function

words :: forall (m :: Type -> Type). Monad m => Conduit String String m () #

fromBytes :: forall (m :: Type -> Type). MonadThrow m => Encoding -> Conduit (UArray Word8) String m () #

toBytes :: forall (m :: Type -> Type). Monad m => Encoding -> Conduit String (UArray Word8) m () #