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

Standard library traits #86

Merged
merged 23 commits into from
Oct 20, 2023
Merged

Standard library traits #86

merged 23 commits into from
Oct 20, 2023

Conversation

lukaszcz
Copy link
Contributor

@lukaszcz lukaszcz commented Oct 4, 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 Numeric, ordering and equality traits juvix#2433
  • Requires Case value inlining juvix#2441
  • The quickcheck library needs to be updated for tests to work.

@lukaszcz lukaszcz self-assigned this Oct 4, 2023
@lukaszcz lukaszcz marked this pull request as ready for review October 9, 2023 10:03
@lukaszcz lukaszcz requested review from paulcadman and janmasrovira and removed request for paulcadman October 9, 2023 10:03
lukaszcz added a commit to anoma/juvix that referenced this pull request Oct 9, 2023
* Adapts to anoma/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 added a commit to anoma/juvix that referenced this pull request Oct 12, 2023
* Introduces the `inline: case` pragma which causes an identifier to be
inlined if it is matched on. This is necessary to support GEB without
compromising optimization for other targets.
* Adapts to the new commits in
anoma/juvix-stdlib#86
@lukaszcz lukaszcz merged commit aa3809f into main Oct 20, 2023
1 check passed
jonaprieto pushed a commit to anoma/juvix-docs that referenced this pull request Nov 1, 2023
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