mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-17 21:11:35 +03:00
Make evaluation of splitAt a bit lazier. Fixes #211.
This commit is contained in:
parent
aa1565bac4
commit
508af4e1ec
@ -483,8 +483,8 @@ splitAtV front back a val =
|
||||
|
||||
-- remember that words are big-endian in cryptol, so the masked portion
|
||||
-- needs to be first, assuming that we're on a little-endian machine.
|
||||
Nat rightWidth | aBit ->
|
||||
let i = fromWord val
|
||||
Nat rightWidth | aBit, VWord (BV w a) <- val ->
|
||||
let i = mask w a
|
||||
in VTuple [ word leftWidth (i `shiftR` fromInteger rightWidth)
|
||||
, word rightWidth i ]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user