File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
src/Development/IDE/Graph/Internal Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ renderKey :: Key -> Text
140140renderKey (lookupKeyValue -> KeyValue _ t) = t
141141
142142newtype KeySet = KeySet IntSet
143- deriving (Eq , Ord , Semigroup , Monoid )
143+ deriving newtype (Eq , Ord , Semigroup , Monoid )
144144
145145instance Show KeySet where
146146 showsPrec p (KeySet is)= showParen (p > 10 ) $
@@ -178,7 +178,7 @@ lengthKeySet :: KeySet -> Int
178178lengthKeySet = coerce IS. size
179179
180180newtype KeyMap a = KeyMap (IntMap a )
181- deriving (Eq , Ord , Semigroup , Monoid )
181+ deriving newtype (Eq , Ord , Semigroup , Monoid )
182182
183183instance Show a => Show (KeyMap a ) where
184184 showsPrec p (KeyMap im)= showParen (p > 10 ) $
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ spec = do
4343 pure $ do
4444 apply1 theKey
4545 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 @ () ))
4848 it " tracks reverse dependencies" $ do
4949 db@ (ShakeDatabase _ _ Database {.. }) <- shakeNewDatabase shakeOptions $ do
5050 ruleUnit
@@ -54,8 +54,8 @@ spec = do
5454 pure $ do
5555 apply1 theKey
5656 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)
5959 it " rethrows exceptions" $ do
6060 db <- shakeNewDatabase shakeOptions $ do
6161 addRule $ \ (Rule :: Rule () ) old mode -> error " boom"
@@ -74,5 +74,5 @@ spec = do
7474 pure $ do
7575 applyWithoutDependency [theKey]
7676 res `shouldBe` [[True ]]
77- Just (Clean res) <- lookup (Key theKey) <$> getDatabaseValues theDb
77+ Just (Clean res) <- lookup (newKey theKey) <$> getDatabaseValues theDb
7878 resultDeps res `shouldBe` UnknownDeps
You can’t perform that action at this time.
0 commit comments