File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import Control.DeepSeq ( NFData(..) )
3636import Language.Haskell.Liquid. ProofCombinators hiding ((?) )
3737import ProofCombinators
3838import qualified Data.Primitive. Types as P
39+ import qualified Array as key
3940
4041--------------------------------------------------------------------------------
4142-- ArrayOperations contain Advanced Operations that live outside of the TCB
@@ -59,7 +60,9 @@ swap xs i j = let !xi = get xs i
5960 in xs''
6061# endif
6162
62-
63+ -- For correctness, the strictness annotations on !xi and !xj are crucial.
64+ -- Due to laziness, there's otherwise nothing preventing `setLin i xj xs2`
65+ -- from executing before `get2 i xs`. Same with `swap` above.
6366{- @ swap2 :: { i:Int | 0 <= i }
6467 -> { j:Int | 0 <= j } -> { xs:(Array a) | i < size xs && j < size xs }
6568 -> { ys:(Array a) | size xs == size ys && token xs == token ys &&
You can’t perform that action at this time.
0 commit comments