Skip to content

Commit

Permalink
Update InitVals.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
LeventErkok committed Sep 18, 2024
1 parent f3c5642 commit d1f5a57
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions SBVTestSuite/TestSuite/Arrays/InitVals.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,15 @@ tests = testGroup "Arrays" [

, testCase "array_misc_10" $ (write (empty 0) [(i, i+1) | i <- [0 .. (3 :: WordN 2)]]
.== write (empty 0) [(i, i ) | i <- [0 .. (3 :: WordN 2)]]) `showsAs` "False"

]
]
where t p f goldFile = do r <- p defaultSMTCfg{verbose=True, redirectVerbose = Just goldFile} f
appendFile goldFile ("\nFINAL OUTPUT:\n" ++ show r ++ "\n")
where t p f goldFile = do r <- p defaultSMTCfg{verbose=True, redirectVerbose = Just goldFile} f
appendFile goldFile ("\nFINAL OUTPUT:\n" ++ show r ++ "\n")

empty :: (SymVal a, SymVal b) => b -> SArray a b
empty = listArray []
empty :: (SymVal a, SymVal b) => b -> SArray a b
empty = listArray []

write :: (SymVal a, SymVal b) => SArray a b -> [(a, b)] -> SArray a b
write = foldr (\(k, v) a -> writeArray a (literal k) (literal v))
write :: (SymVal a, SymVal b) => SArray a b -> [(a, b)] -> SArray a b
write = foldr (\(k, v) a -> writeArray a (literal k) (literal v))

{- HLint ignore module "Reduce duplication" -}

0 comments on commit d1f5a57

Please sign in to comment.