-
Notifications
You must be signed in to change notification settings - Fork 479
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
Plutus plugin should automatically mark all functions and instance methods as inlinable #4277
Comments
s/may/should? |
I believe we can't do this with plugins, but I might be wrong. Plus, you would need the INLINABLE-adding plugin to run on the modules you use, not just the ones where you compile the final PLC, which is much more difficult to set up. |
I think the streamly plugin does this with INLINE FWIW. See https://github.com/composewell/fusion-plugin |
I think that sets |
The current Plutus setup compiles libraries or brings them from IOHK cache anyway. Can we connect this plugin and simply rebuild entire library once? Or mark certain modules as used by Plutus and rebuild them with GHC having new compiler option? |
@michaelpj has something changed since the issue was opened? Does |
I don't know of a way to improve the current situation. My best ideas all involve substantial rework of the entire system :( |
I see. So this is something that would be great to have, but requires a huge amount of effort. Marking it with "Low priority" then. |
I do not understand. What is need to be reworked? If haskell stock Eq/etc will be used with |
Ultimately this is our big problem: how do we get the core for bindings in other modules? We are getting by with the current approach, but it's fragile and many things can make it go wrong. We never got very far with trying to get something into GHC to help. So: a big idea is needed IMO. |
@michaelpj Can't you just disable the optimisations then? |
a) not enough, and b) because of the way we Plutus Tx works, that also means turning off optimization for normal Haskell code compiled in that compilation, which is not what you want. There's also the fact that many things in |
It doesn't seem like we can do much within the context of this issue, so I'm closing it. Feel free to reopen if you disagree. |
Describe the feature you'd like
Most of the functions used in Plutus program need to be market as
INLINABLE
to be used outside the module.This is inconvenient. Moreover it is insufficient in some cases.
For example, automatically derived class instances cannot be fixed this way.
Describe alternatives you've considered
GHC_OPTION
that marks all functions, including derived instances as inlinable.Describe the approach you would take to implement this
I would love to talk with Plutus plugin author and get instructions on how to best add it.
The text was updated successfully, but these errors were encountered: