Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Cloogle
Cloogle
Commits
1ae8eaa9
Verified
Commit
1ae8eaa9
authored
May 18, 2018
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update readme for new module hierarchy
parent
48d6dc8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
README.md
README.md
+10
-18
No files found.
README.md
View file @
1ae8eaa9
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment