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

Make haskellModuleRulesToRuleInfos more strict when calling haskellModulesToModuleData #28

Open
googleson78 opened this issue Apr 29, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@googleson78
Copy link
Contributor

In haskellModuleRulesToRuleInfos, when we convert a module rule to rule data, we expect to get at most 1 mod data (and the code doesn't handle the case in which it returns more than one). Since this is post-condition that's present there, we should assert (by fatalling) if this goes wrong, because it happen to be very wrong.

It might also be worth making a specialised haskellModuleToModuleData which doesn't return a slice too, where we can also place the assert.

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

No branches or pull requests

1 participant