Haskell
To index Haskell Glean consumes .hie files produced by the GHC compiler (>=8.8) with the flag -fwrite-ide-info.
Run the indexer
The Haskell indexer uses the .hie files produced when the Haskell
code is compiled with GHC's -fwrite-ide-info option, so first you
need to compile your Haskell code with that flag. For example, using
Cabal you can do
cabal build --ghc-options=-fwrite-ide-info
To enable -fwrite-ide-info more permanently, you can add it to your
cabal.project like this:
program-options
ghc-options: -fwrite-ide-info
Ensure that you have built and installed Glean and
the glean executable is on your PATH. Then you can index your
Haskell code with:
glean --db-root DBDIR index haskell ROOT --db NAME/INSTANCE
where
BUILDis a build command such that GHC is called with-fwrite-ide-infoDBDIRis the directory where the Glean db will be createdROOTis the root directory containing the build artifacts generated with thefwrite-ide-infoflag (e.g.dist-newstyleif a Cabal project)NAME/INSTANCEis the name of the repository to create
Schemaβ
The schema is in glean/schema/source/hs.angle