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

Replace Expronicon with Moshi #3354

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Replace Expronicon with Moshi #3354

wants to merge 1 commit into from

Conversation

visr
Copy link
Contributor

@visr visr commented Jan 24, 2025

Draft because this would require a release and new minimum compat on SciMLBase with SciML/SciMLBase.jl#922.

This not only adapts to SciMLBase changes but also removes Expronicon from ModelingToolkit, where it was used for InferredClock and a match in sampletime.

This doesn't get rid of MLStyle, which is used for pattern matching as well, but perhaps it would make sense as a follow up to start using Moshi for that as well.

@AayushSabharwal
Copy link
Member

Yeah this is breaking, unfortunately

@visr
Copy link
Contributor Author

visr commented Jan 26, 2025

What is breaking exactly? I know the tests are failing in this draft PR because this needs SciML/SciMLBase.jl#922 first. And to avoid that breaking MTK I made #3353, which should be merged first. I was hoping this way it wouldn't be breaking.

@AayushSabharwal
Copy link
Member

Are Moshi.jl ADTs matchable via MLStyle?

@visr
Copy link
Contributor Author

visr commented Jan 27, 2025

Both Moshi and MLStyle support extensible pattern matching, so probably that can be made to work. Where is MLStyle.@match being called on Clock ADTs? In the MTK code I just see it called on expressions.

https://thautwarm.github.io/MLStyle.jl/latest/syntax/pattern.html#custom-patterns
https://rogerluo.dev/Moshi.jl/start/match/#extensible-pattern-matching

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