{"id":18729530,"url":"https://github.com/gabryon99/kotlin-effects","last_synced_at":"2025-08-31T23:32:06.407Z","repository":{"id":197617334,"uuid":"698998705","full_name":"gabryon99/kotlin-effects","owner":"gabryon99","description":"A Kotlin library implementing algebraic effect handlers.","archived":false,"fork":false,"pushed_at":"2023-10-23T15:17:49.000Z","size":588,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-07T14:32:20.048Z","etag":null,"topics":["algebraic-effect-handlers","algebraic-effects","continuations","kotlin","thesis"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabryon99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-01T16:14:32.000Z","updated_at":"2024-10-30T20:41:39.000Z","dependencies_parsed_at":"2023-10-01T19:44:30.113Z","dependency_job_id":"6d1b6479-f34d-49de-870c-683d914e4ebc","html_url":"https://github.com/gabryon99/kotlin-effects","commit_stats":null,"previous_names":["gabryon99/kotlin-effects"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabryon99%2Fkotlin-effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabryon99%2Fkotlin-effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabryon99%2Fkotlin-effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabryon99%2Fkotlin-effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabryon99","download_url":"https://codeload.github.com/gabryon99/kotlin-effects/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231639028,"owners_count":18404262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebraic-effect-handlers","algebraic-effects","continuations","kotlin","thesis"],"created_at":"2024-11-07T14:27:28.780Z","updated_at":"2024-12-28T14:37:08.836Z","avatar_url":"https://github.com/gabryon99.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Effects\nA Kotlin library implementing **algebraic effect handlers**. This library\nis the result of my thesis did at the **Technical University of Munich** with the collaboration of **JetBrains Research**.\n\nThe library shows the feasibility of implementing algebraic effect handlers within\nthe Kotlin programming language. Here is a brief list containing library's main points:\n\n* Effects are defined with classes/objects inhereting from the `Effect` interface.\n* Effectful computations are invoked within a `handle e with h` expression, where `e` is an effectful function and `h` is an effect handler.\n* The library **does not support** multishot continuations.\n* The provided handler semantics is the **deep** one.\n* Effects are performed using the `do/perform` notation (maybe not the best Kotlin idiomatic choice).\n\n```kotlin\nobject Read: Effect\u003cString\u003e\n\n@Test\nfun `MPretnar - Simple Read Effect`() {\n    handle {\n        val firstName = perform(Read)\n        val lastname = perform(Read)\n        println(\"Full Name: $firstName $lastname\")\n    } with { effect -\u003e\n        when (effect) {\n            is Read -\u003e resume(\"Bob\")\n            else -\u003e unhandled()\n        }\n    }\n}\n```\n\nEffect handlers are implemented on top of Kotlin's coroutines system, using linear continuations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabryon99%2Fkotlin-effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabryon99%2Fkotlin-effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabryon99%2Fkotlin-effects/lists"}