@@ -17,11 +17,11 @@ testArrayST = do
1717
1818 log " emptySTArray should produce an empty array"
1919
20- assert $ runSTArray emptySTArray == nil
20+ assert $ runPure ( runSTArray emptySTArray) == nil
2121
2222 log " thaw should produce an STArray from a standard array"
2323
24- assert $ runSTArray (thaw [1 , 2 , 3 ]) == [1 , 2 , 3 ]
24+ assert $ runPure ( runSTArray (thaw [1 , 2 , 3 ]) ) == [1 , 2 , 3 ]
2525
2626 log " freeze should produce a standard array from an STArray"
2727
@@ -31,28 +31,28 @@ testArrayST = do
3131
3232 log " pushSTArray should append a value to the end of the array"
3333
34- assert $ runSTArray (do
34+ assert $ runPure ( runSTArray (do
3535 arr <- emptySTArray
3636 pushSTArray arr 1
3737 pushSTArray arr 2
38- pure arr) == [1 , 2 ]
38+ pure arr)) == [1 , 2 ]
3939
40- assert $ runSTArray (do
40+ assert $ runPure ( runSTArray (do
4141 arr <- thaw [1 , 2 , 3 ]
4242 pushSTArray arr 4
43- pure arr) == [1 , 2 , 3 , 4 ]
43+ pure arr)) == [1 , 2 , 3 , 4 ]
4444
4545 log " pushAllSTArray should append multiple values to the end of the array"
4646
47- assert $ runSTArray (do
47+ assert $ runPure ( runSTArray (do
4848 arr <- emptySTArray
4949 pushAllSTArray arr [1 , 2 ]
50- pure arr) == [1 , 2 ]
50+ pure arr)) == [1 , 2 ]
5151
52- assert $ runSTArray (do
52+ assert $ runPure ( runSTArray (do
5353 arr <- thaw [1 , 2 , 3 ]
5454 pushAllSTArray arr [4 , 5 , 6 ]
55- pure arr) == [1 , 2 , 3 , 4 , 5 , 6 ]
55+ pure arr)) == [1 , 2 , 3 , 4 , 5 , 6 ]
5656
5757 log " peekSTArray should return Nothing when peeking a value outside the array bounds"
5858
@@ -104,24 +104,24 @@ testArrayST = do
104104
105105 log " pokeSTArray should replace the value at the specified index"
106106
107- assert $ runSTArray (do
107+ assert $ runPure ( runSTArray (do
108108 arr <- thaw [1 ]
109109 pokeSTArray arr 0 10
110- pure arr) == [10 ]
110+ pure arr)) == [10 ]
111111
112112 log " pokeSTArray should do nothing when attempting to modify a value outside the array bounds"
113113
114- assert $ runSTArray (do
114+ assert $ runPure ( runSTArray (do
115115 arr <- thaw [1 ]
116116 pokeSTArray arr 1 2
117- pure arr) == [1 ]
117+ pure arr)) == [1 ]
118118
119119 log " spliceSTArray should be able to delete multiple items at a specified index"
120120
121- assert $ runSTArray (do
121+ assert $ runPure ( runSTArray (do
122122 arr <- thaw [1 , 2 , 3 , 4 , 5 ]
123123 spliceSTArray arr 1 3 []
124- pure arr) == [1 , 5 ]
124+ pure arr)) == [1 , 5 ]
125125
126126 log " spliceSTArray should return the items removed"
127127
@@ -131,17 +131,17 @@ testArrayST = do
131131
132132 log " spliceSTArray should be able to insert multiple items at a specified index"
133133
134- assert $ runSTArray (do
134+ assert $ runPure ( runSTArray (do
135135 arr <- thaw [1 , 2 , 3 , 4 , 5 ]
136136 spliceSTArray arr 1 0 [0 , 100 ]
137- pure arr) == [1 , 0 , 100 , 2 , 3 , 4 , 5 ]
137+ pure arr)) == [1 , 0 , 100 , 2 , 3 , 4 , 5 ]
138138
139139 log " spliceSTArray should be able to delete and insert at the same time"
140140
141- assert $ runSTArray (do
141+ assert $ runPure ( runSTArray (do
142142 arr <- thaw [1 , 2 , 3 , 4 , 5 ]
143143 spliceSTArray arr 1 2 [0 , 100 ]
144- pure arr) == [1 , 0 , 100 , 4 , 5 ]
144+ pure arr)) == [1 , 0 , 100 , 4 , 5 ]
145145
146146 log " toAssocArray should return all items in the array with the correct indices and values"
147147
0 commit comments