JPMoresmau / scion-class-browser

Scion part for EclipseFP Class Browser
16 stars 6 forks source link

Browser for Scion

The code here aims to be the backend part for package browser support in EclipseFP and any other development environment which uses Scion as backend. It can generate databases from the local set of packages, and from the Hackage database if internet connectivity is available. Later, those databases can be queries for modules, or declarations inside them.

Building

The executable makes use of parallelism to run several instances of Haddock at once for creating the documentation. To make use of them, you must run the program with command arguments +RTS -N7 (or any other number different from 7). Note: it seems that running several threads in parallel is not working correctly. As of now, it's recommended to run the program with only one thread.

In some systems, while compiling the program an error like can't load .so/.DLL for: ncursesw (/usr/lib/libncursesw.so: file too short) may appear. This happens because GHC does not follow some kinds of links between libraries that GCC does. To solve it in my sstem, I run cd /usr/lib && sudo mv libncurses.so libncurses.so.bak && sudo mv libncursesw.so libncursesw.so.bak && sudo ln -s /lib/libncurses.so.5 libncurses.so && sudo ln -s /lib/libncursesw.so.5 libncursesw.so.

Available commands

Currently, the functionality is provided via a command-line program which receives JSON requests and prints out JSON values in response. In each moment, a database is made current and will be the one to be queried. The available commands are: