Language.Haskell.GhcMod.Find

ghc-mod-5.5.0.0: Happy Haskell Programming

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GhcMod.Find

Contents

- Load `SymbolDb` asynchronously

Synopsis

- type Symbol = String
- data SymbolDb
- loadSymbolDb :: IOish m => GhcModT m SymbolDb
- lookupSymbol :: IOish m => Symbol -> SymbolDb -> GhcModT m String
- dumpSymbol :: IOish m => GhcModT m ()
- findSymbol :: IOish m => Symbol -> GhcModT m String
- lookupSym :: Symbol -> SymbolDb -> [ModuleString]
- isOutdated :: IOish m => SymbolDb -> GhcModT m Bool
- data AsyncSymbolDb
- newAsyncSymbolDb :: IOish m => GhcModT m AsyncSymbolDb
- getAsyncSymbolDb :: forall m. IOish m => AsyncSymbolDb -> GhcModT m SymbolDb

# Documentation

type Symbol = String

Type of function and operation names.

data SymbolDb

Database from `Symbol` to [`ModuleString`].

Instances

Generic SymbolDb |
Binary SymbolDb |
NFData SymbolDb |
type Rep SymbolDb |

loadSymbolDb :: IOish m => GhcModT m SymbolDb

Loading a file and creates `SymbolDb`.

lookupSymbol :: IOish m => Symbol -> SymbolDb -> GhcModT m String

Looking up `SymbolDb` with `Symbol` to [`ModuleString`] which will be concatenated.

dumpSymbol :: IOish m => GhcModT m ()

Dumps a `Binary` representation of `SymbolDb` to stdout

findSymbol :: IOish m => Symbol -> GhcModT m String

Looking up `SymbolDb` with `Symbol` to [`ModuleString`] which will be concatenated. `loadSymbolDb` is called internally.

lookupSym :: Symbol -> SymbolDb -> [ModuleString]

isOutdated :: IOish m => SymbolDb -> GhcModT m Bool

# Load `SymbolDb` asynchronously

data AsyncSymbolDb

newAsyncSymbolDb :: IOish m => GhcModT m AsyncSymbolDb

getAsyncSymbolDb :: forall m. IOish m => AsyncSymbolDb -> GhcModT m SymbolDb