Make evaluation of splitAt a bit lazier. Fixes #211.

This commit is contained in:
Brian Huffman 2015-05-05 11:27:01 -07:00
parent aa1565bac4
commit 508af4e1ec

View File

@ -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 ]