-
Notifications
You must be signed in to change notification settings - Fork 5
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
Push Sync/Async constraints to interpreter level #18
Conversation
Thanks for your PR and your interest! I also very much prefer the tagless final style and pushing Please see this related issue: I need to take a closer look at this PR. fs2-dom is largely inspired by the fs2-io module, except instead of wrapping I/O APIs (socket, files, etc.) it wraps browser APIs. So my original intention was to follow the design patterns used there. |
@2chilled thanks, I thought about this a bit and I am having a little bit of trouble understanding how this makes a difference in practice. Sorry 😅 If you don't mind, do you maybe have small example? That shows the problems with the current design, and how this PR will help that? I think it would be helpful to put these changes into some context. Thanks! |
Yes, I'll integrate a local snapshot version of this branch into calico and rewrite your example there. Hope I'll find time for this in the evening. |
Cool! You may want to look at my branch with some redesign for Calico 0.2. Indeed, in the TodoMVC example based on that branch there are only a few places that
Everything else can already be written in tagless final style using only Looking forward to hearing your thoughts, thanks! |
Hi @armanbilge, sorry for late response, I'm quite busy these days. Hope I'll find time this weekend to look into your tagless TodoMvc. Just to keep you on track regarding my side: Started to integrate fs2-dom SNAPSHOT into calico main branch. I'm now at a point where it almost typechecks, although another rabbit hole popped up: Your I know it's quite a bit of work to write DomDsl, but I think it's the only way to stay |
No problem at all, take your time. Thanks for the update :)
Haha, yes, that's why I avoided this issue until now 😄 I agree, it is a necessity. After making some progress on that issue I am feeling optimistic about it :) thanks for the encouragement! |
Closing this for now. If Dom API Wrapping works, this'll be at interpreter level anyway. |
Hi @armanbilge,
I stumbled across your calico project and am really considering to use it in a real world project. As I favor writing tagless final code I noticed both calico and fs2-dom use Sync/Async constraints at DSL level. Unfortunately this hinders effect tracking capabilities, since these constraints are so expressive they represent kind of all effects thinkable, similar to using IO directly.
This PR aims to mitigate this by pushing these "rule them all" constraints to interpreter level. Let me know what you think about this pattern. If you like it I am happy to PR something similar to calico 😃