GhcModExe.Find

ghc-mod-5.8.0.0: Happy Haskell Hacking

Safe Haskell | None
Language | Haskell2010

GhcModExe.Find

Contents

- Load `SymbolDb` asynchronously

Synopsis

- type Symbol = ByteString
- data SymbolDb
- loadSymbolDb :: IOish m => GhcModT m SymbolDb
- lookupSymbol :: IOish m => String -> SymbolDb -> GhcModT m String
- dumpSymbol :: IOish m => GhcModT m ()
- findSymbol :: IOish m => String -> 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 = ByteString #

Type of function and operation names.

data SymbolDb #

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

Instances

Generic SymbolDb # |
Associated Types type Rep SymbolDb :: * -> * # Methods from :: SymbolDb -> Rep SymbolDb x # to :: Rep SymbolDb x -> SymbolDb #
Binary SymbolDb # |
Methods put :: SymbolDb -> Put # get :: Get SymbolDb # putList :: [SymbolDb] -> Put #
NFData SymbolDb # |
Methods rnf :: SymbolDb -> () #
type Rep SymbolDb # |
type Rep SymbolDb

loadSymbolDb :: IOish m => GhcModT m SymbolDb #

Loading a file and creates `SymbolDb`.

lookupSymbol :: IOish m => String -> 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 => String -> 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 #