Replies: 1 comment 1 reply
-
In light of some conversations with the IOG folks, I'd like to propose an alternative:
I think that it might be possible to derive a PIR "Module" from a PS |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's discuss how to handle modules.
PureScript compiles code on per-module basis, because it has to maintain per-module FFI interfaces.
However, in our context we are always interested in just one function - a validator script.
We need to find a way to tie modules together.
Let's start with an obvious approach and then try to improve on it.
I propose embedding modules into CoreFn. Conceptually, a module can be seen as a function from a record of its imports to a record of its exports. Modules can't be co-recursive, so every valid module set can be transformed into a chain of let-bindings.
The downside is that modules are not zero-cost with this approach. Can we improve it?
Beta Was this translation helpful? Give feedback.
All reactions