https://github.com/marcinzh/daae
Debug as an Effect (DaaE)
https://github.com/marcinzh/daae
algebraic-effects functional-programming scala
Last synced: about 1 month ago
JSON representation
Debug as an Effect (DaaE)
- Host: GitHub
- URL: https://github.com/marcinzh/daae
- Owner: marcinzh
- License: mit
- Created: 2024-01-03T14:40:03.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-21T10:23:13.000Z (11 months ago)
- Last Synced: 2025-04-21T11:29:51.154Z (11 months ago)
- Topics: algebraic-effects, functional-programming, scala
- Language: Scala
- Homepage:
- Size: 64.5 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://maven-badges.herokuapp.com/maven-central/io.github.marcinzh/daae-core_3)
# Debug as an Effect (DaaE)
Tiny debugger, implemented with Algebraic Effects.
Inspired by [stepwise](https://share.unison-lang.org/@pchiusano/stepwise)
for [Unison](https://www.unison-lang.org/) language.
In [this announcement post on Twitter](https://twitter.com/pchiusano/status/1502760429466042368),
the author linked [this 3-minute video](https://www.loom.com/share/e26bd00831464241bcc5e1961840af19), showing the debugger in action.
---
This project is a reimplementation of the idea in Scala,
using [Turbolift](https://github.com/marcinzh/turbolift) effect system.

---
You can run included demos using [`scala-cli`](https://scala-cli.virtuslab.org/).
> [!IMPORTANT]
> Turbolift requires **Java 11** or newer.
1. [OriginalDemo](modules/demos/src/main/scala/demos/OriginalDemo.scala) - The original demo from [stepwise](https://share.unison-lang.org/@pchiusano/stepwise), shown in the video. Translated to Scala.
```bash
scala-cli https://raw.githubusercontent.com/marcinzh/daae/master/modules/demos/src/main/scala/demos/OriginalDemo.scala
```
2. [TreeWalk](modules/demos/src/main/scala/demos/TreeWalk.scala) - Using multiple effects. Demonstrates that when `Debug` goes back in time, local state (e.g. `Reader`, `State`, `Writer`) gets restored as well.
```bash
scala-cli https://raw.githubusercontent.com/marcinzh/daae/master/modules/demos/src/main/scala/demos/TreeWalk.scala
```