yi-core-0.19.4: Yi editor core library

License | GPL-2
Maintainer | yi-devel@googlegroups.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010
Extensions | OverloadedStrings

Yi.Hoogle

Description

Provides functions for calling Hoogle on the commandline, and processing results into a form useful for completion or insertion.

Synopsis

- caseSensitize :: [YiString] -> [YiString]
- gv :: [YiString] -> [YiString]
- hoogleRaw :: YiString -> YiString -> IO [YiString]
- hoogleFunctions :: YiString -> IO [YiString]
- hoogleFunModule :: YiString -> IO [(YiString, YiString)]
- hoogle :: YiM YiString
- hoogleSearch :: YiM ()

# Documentation

caseSensitize :: [YiString] -> [YiString] Source #

Remove anything starting with uppercase letter. These denote either module names or types.

gv :: [YiString] -> [YiString] Source #

Hoogle's output includes a sort of type keyword, telling whether a hit is a package name, syntax, a module name, etc. But we care primarily about the function names, so we filter out anything containing the keywords.

hoogleRaw :: YiString -> YiString -> IO [YiString] Source #

Query Hoogle, with given search and options. This errors out on no results or if the hoogle command is not on path.

hoogleFunctions :: YiString -> IO [YiString] Source #

Filter the output of `hoogleRaw` to leave just functions.

hoogleFunModule :: YiString -> IO [(YiString, YiString)] Source #

Return module-function pairs.

hoogle :: YiM YiString Source #

Call out to `hoogleFunModule`, and overwrite the word at point with the first returned function.

hoogleSearch :: YiM () Source #

Call out to `hoogleRaw`, and print inside the Minibuffer the results of searching Hoogle with the word at point.