We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83fdd58 commit c76ec9aCopy full SHA for c76ec9a
ghcide/bench/lib/Experiments.hs
@@ -72,8 +72,13 @@ data DocumentPositions = DocumentPositions {
72
doc :: !TextDocumentIdentifier
73
}
74
75
-allWithIdentifierPos :: Monad m => (DocumentPositions -> m Bool) -> [DocumentPositions] -> m Bool
76
-allWithIdentifierPos f docs = allM f (filter (isJust . identifierP) docs)
+allWithIdentifierPos :: MonadFail m => (DocumentPositions -> m Bool) -> [DocumentPositions] -> m Bool
+allWithIdentifierPos f docs = case applicableDocs of
77
+ -- fail if there are no documents to benchmark
78
+ [] -> fail "None of the example modules have identifier positions"
79
+ docs' -> allM f docs'
80
+ where
81
+ applicableDocs = filter (isJust . identifierP) docs
82
83
experiments :: [Bench]
84
experiments =
0 commit comments