Skip to content

Wingman case split does the wrong thing on nested binds #1541

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

Closed
isovector opened this issue Mar 9, 2021 · 1 comment · Fixed by #1543
Closed

Wingman case split does the wrong thing on nested binds #1541

isovector opened this issue Mar 9, 2021 · 1 comment · Fixed by #1543
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@isovector
Copy link
Collaborator

@TOTBWF reports:

Found a case splitting bug

proofs :: forall ext err s m goal. (MonadExtract ext m) => s -> ProofStateT ext ext err s m goal -> m [Either err (ext, s, [goal])]
proofs s p = go s [] pure p
    where
      go :: s -> [goal] -> (goal' -> ProofStateT ext ext err s m goal) -> ProofStateT ext ext err s m goal' -> m [Either err (ext, s, [goal])]
      go s goals cont p1  = _

splitting on p1 causes this

proofs :: forall ext err s m goal. (MonadExtract ext m) => s -> ProofStateT ext ext err s m goal -> m [Either err (ext, s, [goal])]
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
proofs s p = _
@isovector isovector added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. component: wingman labels Mar 9, 2021
@isovector
Copy link
Collaborator Author

This is caused by the same underlying issue as #1516 --- namely I'm grafting decls when I should be grafting matches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant