#+title: hcel hcel is an indexer and a server of Haskell package source code. It serves indexed packages through JSON API. It is a fork of [[https://github.com/alexwl/haskell-code-explorer][Haskell Code Explorer]], and works with GHC-9.2.2 with Cabal-3.6.2.0, and possibly other adjacent versions. It also has an emacs client. * Install #+begin_src sh cabal install #+end_src * Usage You'll need to index a package before serving it. A typical indexing workflow is as follows, take sqlite-simple as an example: #+begin_src sh cabal unpack sqlite-simple cd sqlite-simple-x.y.z.w cabal configure --enable-testsuites --enable-benchmarks cabal build all haskell-code-indexer -p . #+end_src After indexing the ./dist-newstyle directory is no longer by hcel and can be removed to save space. To launch the app, run #+begin_src sh haskell-code-server -p /path/to/package1 -p /path/to/package2 ... #+end_src and the server will be available at localhost:3000. You can also hook up a local hoogle for documentation lookup: #+begin_src sh hoogle server # configure a reverse proxy to hook it up with a domain say https://hoogle.localhost with self-signed cert, then run haskell-code-server -p /path/to/package1 -p /path/to/package2 --use-hoogle-api --hoogle-api https://hoogle.localhost/ --disable-hoogle-api-cert-check #+end_src * Emacs binding The may find an emacs client called hc.el at . The original haskell-code-explorer has a web client, but this will be removed in favour of serving the Emacs client. * Contact and Copyright hcel is maintained by Yuchen Pei (id@ypei.org). The original [[https://github.com/alexwl/haskell-code-explorer][haskell-code-explorer]] is under the [[https://www.gnu.org/licenses/license-list.html#Expat][expat license]], whereas the changes are covered by [[https://www.gnu.org/licenses/agpl-3.0.en.html][GNU AGPLv3+]]. You may find the license text in a file named COPYING.agpl3 in the project tree. As a combination, this work as a whole is covered by the terms of [[https://www.gnu.org/licenses/agpl-3.0.en.html][GNU AGPLv3+]] ([[https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean][why?]]).