We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Verified Commit 1ae8eaa9 authored by Camil Staps's avatar Camil Staps 🚀

Update readme for new module hierarchy

parent 48d6dc8b
......@@ -6,18 +6,18 @@ The source code of the web frontend is in
## Structure
The type database is a Clean data structure that can be stored on the disk
using generic JSON encode and decode functions. The functions in `CloogleDB`
using generic JSON encode and decode functions. The functions in `Cloogle.DB`
provide low-level access to modify the database and search in it.
The `CloogleDBFactory` module hooks into the Clean compiler to provide
The `Cloogle.DB.Factory` module hooks into the Clean compiler to provide
functions to populate a type database by parsing Clean source code. For
indexing documentation it was needed to patch the Clean compiler. To this end,
some modules from the frontend of the compiler have been replicated in
`/compiler-patch`. This directory should be added to the clm include paths
`/compiler-patch`. This directory should be added to the `clm` include paths
before the paths of the compiler.
The functions in `Search` provide a higher level API to the type database,
using the common Cloogle types defined in
The functions in `Cloogle.Search` provide a higher level API to the type
database, using the common Cloogle types defined by
[libcloogle](https://github.com/clean-cloogle/libcloogle).
## Dependencies
......@@ -25,22 +25,14 @@ using the common Cloogle types defined in
The Clean compiler is needed to build the database (not to use it).
Unfortunately, it is [developed on subversion][cocl] which means we can't add
it as a git submodule. The compiler patches are compatible with revision 2838
(2017-10-26). The following make target takes care of the setup:
```make
clean-compiler:
svn export -r 2838 https://svn.cs.ru.nl/repos/clean-compiler/branches/itask/ clean-compiler
cd clean-compiler; for f in path/to/Cloogle/compiler-patch/*.patch; do patch -p1 < "$$f"; done
$(MAKE) -j -C clean-compiler/main/Unix
$(MAKE) -j -C clean-compiler/backendC/CleanCompilerSources -f Makefile.linux64
ln -s ../../backendC/CleanCompilerSources/backend.a clean-compiler/backend/Clean\ System\ Files/backend_library
```
(2017-10-26). The compiler can be fetched and patched by running `make
clean-compiler`.
## Clean documentation
Cloogle indexes documentation of the syntax elements it stores, through
functions in `Doc`. Docblocks are comments that start with `/**` and have a
leading asterisk on every line (leading whitespace is ignored). The first part
of the docblock is taken as a general description. Below the description,
functions in `Clean.Doc`. Docblocks are comments that start with `/**` and have
a leading asterisk on every line (leading whitespace is ignored). The first
part of the docblock is taken as a general description. Below the description,
documentation fields can be added with `@`. Currently, documentation fields
should have only one line.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment