High performance, concurrent functional programming abstractions
Go to file
2017-11-02 11:55:12 +05:30
benchmark Add bind style benchmark for simple-conduit 2017-10-31 17:48:28 +05:30
examples fix example 2017-10-30 07:50:08 +05:30
src Optimize fmap by making a custom functor instance 2017-11-02 11:55:12 +05:30
test fix test 2017-10-31 16:10:48 +05:30
.travis.yml Update the package-test ci script version 2017-10-20 09:34:53 +05:30
appveyor.yml Update the package-test ci script version 2017-10-20 09:34:53 +05:30
asyncly.cabal reorder modules in dependency order 2017-10-31 17:50:16 +05:30
LICENSE Use BSD 3-clause license for the lazy implementation 2017-09-04 15:56:05 +05:30
README.md minor edit 2017-10-20 10:49:15 +05:30
stack.yaml Comment out /opt/local/include path inclusion 2017-10-21 03:22:43 +05:30

Asyncly

Build Status Windows Build status Coverage Status

Asyncly is a general streaming and concurrent programming monad allowing you to write a wide variety of applications ranging from simple applications utilizing streaming IO to massively parallel concurrent applications as well as reactive (FRP) applications with the same ease. Asyncly provides high level concurrency primitives and hides the low level concurrency details completely from the programmer. The programmer just expresses whether a task can run in parallel with another. Threads, synchronization and concurrency rate control are handled automatically. The library has been written keeping high performance applications in mind.

Asyncly subsumes all the use cases of list transformer (list-t) and logic programming (logict) monads and adds concurrency on top. It is a streaming library and therefore can be used for most of the streaming use cases as well (i.e. where you would use conduit or pipes) with concurrency added. It is also a first class reactive programming library and can be used where you would use libraries like Yampa or reflex. One way to think about it is to think of it as composable state machines with concurrency. You can write from really simple to complex applications, from streaming to FRP or massively concurrent applications using the same simple and concise abstractions.

Here is a simple example to concurrently and recursively list the contents of a directory tree:

import Path.IO (listDir, getCurrentDir)
import Asyncly

main = runAsyncly $ getCurrentDir >>= readdir
   where readdir d = do
            (dirs, files) <- lift $ listDir d
            liftIO $ mapM_ putStrLn $ map show files
            foldMapWith (<|>) readdir dirs

See "Asyncly.Tutorial" and "Asyncly.Examples" for more details.

This library was originally inspired by the transient package authored by Alberto G. Corona.