Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonadUnify #47

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

MonadUnify #47

wants to merge 6 commits into from

Conversation

kozross
Copy link
Member

@kozross kozross commented Feb 18, 2025

Adds MicroKanren-style unification as a capability monad, together with a basic concrete stack that implements it. This is a necessary prerequisite to #41.

@KristianBalaj and @itsfarseen - please let me know if this requires more documentation to explain how it works. There's potentially a lot of complexity here, and some of the choices are somewhat unique to our situation, so it might benefit from clarification. Also, more laws are definitely needed, but I couldn't think of any others.

@@ -95,13 +102,14 @@ library
Covenant.Internal.TyExpr

build-depends:
QuickCheck ==2.15.0.1,
QuickCheck,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dropping the QuickCheck constraints?

-- Helper for querying the state of a variable. It can either be fresh
-- (`Nothing`), bound to a definition (`Just . Left`) or part of an equivalence
-- class without a definition (`Just . Right`).
definedAs ::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe we could use a custom sum type instead of Either so it's more expressive? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even the Maybe could be replaced with something more specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants