Update README.md.

This commit is contained in:
Yamada Ryo 2024-07-10 01:26:05 +09:00
parent c2d12f72b8
commit 14bc571358
No known key found for this signature in database
GPG Key ID: AAE3C7A542B02DBF

View File

@ -21,20 +21,32 @@ types in several ways to enable tuning in pursuit of high performance.
Please note that this library is currently in the experimental stage. There may be significant changes and potential bugs.
## Getting Started
To run the [Writer example](https://github.com/sayo-hs/heftia?tab=readme-ov-file#two-interpretations-of-the-censor-effect-for-writer):
```console
$ git clone https://github.com/sayo-hs/heftia
$ cd heftia/heftia-effects
$ cabal run exe:Writer
...
Pre-applying: Goodbye world!
Post-applying: Hello world!!
$
```
## Example
Compared to existing Effect System libraries in Haskell that handle higher-order effects, this
library's approach allows for a more effortless and flexible handling of higher-order effects. Here
are some examples:
* Extracting Multi-shot Delimited Continuations
### Extracting Multi-shot Delimited Continuations
In handling higher-order effects, it's easy to work with **multi-shot delimited continuations**.
This enables an almost complete emulation of "Algebraic Effects and Handlers".
For more details, please refer to
the [example code](heftia-effects/Example/Continuation/Main.hs).
* Two interpretations of the `censor` effect for Writer
### Two interpretations of the `censor` effect for Writer
Let's consider the following Writer effectful program: