We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2cb614 commit 1116efeCopy full SHA for 1116efe
typed-protocols/properties/Network/TypedProtocol/Codec/Properties.hs
@@ -187,9 +187,8 @@ prop_codecF_splitsM conv mkChannel runDecoder' splits
187
Codec {encode, decode} (AnyMessage (msg :: Message ps st st')) = do
188
property . foldMap Every <$> sequence
189
[ do
190
- let stateM = newSTRef $ tail bytes'
191
- channelAction = stToIO $ do
192
- stateRef <- stateM
+ stateRef <- stToIO . newSTRef $ tail bytes'
+ let channelAction = stToIO $ do
193
chunksRemaining <- readSTRef stateRef
194
modifySTRef' stateRef (drop 1)
195
return $! listToMaybe chunksRemaining
0 commit comments