An open API service indexing awesome lists of open source software.

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)

Awesome Lists containing this project

README

          

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.marcinzh/daae-core_3/badge.svg)](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.

![image](img/screenshot.png)

---

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
```