yi-0.7.1: The Haskell-Scriptable Editor

Safe HaskellNone



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



caseSensitize :: [String] -> [String]Source

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

gv :: [String] -> [String]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 :: String -> String -> IO [String]Source

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

hoogleFunctions :: String -> IO [String]Source

Filter the output of hoogleRaw to leave just functions.

hoogleFunModule :: String -> IO [(String, String)]Source

Return module-function pairs.

hoogle :: YiM StringSource

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.