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

Ir: explicit NumConvPrim #599

Merged
merged 3 commits into from
Jul 26, 2019
Merged

Ir: explicit NumConvPrim #599

merged 3 commits into from
Jul 26, 2019

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Jul 26, 2019

… instead of string-typed prim names.

This extends the IR AST with that node. IR checker not (yet) extended.

The transitition from Source (with untyped prims of arbitrary string) to
IR (with a more structured AST) is a bit, eh, bumpy. But that might be
fine, as this bumpyness only applies to code written in the sacred
prelude.

this extend the IR AST with that node. IR checker not (yet) extended.

The transitition from Source (with untyped prims of arbitrary string) to
IR (with a more structured AST) is a bit, eh, bumpy. But that might be
fine, as this bumpyness only applies to code written in the sacred
prelude.
@nomeata nomeata requested review from ggreif and crusso July 26, 2019 11:29
@nomeata
Copy link
Collaborator Author

nomeata commented Jul 26, 2019

Darn, can’t use regex functions from Str. if we want to compile to JS.

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

This looks very reasonable. I assume you mostly moved code around and massaging it mechanically to get from strings to pairs of types. Then the review burden should be rather small.

One thing that I just remembered, the function name_of_type should check if the last char is already a >, and then refrain from adding the angle brackets. Not necessarily in this PR, though.

src/codegen/compile.ml Outdated Show resolved Hide resolved
@nomeata
Copy link
Collaborator Author

nomeata commented Jul 26, 2019

This looks very reasonable. I assume you mostly moved code around and massaging it mechanically to get from strings to pairs of types.

Yeah. Lots of :%s/…/…/g :-)

Co-Authored-By: Gabor Greif <ggreif@gmail.com>
@nomeata nomeata merged commit 9f186ab into master Jul 26, 2019
@nomeata nomeata deleted the joachim/num_conv_prim branch July 26, 2019 16:39
dfinity-bot added a commit that referenced this pull request Nov 15, 2023
## Changelog for motoko-base:
Branch: next-moc
Commits: [dfinity/motoko-base@91466aa5...b28632e4](dfinity/motoko-base@91466aa...b28632e)

* [`3d0bcedb`](dfinity/motoko-base@3d0bced) bugfix: Array.chain(as,f) incorrectly trapping when f(a) is an empty array. ([dfinity/motoko-base⁠#599](https://togithub.com/dfinity/motoko-base/issues/599))
mergify bot pushed a commit that referenced this pull request Nov 15, 2023
## Changelog for motoko-base:
Branch: next-moc
Commits: [dfinity/motoko-base@91466aa5...b28632e4](dfinity/motoko-base@91466aa...b28632e)

* [`3d0bcedb`](dfinity/motoko-base@3d0bced) bugfix: Array.chain(as,f) incorrectly trapping when f(a) is an empty array. ([dfinity/motoko-base⁠#599](https://togithub.com/dfinity/motoko-base/issues/599))
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