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 d52690d commit f202d4cCopy full SHA for f202d4c
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs
@@ -368,6 +368,14 @@ hover ide _ msgParam = do
368
dependencyName :: Dependency -> T.Text
369
dependencyName dep = T.pack $ unPackageName $ depPkgName dep
370
371
+ -- | Removes version requirements like
372
+ -- `==1.0.0.0`, `>= 2.1.1` that could be included in
373
+ -- hover message. Assumes that the dependency consists
374
+ -- of alphanums with dashes in between. Ends with an alphanum.
375
+ --
376
+ -- Examples:
377
+ -- >>> filterVersion "imp-deps>=2.1.1"
378
+ -- "imp-deps"
379
filterVersion :: T.Text -> Maybe T.Text
380
filterVersion msg = getMatch (msg =~ regex)
381
where
0 commit comments