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

Numbers binary notation #5294

Merged
merged 7 commits into from
Aug 29, 2024
Merged

Conversation

SimaDovakin
Copy link
Contributor

Overview

This PR adds support for the binary notation for Nat and Int types (e.g., 0b101, -0b11). At first, I added a binary literal in the transcript that had invalid binary characters in the middle of the literal (e.g., 0b1210), and I got this error:

This looks like a function call, but with a Nat where the function should be. Are you missing an operator?

But the same error is thrown with hexadecimal and octal notations. So I assumed that this is an expected behavior for now. Also, I added syntax highlighting for Vim. I found that Atom's config doesn't distinguish number notations. Did I miss something?

In addition, I have to add binary notation in documentation for Nat and Int in Unison Share, right?

Copy link
Contributor

@aryairani aryairani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@aryairani aryairani merged commit d3d3dbb into unisonweb:trunk Aug 29, 2024
20 checks passed
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

Successfully merging this pull request may close these issues.

2 participants