From a5b90f672f4280361a50e65c30fa17dccfaef4a4 Mon Sep 17 00:00:00 2001 From: Levent Erkok Date: Fri, 20 Sep 2024 06:47:30 -0700 Subject: [PATCH] make hlint happy --- Data/SBV/Core/Operations.hs | 4 +++- SBVTestSuite/TestSuite/Arrays/InitVals.hs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Data/SBV/Core/Operations.hs b/Data/SBV/Core/Operations.hs index a3565c49b..85dd5e762 100644 --- a/Data/SBV/Core/Operations.hs +++ b/Data/SBV/Core/Operations.hs @@ -554,7 +554,9 @@ cCompare k op x y = -- Check if keys cover everything. Clearly, we can't do this for all kinds; but only finite ones -- For the time being, we're retricting ourselves to bool only. Might want to extend this later. complete = case k1 of - KBool -> all (\key -> key `elem` map fst asc1 && key `elem` map fst asc2) (map (cvVal . mkConstCV KBool) [0, 1 :: Integer]) + KBool -> let bools = map cvVal [falseCV, trueCV] + covered asc = all (`elem` map fst asc) bools + in covered asc1 && covered asc2 _ -> False in case (keysMatch, defsMatch, complete) of diff --git a/SBVTestSuite/TestSuite/Arrays/InitVals.hs b/SBVTestSuite/TestSuite/Arrays/InitVals.hs index 44178dac4..6607fbeb0 100644 --- a/SBVTestSuite/TestSuite/Arrays/InitVals.hs +++ b/SBVTestSuite/TestSuite/Arrays/InitVals.hs @@ -78,8 +78,8 @@ tests = testGroup "Arrays" [ .== write (empty True) [(True, True), (False, False)]) `showsAs` "True" , goldenCapturedIO "array_misc_5" $ t proveWith $ do setLogic Logic_ALL - pure $ ( write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]] - .== write (empty 1) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) :: Symbolic SBool + pure ( write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]] + .== write (empty 1) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) :: Symbolic SBool , testCase "array_misc_6" $ (write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]] .== write (empty 1) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) `showsAs` " :: SBool"