Skip to content
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

Propagate semantics variants into Plinth builtins #6399

Closed
effectfully opened this issue Aug 9, 2024 · 3 comments
Closed

Propagate semantics variants into Plinth builtins #6399

effectfully opened this issue Aug 9, 2024 · 3 comments

Comments

@effectfully
Copy link
Contributor

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:

  1. propagate semantics variants into Plinth builtins
  2. failing that, make Plinth builtins behave according to the latest semantics variant
  3. give up on evaluating Plinth builtins at all (which would be pretty annoying as evaluating Plinth builtins is useful for tests)
@bezirg
Copy link
Contributor

bezirg commented Aug 12, 2024

You mean it is broken for Plinth-in-Haskell ?

@effectfully
Copy link
Contributor Author

Yes.

@effectfully
Copy link
Contributor Author

effectfully commented Oct 3, 2024

Closing as a duplicate of #5968.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants