Propagate semantics variants into Plinth builtins
effectfully opened this issue · 2 comments
effectfully commented
Plinth builtins don't know anything about semantics variants, meaning Plinth code evaluated as Haskell may give a different result compared to what it gives when evaluated as one of the ledger languages. And Plinth doesn't even have the latest semantics, for example this succeeds:
>>> :set -XOverloadedStrings
>>> import GHC.Real
>>> import Data.Word
>>> consByteString 121212 (BuiltinByteString "")
"|"
while according to the latest semantics variant it's supposed to fail with out of bounds error due to 121212
not fitting into Word8
.
We should do one of the following:
- propagate semantics variants into Plinth builtins
- failing that, make Plinth builtins behave according to the latest semantics variant
- give up on evaluating Plinth builtins at all (which would be pretty annoying as evaluating Plinth builtins is useful for tests)
bezirg commented
You mean it is broken for Plinth-in-Haskell ?
effectfully commented
Yes.