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

@slots x::T #150

Open
jariji opened this issue Mar 28, 2023 · 3 comments
Open

@slots x::T #150

jariji opened this issue Mar 28, 2023 · 3 comments

Comments

@jariji
Copy link

jariji commented Mar 28, 2023

I can say

@slots x @rule log(exp(x::Real)) --> x

but I wonder if the constraint should go with the slot declaration

@slots x::Real @rule log(exp(x)) --> x

This would be easier to read.

@0x0f0f0f
Copy link
Member

cool idea!

@jariji
Copy link
Author

jariji commented Feb 21, 2024

This too would be much easier to read with just @theory p::Bool q::Bool begin instead of having to rewrite ::Bool at each location.

@theory p q begin
  (p::Bool == q::Bool) => (p == q)
  (p::Bool || q::Bool) => (p || q)
  (p::Bool  q::Bool)  => ((p || q) == q)
  (p::Bool && q::Bool) => (p && q)
  !(p::Bool)           => (!p)
end

@0x0f0f0f
Copy link
Member

Adding it to the list for 3.0

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

No branches or pull requests

2 participants