-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
MonadUnify #47
Conversation
@@ -95,13 +102,14 @@ library | |||
Covenant.Internal.TyExpr | |||
|
|||
build-depends: | |||
QuickCheck ==2.15.0.1, | |||
QuickCheck, |
There was a problem hiding this comment.
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?
src/Control/Monad/Unify.hs
Outdated
-- 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 :: |
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
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.
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.