Conversation
This was referenced Dec 18, 2024
acl-cqc
reviewed
Jan 6, 2025
| ^^^ | ||
|
|
||
| Expected to work out values for these holes: | ||
| In checking_check_defs_1_g_1_Eval 0 |
Collaborator
There was a problem hiding this comment.
Does #54 help here? I guess we can punt it until that if this goes in first
acl-cqc
approved these changes
Jan 7, 2025
Collaborator
acl-cqc
left a comment
There was a problem hiding this comment.
Great stuff and nice minimal PR! :)
brat/Brat/Checker/Monad.hs
Outdated
| RemoveHope e -> let hset = hopes ctx in | ||
| if M.member e hset | ||
| then handler (k ()) (ctx { hopes = M.delete e hset }) g | ||
| else Left (dumbErr (InternalError ("Trying to remove Hope not in set: " ++ show e))) |
Collaborator
There was a problem hiding this comment.
Suggested change
| else Left (dumbErr (InternalError ("Trying to remove Hope not in set: " ++ show e))) | |
| else Left (dumbErr (InternalError ("Trying to remove unknown Hope: " ++ show e))) |
brat/Brat/Checker/SolveHoles.hs
Outdated
| [e1, e2] | e1 == e2 -> pure () -- trivially same, even if both still yet-to-be-defined | ||
| _es -> error "TODO: must wait for one or the other to become more defined" | ||
|
|
||
| -- This will update the `hopes` set, potentially invalidating things that have |
Collaborator
There was a problem hiding this comment.
Suggested change
| -- This will update the `hopes` set, potentially invalidating things that have | |
| -- This will update the `hopes, potentially invalidating things that have |
| typeEqEta _ (Zy :* _ :* _) hopes Nat exp act | ||
| | Just (SPar (InEnd e)) <- isNumVar exp, M.member e hopes = solveHope Nat e act | ||
| | Just (SPar (InEnd e)) <- isNumVar act, M.member e hopes = solveHope Nat e exp | ||
| -- 2. harder cases, neither is in the hope set, so we can't define it ourselves |
Collaborator
There was a problem hiding this comment.
Suggested change
| -- 2. harder cases, neither is in the hope set, so we can't define it ourselves | |
| -- 2. harder cases, neither is in `hopes`, so we can't define it ourselves |
Collaborator
There was a problem hiding this comment.
Left hope set as OK terminology, but removed things like
`hopes` set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
!as type to be inferred when there is exactly one solution.typeEqfromeqTest, into new SolveHoles.hs, with some beginnings of support for nat holesdoesntOccurfrom SolvePatterns.hs to Eval.hs and factor outgetNumVarhlints in Helpers.hspullPortsand Parser.hspullAndJuxtCloses #28.