{"id":23922675,"url":"https://github.com/vikraman/hs-coexp","last_synced_at":"2025-04-11T23:52:24.127Z","repository":{"id":164614504,"uuid":"640069594","full_name":"vikraman/hs-coexp","owner":"vikraman","description":"Continuations and Co-exponentials","archived":false,"fork":false,"pushed_at":"2024-10-30T22:06:36.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T23:52:19.908Z","etag":null,"topics":["category-theory","continuations","duality"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/vikraman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-05-12T22:58:49.000Z","updated_at":"2024-10-30T22:06:39.000Z","dependencies_parsed_at":"2024-04-10T13:13:16.121Z","dependency_job_id":"747f1375-bd1e-47d8-ad30-196dd191f29c","html_url":"https://github.com/vikraman/hs-coexp","commit_stats":null,"previous_names":["vikraman/hs-coexp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikraman%2Fhs-coexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikraman%2Fhs-coexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikraman%2Fhs-coexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikraman%2Fhs-coexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikraman","download_url":"https://codeload.github.com/vikraman/hs-coexp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497853,"owners_count":21113984,"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":["category-theory","continuations","duality"],"created_at":"2025-01-05T17:16:13.493Z","updated_at":"2025-04-11T23:52:24.097Z","avatar_url":"https://github.com/vikraman.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hs-coexp\n\n[![ci](https://github.com/vikraman/hs-coexp/actions/workflows/ci.yml/badge.svg)](https://github.com/vikraman/hs-coexp)\n\nThis is a Haskell library which explores some ideas around continuations and co-exponentials.\n\n## Modules\n\nThe library has the following modules:\n\n- `Control.Monad.Coexp`: a monadic interface for coexponentials\n- `Control.Monad.Control`: a monadic interface for control operators using coexponentials\n- `Data.Coexp`: implementation of coexponential types using `Cont`\n- `Data.Coexp.Backtrack`: backtracking combinators\n- `Control.Monad.Free.Control`: codensity encoding of `Free` monads using coexponentials\n- `Control.Arrow.Coapply`: coarrows\n- `Data.Profunctor.Coclosed`: coclosed profunctors\n\nThe examples are implemented in the following modules.\n\n- `Examples.SAT.Guess`: bruteforce SAT solver using continuations\n- `Examples.SAT.Backtrack`: backtracking SAT solver using the coexponential combinators\n- `Examples.Eff.Toss`: Sam Lindley's drunken toss example of effect handlers encoded using codensity\n- `Examples.TS.Backtrack`: backtracking tree search using the coexponential combinators\n\n## Usage\n\nThere is a test suite which:\n\n- _benchmarks_ the brute-force SAT solver against the backtracking SAT solver, and\n- runs some test cases on the drunken toss example,\n- tests the tree search example.\n\n``` sh\n$ cabal build all\n$ cabal run coexp-test -- --quickcheck-tests 1000\n```\n\n## Comments\n\nAny contributions and suggestions are most welcome.\n\nHere are some other repositories (that I know of), which also explore continuations and co-exponentials:\n\n- https://github.com/mstewartgallus/prologish/\n- https://github.com/fresnel/fresnel\n- https://github.com/robrix/sequoia\n- https://github.com/jmanuel1/idris-stuff/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikraman%2Fhs-coexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikraman%2Fhs-coexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikraman%2Fhs-coexp/lists"}