Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (20 sloc) 3.536 kB
2f1096b @serras Changes name to executable. Added README.
serras authored
1 Browser for Scion
2 =================
3
4 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.
5
cf2d254 @serras - Add build information in README
serras authored
6 Building
7 --------
8
588dc29 @serras Finished works to support Hoogle search.
serras authored
9 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.
ba42c3d @serras Added parallelism to database creation.
serras authored
10
cf2d254 @serras - Add build information in README
serras authored
11 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`.
12
13 Available commands
14 ------------------
15
2f1096b @serras Changes name to executable. Added README.
serras authored
16 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:
2295502 @serras Small changes to README.
serras authored
17
588dc29 @serras Finished works to support Hoogle search.
serras authored
18 * `{ "command" : "load-local-db", "filepath" : "local.db", "rebuild" : true|false }`: loads the database specified in `filepath`. If `rebuild` is `true` it also regenerates a database from the local installed packages, and saves the result in `filepath`,
cf2d254 @serras - Add build information in README
serras authored
19 * `{ "command" : "load-hackage-db", "filepath" : "local.db", "rebuild" : true|false }`: loads the database specified in `filepath`. If `rebuild` is `true` it also regenerates a database from on-line Hackage information, and saves the result in `filepath`,
2f1096b @serras Changes name to executable. Added README.
serras authored
20 * `{ "command" : "get-packages" }`: shows the list of packages in the current database,
cf2d254 @serras - Add build information in README
serras authored
21 * `{ "command" : "set-current-db", "new-db" : id }`: sets the current database. `id` can take different values: `"_all"` for both Hackage and local databases, `"_hackage"` for Hackage database, `"_local"` for the local packages database and `{ "name" : "package-name", "version" : "x.y.z" }` for query only a specific package,
ba42c3d @serras Added parallelism to database creation.
serras authored
22 * `{ "command" : "get-modules", "module" : "mod" }`: get all descendants of the module `mod` (that is, if we query for modules in `A`, we would get `A.B`, `A.B.C`, and so on). To ask for all modules, query for module `""`,
588dc29 @serras Finished works to support Hoogle search.
serras authored
23 * `{ "command" : "get-declarations", "module" : "mod" }`: queries the module `mod` for all declarations (datatypes, newtypes, typeclasses, instances, functions and type synonyms) inside it,
05d5060 @serras Add more places to check for Hoogle
serras authored
24 * `{ "command" : "extra-hoogle-path", "path" : "pathToSearch" }`: adds another place to check for Hoogle,
5bb0ee1 @serras Add command for checking Hoogle database
serras authored
25 * `{ "command" : "hoogle-query", "query" : "mapM" }`: sends a query to Hoogle and relates the results with the current database (that is, only results that are in the current database will be returned). For this to work, the `hoogle` package must be installed and `hoogle data` must have been run at least once,
26 * `{ "command" : "hoogle-data" }`: ask Hoogle to refresh its internal database, using `hoogle data`,
27 * `{ "command" : "hoogle-check" }`: checks whether there is a working Hoogle program with a saved database.
2f1096b @serras Changes name to executable. Added README.
serras authored
28
Something went wrong with that request. Please try again.