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

Imprecise basis merging for nonfix declarations #24

Closed
shwestrick opened this issue Sep 19, 2021 · 2 comments
Closed

Imprecise basis merging for nonfix declarations #24

shwestrick opened this issue Sep 19, 2021 · 2 comments

Comments

@shwestrick
Copy link
Owner

test/fail/basis-merging-nonfix.mlb should fail, but currently it succeeds without error.

The problem: nonfix declarations should override previous infix declarations when merging bases. Currently, they do not.

Suggested solution: while parsing SML source, keep two separate InfixDicts around: one for infix declarations, and one for nonfix declarations. They can cancel each other out when there is any overlap. This allows us to cancel infix/nonfix across source files, as needed for the above test.

@shwestrick
Copy link
Owner Author

Thinking about this some more:

  • I don't think this example should fail to parse. It will fail to type-check, though (similar to as discussed in Issue with persistence of infixity status #6)
  • The suggested solution is messy. Much better is to map each identifier to one of Infix or Nonfix, depending on how it's been set.
  • Is there a good example to demonstrate this? Or does it really not matter?

@shwestrick
Copy link
Owner Author

Update: I got rid of that test case. Still trying to think of a good example where this issue actually causes a problem.

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

No branches or pull requests

1 participant