-
Notifications
You must be signed in to change notification settings - Fork 563
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
Template PureScript #140
Comments
As a first step, what about a built-in primitive like:
An example:
Basically,
The most obvious use case for something like this is sending code over the wire, Erlang-style. Right now this is only possible with some sort of restricted custom DSLs (+ free monads etc), where things like |
So I thought about this a little bit more. First of all, the type of So when an expression is reified, simply replace Furthermore, taint all binders referenced by free variables in I.e: M1:
M2:
M3:
Now, there are two free variables in the expression passed to
Now,
Now continue the process as above, recursively. Since there are no free variables in
I don't think the type checker needs to be modified for that, because the tainted flag just tells every call site to replace |
Why this is closed? |
As per the linked issue #2749, it needs an amount of research and a proper fleshed out proposal. |
Pros:
deriving
directives are the part of the library, one could define some morederiving
s (for example,Check
to generateisNothing
,isJusy
etc.)Cons:
Tutorial for macros in Scala: http://docs.scala-lang.org/overviews/macros/overview.html
The text was updated successfully, but these errors were encountered: