File tree 2 files changed +7
-7
lines changed
src/Development/IDE/Graph/Internal
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ renderKey :: Key -> Text
140
140
renderKey (lookupKeyValue -> KeyValue _ t) = t
141
141
142
142
newtype KeySet = KeySet IntSet
143
- deriving (Eq , Ord , Semigroup , Monoid )
143
+ deriving newtype (Eq , Ord , Semigroup , Monoid )
144
144
145
145
instance Show KeySet where
146
146
showsPrec p (KeySet is)= showParen (p > 10 ) $
@@ -178,7 +178,7 @@ lengthKeySet :: KeySet -> Int
178
178
lengthKeySet = coerce IS. size
179
179
180
180
newtype KeyMap a = KeyMap (IntMap a )
181
- deriving (Eq , Ord , Semigroup , Monoid )
181
+ deriving newtype (Eq , Ord , Semigroup , Monoid )
182
182
183
183
instance Show a => Show (KeyMap a ) where
184
184
showsPrec p (KeyMap im)= showParen (p > 10 ) $
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ spec = do
43
43
pure $ do
44
44
apply1 theKey
45
45
res `shouldBe` [True ]
46
- Just (Clean res) <- lookup (Key theKey) <$> getDatabaseValues theDb
47
- resultDeps res `shouldBe` ResultDeps [ Key (Rule @ () )]
46
+ Just (Clean res) <- lookup (newKey theKey) <$> getDatabaseValues theDb
47
+ resultDeps res `shouldBe` ResultDeps (singletonKeySet $ newKey (Rule @ () ))
48
48
it " tracks reverse dependencies" $ do
49
49
db@ (ShakeDatabase _ _ Database {.. }) <- shakeNewDatabase shakeOptions $ do
50
50
ruleUnit
@@ -54,8 +54,8 @@ spec = do
54
54
pure $ do
55
55
apply1 theKey
56
56
res `shouldBe` [True ]
57
- Just KeyDetails {.. } <- atomically $ STM. lookup (Key (Rule @ () )) databaseValues
58
- keyReverseDeps `shouldBe` HashSet. fromList [ Key theKey]
57
+ Just KeyDetails {.. } <- atomically $ STM. lookup (newKey (Rule @ () )) databaseValues
58
+ keyReverseDeps `shouldBe` (singletonKeySet $ newKey theKey)
59
59
it " rethrows exceptions" $ do
60
60
db <- shakeNewDatabase shakeOptions $ do
61
61
addRule $ \ (Rule :: Rule () ) old mode -> error " boom"
@@ -74,5 +74,5 @@ spec = do
74
74
pure $ do
75
75
applyWithoutDependency [theKey]
76
76
res `shouldBe` [[True ]]
77
- Just (Clean res) <- lookup (Key theKey) <$> getDatabaseValues theDb
77
+ Just (Clean res) <- lookup (newKey theKey) <$> getDatabaseValues theDb
78
78
resultDeps res `shouldBe` UnknownDeps
You can’t perform that action at this time.
0 commit comments