-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
There was a problem hiding this 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 } } |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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.
d04a352
Improvements and unification of the RISE syntax based on the discussion in #67