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

Improved RISE syntax #70

Merged
merged 10 commits into from
Oct 7, 2020
Merged

Improved RISE syntax #70

merged 10 commits into from
Oct 7, 2020

Conversation

michel-steuwer
Copy link
Member

Improvements and unification of the RISE syntax based on the discussion in #67

fedepiz
fedepiz previously approved these changes Sep 29, 2020
Copy link
Contributor

@fedepiz fedepiz left a comment

Choose a reason for hiding this comment

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

Looks good to me

@primitive object sub extends Primitive with Builder { impl{ t: DataType => t ->: t ->: t } }
@primitive object mul extends Primitive with Builder { impl{ t: DataType => t ->: t ->: t } }
@primitive object div extends Primitive with Builder { impl{ t: DataType => t ->: t ->: t } }
@primitive object mod extends Primitive with Builder { impl{ t: DataType => t ->: t ->: t } }
Copy link
Member

Choose a reason for hiding this comment

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

These primitives should only work on "basic types" (scalars/vectors). rise-lang/rise#11
Maybe we can leave a TODO in the code at least?

}

@primitive object asScalar extends Primitive with Builder {
implNat(n => implNat(m => implST(t =>
(m`.`vec(n, t)) ->: ((m * n)`.`t))))
impl{ n: Nat => impl{ m: Nat => impl{ t: DataType =>
Copy link
Member

Choose a reason for hiding this comment

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

same for the scalar type.

Bastacyclop
Bastacyclop previously approved these changes Oct 6, 2020
@michel-steuwer michel-steuwer merged commit 90586cd into master Oct 7, 2020
@michel-steuwer michel-steuwer deleted the feature/improve-RISE-syntax branch October 7, 2020 14:02
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.

3 participants