-
Notifications
You must be signed in to change notification settings - Fork 1
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
Haskell codegen: No instance for ‘LambdaBuffers.Runtime.Prelude.Json LambdaBuffers.Plutus.V1.TxOutRef’ #197
Comments
The core problem is that Because during codegen, 'nothing' that requires this import was 'used'. It's a known problem that we don't specify in our configuration a a mapping from a LB |
This is getting annoying |
Probably a duplicate of #124 |
To expand on this, as this is utterly my doing. Honestly, it wasn't really clear to me how to separate all this, but now the user aspect has clarified for me and I see things differently. I'll talk about Haskell related back-ends, which I'll call native Haskell, Plutarch and PlutusTx. And we have 2 LBF packages, namely Prelude and Plutus! We have two Nix functions to build lbf schemas for Haskell lbfHaskellPreludeNothing controversial here, this maps to native Haskell which is base and containers library and all opaque types and their instances ofc supported. This is the codegen config https://github.com/mlabs-haskell/lambda-buffers/blob/main/lambda-buffers-codegen/data/haskell-prelude-base.json Simple enough. lbfHaskellPlutusHowever, this is shit!!! I collated two things that shouldn't have been collated:
And now I have this shit
SolutionTreat PlutusTx as a separate language. Have |
Once everything is put together, everything should compile, the fact that it doesn't means this is a bug.
Some deets:
Imports printed
Cabal printed
Workaround
Add this to your problematic schema which will bring in the necessary imports.
The text was updated successfully, but these errors were encountered: