Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drewolson/effectful-example
https://github.com/drewolson/effectful-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/drewolson/effectful-example
- Owner: drewolson
- License: bsd-3-clause
- Created: 2024-05-12T00:17:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-13T15:58:10.000Z (7 months ago)
- Last Synced: 2024-05-22T17:41:27.849Z (7 months ago)
- Language: Haskell
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MTL works
```
$ stack run -- mtl
``````
$ curl localhost:3000/stream
{"itemId":1,"itemText":"Drew"}
{"itemId":2,"itemText":"Drew"}
{"itemId":3,"itemText":"Drew"}
{"itemId":4,"itemText":"Drew"}
{"itemId":5,"itemText":"Drew"}
{"itemId":6,"itemText":"Drew"}
{"itemId":7,"itemText":"Drew"}
{"itemId":8,"itemText":"Drew"}
{"itemId":9,"itemText":"Drew"}
{"itemId":10,"itemText":"Drew"}
```# Effectful ~~fails~~ works
Effectful now works thanks to `withCloneEnv` helper! See [this
issue](https://github.com/haskell-effectful/effectful/issues/219).```
$ stack run -- effectful
``````
$ curl localhost:3000/stream
{"itemId":1,"itemText":"Drew"}
{"itemId":2,"itemText":"Drew"}
{"itemId":3,"itemText":"Drew"}
{"itemId":4,"itemText":"Drew"}
{"itemId":5,"itemText":"Drew"}
{"itemId":6,"itemText":"Drew"}
{"itemId":7,"itemText":"Drew"}
{"itemId":8,"itemText":"Drew"}
{"itemId":9,"itemText":"Drew"}
{"itemId":10,"itemText":"Drew"}
```