Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 1, 2021

should fix #4168


Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, materialized Nix files, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

@ghost ghost requested a review from michaelpj November 1, 2021 11:09
(runCostingFunTwoArguments . paramLessThanEqualsInteger)
toBuiltinMeaning ShiftInteger =
makeBuiltinMeaning
(\x i -> Bits.shift @Integer x (fromIntegral @Integer i))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess fromIntegral is incorrect here just like in case with ConsByteString and should be checked manually?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integer has a Bits instance, so why do we need to do this?

@michaelpj
Copy link
Contributor

I don't want to do this just now for two reasons:

  1. We need to sort out how we're going to manage adding builtins. In particular we need to not let them sneak into plutus-apps too soon.
  2. We should maybe decide which bit-manipulating operations we want overall and do them in a batch.

@ghost ghost marked this pull request as draft November 1, 2021 11:36
@kwxm
Copy link
Contributor

kwxm commented Nov 10, 2023

Superseded by #4733.

@kwxm kwxm closed this Nov 10, 2023
@kwxm kwxm deleted the add-shift-builtin branch November 10, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bit shifting primitives

3 participants