Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tristancacqueray/ki-effectful
https://github.com/tristancacqueray/ki-effectful
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tristancacqueray/ki-effectful
- Owner: TristanCacqueray
- License: mit
- Created: 2022-08-13T14:21:31.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T11:44:29.000Z (4 months ago)
- Last Synced: 2024-10-24T06:51:32.495Z (14 days ago)
- Language: Haskell
- Size: 18.6 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ki-effectful
[![Build Status](https://github.com/TristanCacqueray/ki-effectful/workflows/Haskell-CI/badge.svg?branch=main)](https://github.com/TristanCacqueray/ki-effectful/actions?query=branch%3Amain)
[![Hackage](https://img.shields.io/hackage/v/ki-effectful.svg?logo=haskell)](https://hackage.haskell.org/package/ki-effectful)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)## Description
A `StructuredConcurrency` effect for the [`effectful`][effectful] ecosystem.
## How to use
This library exposes the following elements:
* `StructuredConcurrency` — The type-level effect that you can declare in your type signatures.
example:
```haskell
runStructuredConcurrency :: IOE :> es => Eff (StructuredConcurrency : es) a -> Eff es a
```* The [`ki`][ki] api lifted to Eff:
example:
```haskell
scoped :: StructuredConcurrency :> es => (Scope -> Eff es a) -> Eff es a
fork :: StructuredConcurrency :> es => Scope -> Eff es a -> Eff es (Thread a)
```* Similarly to the `Concurrent` effect, `StructuredConcurrency` also enables `atomically` to
perform STM transaction.[effectful]: https://github.com/haskell-effectful/effectful
[ki]: https://github.com/awkward-squad/ki