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
lbfHaskellPrelude
Nothing controversial here, this maps to native Haskell which is base and containers library and all opaque types and their instances ofc supported.
Treat PlutusTx as a separate language.
lbfPlutusTx codegenes PlutusTx code with configurations plutustx-prelude.json and plutustx-plutus.json, since there's some LBF Prelude types that are naturally available in PlutusTx.
The modules generated go into LB.SomeModule.PlutusTx (similar to how Plutarch backend has LB.SomeModule.Plutarch)
Have lbfHaskellPlutus map into native Haskell and not PlutusTx. It should generate code into LB.SomeModule and use pretty much native Haskell types. This can be used for transaction building for example, and the only dependency is PLA.
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
lbfHaskellPrelude
Nothing 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.
lbfHaskellPlutus
However, this is shit!!!
I collated two things that shouldn't have been collated:
And now I have this shit
Solution
Treat PlutusTx as a separate language.
lbfPlutusTx
codegenes PlutusTx code with configurationsplutustx-prelude.json
andplutustx-plutus.json
, since there's some LBF Prelude types that are naturally available in PlutusTx. The modules generated go intoLB.SomeModule.PlutusTx
(similar to how Plutarch backend hasLB.SomeModule.Plutarch
)Have
lbfHaskellPlutus
map into native Haskell and not PlutusTx. It should generate code intoLB.SomeModule
and use pretty much native Haskell types. This can be used for transaction building for example, and the only dependency is PLA.