README.md 1.71 KB
Newer Older
Camil Staps's avatar
Camil Staps committed
1 2 3 4
# Cloogle

This is the core system of [Cloogle][], the [Clean][] language search engine.
The source code of the web frontend is in
Camil Staps's avatar
Camil Staps committed
5
[cloogle.org](https://gitlab.science.ru.nl/cloogle/cloogle.org).
Camil Staps's avatar
Camil Staps committed
6 7 8

## Structure
The type database is a Clean data structure that can be stored on the disk
9
using generic JSON encode and decode functions. The functions in `Cloogle.DB`
Camil Staps's avatar
Camil Staps committed
10 11
provide low-level access to modify the database and search in it.

12
The `Cloogle.DB.Factory` module hooks into the Clean compiler to provide
Camil Staps's avatar
Camil Staps committed
13
functions to populate a type database by parsing Clean source code.
Camil Staps's avatar
Camil Staps committed
14

15 16
The functions in `Cloogle.Search` provide a higher level API to the type
database, using the common Cloogle types defined by
Camil Staps's avatar
Camil Staps committed
17
[libcloogle](https://gitlab.science.ru.nl/cloogle/libcloogle).
Camil Staps's avatar
Camil Staps committed
18

Camil Staps's avatar
Camil Staps committed
19
## Dependencies
20 21 22 23 24
The latest Clean compiler that this library is compatible with is bundled as a
git submodule. However, several object files must be built. This can be done
with `make compiler`. If your project depends on Cloogle, you should add the
following to your `Makefile` to ensure that the compiler is updated when
needed:
25

Camil Staps's avatar
Camil Staps committed
26
```make
27 28
Cloogle/compiler: .FORCE
	$(MAKE) -C Cloogle compiler
29

Camil Staps's avatar
Camil Staps committed
30
.FORCE:
31

Camil Staps's avatar
Camil Staps committed
32
.PHONY: .FORCE
Camil Staps's avatar
Camil Staps committed
33
```
34

35 36 37 38 39 40
## Performance
To obtain full performance, ensure that you use the `StdMaybe` module
distributed here instead of that in StdEnv. The version in this library uses a
strict argument for `Just`. For `clm` this means adding the options
`-P ./path/to/Cloogle -IL StdEnv` to the beginning of the arguments.

Camil Staps's avatar
Camil Staps committed
41
## Copyright & License
Camil Staps's avatar
Camil Staps committed
42
Copyright © 2016–present Mart Lubbers and Camil Staps.
Camil Staps's avatar
Camil Staps committed
43
Licensed under MIT; See the [LICENSE](/LICENSE) file.
Camil Staps's avatar
Camil Staps committed
44 45 46

[Clean]: http://clean.cs.ru.nl
[Cloogle]: https://cloogle.org
Camil Staps's avatar
Camil Staps committed
47
[cocl]: https://svn.cs.ru.nl/repos/clean-compiler