File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
hls-graph/src/Development/IDE/Graph Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module Development.IDE.Graph.Database(
9
9
shakeRunDatabaseForKeys ,
10
10
shakeProfileDatabase ,
11
11
shakeGetBuildStep ,
12
+ shakeGetDatabaseKeys ,
12
13
shakeGetDirtySet ,
13
14
shakeGetCleanKeys
14
15
,shakeGetBuildEdges ) where
@@ -79,3 +80,8 @@ shakeGetBuildEdges (ShakeDatabase _ _ db) = do
79
80
keys <- getDatabaseValues db
80
81
let ress = mapMaybe (getResult . snd ) keys
81
82
return $ sum $ map (length . getResultDepsDefault [] . resultDeps) ress
83
+
84
+ -- | Returns an approximation of the database keys,
85
+ -- annotated with how long ago (in # builds) they were visited
86
+ shakeGetDatabaseKeys :: ShakeDatabase -> IO [(Key , Int )]
87
+ shakeGetDatabaseKeys (ShakeDatabase _ _ db) = getKeysAndVisitAge db
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ getDirtySet db = do
199
199
calcAgeStatus _ = Nothing
200
200
return $ mapMaybe (secondM calcAgeStatus) dbContents
201
201
202
- -- | Returns ann approximation of the database keys,
202
+ -- | Returns an approximation of the database keys,
203
203
-- annotated with how long ago (in # builds) they were visited
204
204
getKeysAndVisitAge :: Database -> IO [(Key , Int )]
205
205
getKeysAndVisitAge db = do
You can’t perform that action at this time.
0 commit comments