-
Notifications
You must be signed in to change notification settings - Fork 17
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
Creating a DSL #24
Comments
Let me see if I understand... Every method would be a function which would have a type similar to the following one?
|
@rainbyte They already do since we usually need to do IO in them; the only changes this makes to type signatures is that we
|
Is there any update for this? plus what about Godot monad abstracting over |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The currently pending PR (#23) requires the user to make use of Template Haskell, which made me think that if we're going to introduce code generation we may as well go all the way and create a DSL that is at least ergonomic to use and closer to GDScript in syntax.
I doodled some pseudo code for what we might want it to end up looking like:
this would generate loosely something like this:
This could probably be made even tidier with a state transformer type.
The result is much closer to a functional substitute for GDScript, but whether this works in implementation remains to be seen, as I haven't spent enough time with Haskell code generation to spot any blockers but handling variable number of arguments for various top level function declarations might be difficult (or not).
It may be worth investigating available extensible records libraries as well.
The text was updated successfully, but these errors were encountered: