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

Numeric, ordering and equality traits #2433

Merged
merged 12 commits into from
Oct 9, 2023
Merged

Numeric, ordering and equality traits #2433

merged 12 commits into from
Oct 9, 2023

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Oct 5, 2023

  • Adapts to Standard library traits juvix-stdlib#86
  • Adds a pass in toEvalTransformations to automatically inline all record projection functions, regardless of the optimization level. This is necessary to ensure that arithmetic operations and comparisons on Nat or Int are always represented directly with the corresponding built-in Core functions. This is generally highly desirable and required for the Geb target.
  • Adds the inline: always pragma which indicates that a function should always be inlined during the mandatory inlining phase, regardless of optimization level.

@lukaszcz lukaszcz added this to the 0.5.3 milestone Oct 5, 2023
@lukaszcz lukaszcz self-assigned this Oct 5, 2023
@lukaszcz lukaszcz force-pushed the numeric-traits branch 2 times, most recently from da40b3e to 872cce7 Compare October 6, 2023 18:01
@lukaszcz lukaszcz marked this pull request as ready for review October 9, 2023 10:04
@lukaszcz lukaszcz merged commit 60a191b into main Oct 9, 2023
4 checks passed
@lukaszcz lukaszcz deleted the numeric-traits branch October 9, 2023 16:25
lukaszcz added a commit to anoma/juvix-stdlib that referenced this pull request Oct 20, 2023
* Operators for `Ord` and `Eq`.
* Conversion function from `Ord` to `Eq` in `Stdlib.Trait.Ord.Eq`.
* Numeric traits: `Natural` and `Integral`.
* By default the comparison and arithmetic operators refer to the
generic traits. The operators specific to the data types (`Nat`, `Int`)
need to be imported separately or prefixed with `Nat`, `Int`.
* Requires anoma/juvix#2433
* Requires anoma/juvix#2441
* The `quickcheck` library needs to be updated for tests to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants