Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ So, what to do? We adopt the following strategy:
- We allow lifting/unlifting 'Int' via 'Int64' and 'Word' via 'Word64', constraining the conversion
between them to 64-bit architectures where this conversion is safe.

Doing this effectively bans builds on 32-bit systems, but that's fine, since we don't care about
supporting 32-bit systems anyway, and this way any attempts to build on them will fail fast.
Doing this effectively bans builds on all non-64-bit systems, which is acceptable since 64-bit
systems are required for node deployment, and this way any attempts to build on them will fail fast.

We used to use newtype- and via-deriving for implementations of relevant instances, but at some
point GHC stopped attaching @INLINE@ annotations to those causing the GHC Core for builtins to have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ enterComputeCek = computeCek
-- Word64 value wraps to -1 as an Int64. So you can't wrap around enough to get an
-- "apparently good" value.
(VConstr i _)
| fromIntegral @_ @Integer i > fromIntegral @Int @Integer maxBound ->
| i > fromIntegral @Int @Word64 maxBound ->
throwErrorDischarged (StructuralError (MissingCaseBranchMachineError i)) e
-- Otherwise, we can safely convert the index to an Int and use it.
(VConstr i args) -> case (V.!?) cs (fromIntegral i) of
Expand Down
Loading