Expose multiIndexArray to Plinth (CIP-0156)#7845
Merged
Merged
Conversation
Contributor
Unisay
force-pushed
the
yura/issue-1675-multi-index-array
branch
from
July 16, 2026 09:11
32c205d to
eaeb73f
Compare
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
2 times, most recently
from
July 16, 2026 13:21
ee70ddb to
8d116ee
Compare
Unisay
force-pushed
the
yura/issue-1675-multi-index-array
branch
from
July 17, 2026 11:29
eaeb73f to
b088b82
Compare
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
from
July 17, 2026 11:42
8d116ee to
4bca134
Compare
Unisay
marked this pull request as ready for review
July 21, 2026 15:20
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
from
July 22, 2026 12:32
4bca134 to
c10c219
Compare
Unisay
force-pushed
the
yura/issue-1675-multi-index-array
branch
from
July 22, 2026 12:33
255dd07 to
f1b60c0
Compare
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
from
July 22, 2026 12:34
c10c219 to
4a74f77
Compare
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
from
July 23, 2026 11:49
4a74f77 to
d5510ec
Compare
Adds the PlutusTx.Builtins.multiIndexArray wrapper (mirroring indexArray: out-of-range indices fail, results in index-list order with duplicates preserved) and maps it to the MultiIndexArray builtin in the plugin, replacing the no-op arm. Golden tests cover the compiled PIR, UPLC, and CEK evaluation under GHC 9.6 and 9.12. Issue: IntersectMBO/plutus-private#2265
…y wrapper The Haskell simulation now matches the builtin: an index exceeding maxBound::Int is out-of-bounds instead of wrapping on conversion, and any out-of-bounds index fails the whole call regardless of how much of the result list is demanded. Issue: IntersectMBO/plutus-private#2265
Pins the Haskell definition to the builtin semantics: index-list order with duplicates, eager Integer-domain bounds checking (an index exceeding maxBound::Int fails rather than wrapping), and whole-call failure regardless of how much of the result is demanded. Issue: IntersectMBO/plutus-private#2265
Builds the index list as a lifted list constant via toBuiltin instead of an mkCons chain, matching the liftCodeDef idiom used for the other array-test inputs. Issue: IntersectMBO/plutus-private#2265
Unisay
force-pushed
the
yura/issue-2265-multi-index-array-plinth
branch
from
July 24, 2026 08:43
d5510ec to
269b917
Compare
zliu41
approved these changes
Jul 24, 2026
| import Test.Tasty.HUnit (Assertion, assertBool, testCase, (@?=)) | ||
| import Prelude | ||
|
|
||
| -- The wrapper must fail exactly where the on-chain builtin fails: any index outside |
Member
There was a problem hiding this comment.
I don't think "wrapper" is standard terminology. It took me a few seconds to realize what it means.
Contributor
Author
There was a problem hiding this comment.
Gotcha. How would you call those "opaque" Plinth functions?
Member
There was a problem hiding this comment.
"Haskell implementation of the builtin"?
Unisay
enabled auto-merge (squash)
July 24, 2026 17:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes the
multiIndexArraybuiltin (CIP-0156) to Plinth: adds thePlutusTx.Builtins.multiIndexArrayHaskell implementation and the plugin mapping that replaces the no-op arm left by #7844. It mirrorsindexArray: indices out of range fail, in index-list order with duplicates preserved.Closes https://github.com/IntersectMBO/plutus-private/issues/2265