Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 523 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 523 Bytes

Lightweight, continuation-based and minimal streaming library

Implementation of streaming from "Faster coroutine pipelines" paper.

Example: copy file contents line by line

source :: Pipeline i String IO () ()
source = impact (lines <$> readFile "text_src.txt") >>= sequence_ . fmap yield

target :: Pipeline String o IO () ()
target = forever $ await >>= impact . appendFile "text_tgt.txt" . flip (<>) "\n"

main = pipeline (source =*= target)