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

feat(stdlib)!: Add ** (pow) operator to Pervasives module #1690

Merged
merged 7 commits into from
Feb 22, 2023

Conversation

spotandjake
Copy link
Member

This pr moves power to the runtime and adds pervasives as an operator. I didnt see anywhere to test the operator or functions in the runtime but power is well tested in the number test suite.

As I noted in discord I decided to just remake this pr as all the tests changed there were a ton of merge of conflicts and this made things easier. Replaces: #1538

Closes: #1476

stdlib/pervasives.gr Outdated Show resolved Hide resolved
@phated phated changed the title feat(stdlib)!: Move Power to runtime and add Operator feat(stdlib)!: Add ** (pow) operator to Pervasives module Feb 22, 2023
phated
phated previously approved these changes Feb 22, 2023
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Excellent work @spotandjake 🎉

@phated phated dismissed their stale review February 22, 2023 04:30

Docs still look broken

@@ -482,6 +482,39 @@ Returns:
|----|-----------|
|`Number`|The modulus of its operands|

### Pervasives.**(**)**
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be your fault, but this doesn't seem to be escaped correctly. Not sure what is happening.

Copy link
Member

Choose a reason for hiding this comment

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

I've merged in main to see if the graindoc is out of date.

Copy link
Member Author

Choose a reason for hiding this comment

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

I specifically rebuilt the compiler and regen'd the docs before pushing the last region commit so that probably isn't the case.

Copy link
Member

@phated phated Feb 22, 2023

Choose a reason for hiding this comment

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

You are correct. Markdown.bold wasn't being used in all the cases where we were bolding things 🤦

Copy link
Member

Choose a reason for hiding this comment

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

Fixed in main since #1695 landed

@spotandjake
Copy link
Member Author

Regenerated the docs, your fix looks to have worked now.

@phated phated added this pull request to the merge queue Feb 22, 2023
Merged via the queue into grain-lang:main with commit b16b455 Feb 22, 2023
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 11, 2023
…ng#1690)

* feat!: Move `Number.Pow` To Runtime and add operator to pervasives

* chore: Regen Docs

* chore: Regen Tests

* chore: Update Grain Doc

* chore: Regen Docs

---------

Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Stdlib: Move Math.pow into runtime for use in pervasives
2 participants