lib/kernel: add `Bool::to_i`

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: get_mmodule_by_name only output lookpaths instead of tries

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: extract `search_module_in_paths` from `get_mmodule_by_name`

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: `identify_file` works with directories and module names

* `cvs` will get `../lib/csv.nit`
* `curl` will get `../lib/curl/curl.nit`
* `some/path/` could get `some/path/path.nit`

This enable some fun the the option `-m`:

    $ nitg someprog.nit -m android

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: add `MGroup::module_paths` to store potential nit files

Signed-off-by: Jean Privat <jean@pryen.org>
src: new tool nitls

Simple tool to list nit source files in directories.

The tool is really fast since it does not load files, just look at the
structure of files and directories.

There is a bunch of cool options, try it.

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add nitls

Signed-off-by: Jean Privat <jean@pryen.org>
Makefile: build nitls

Signed-off-by: Jean Privat <jean@pryen.org>
Makefile: rule `doc/stdlib/index.html` use `nitls` instead of `find`

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update error_mod_unk.nit

Signed-off-by: Jean Privat <jean@pryen.org>
nitls: add -M option do list dependencies

Signed-off-by: Jean Privat <jean@pryen.org>
lib/array: fix AbstractArray::unshift

Signed-off-by: Jean Privat <jean@pryen.org>
lib: document abstract_collection + nitunit tests

Signed-off-by: Jean Privat <jean@pryen.org>
lib/coll: move *index_of* in Sequence

Signed-off-by: Jean Privat <jean@pryen.org>
lib/coll: generalize `insert` in Sequence

Signed-off-by: Jean Privat <jean@pryen.org>
lib/coll: make CoupleMapIterator private

Thus introduce a protected service `CoupleMap::couple_iterator` to
factorise the instantiation.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/coll: make private some specific implementations of interfaces

Signed-off-by: Jean Privat <jean@pryen.org>
tests: do not use now-private classes

Signed-off-by: Jean Privat <jean@pryen.org>
Merge branch 'module_paths'

This series improve the way the loader identify path.

Now, directories and global projects (those in the NIT_PATH or from -I)
can be loaded

Thus, you can write

~~~
$ nitg mytool.nit -m android
~~~

A new tool, `nitls` exposes path identifications to the user than now
can list source files, projects, and both in a tree only by looking at
the file system (no parsing or whatever)

Eg. what are the projects in the directory lib (-k ignore non nit
things)

~~~
$ src/nitls lib/* -k
lib/a_star.nit
lib/android.nit
lib/base64.nit
lib/bcm2835.nit
lib/bucketed_game.nit
lib/console.nit
lib/counter.nit
lib/cpp.nit
lib/csv.nit
lib/curl
lib/curses
lib/dummy_array.nit
lib/egl.nit
lib/filter_stream.nit
lib/for_abuse.nit
lib/glesv2.nit
lib/gpio.nit
lib/gtk.nit
lib/gtk3_4
lib/gtk3_6
lib/gtk3_8
lib/html.nit
lib/json
lib/json_serialization.nit
lib/jvm.nit
lib/md5.nit
lib/mnit
lib/mnit_android
lib/mnit_linux
lib/more_collections.nit
lib/mpd.nit
lib/nitcc_runtime.nit
lib/opts.nit
lib/ordered_tree.nit
lib/pipeline.nit
lib/poset.nit
lib/posix_ext.nit
lib/privileges.nit
lib/realtime.nit
lib/scene2d.nit
lib/serialization.nit
lib/signals.nit
lib/simple_json_reader
lib/socket
lib/sqlite3
lib/standard
lib/symbol.nit
lib/template.nit
lib/x11.nit
~~~

All stuff from standard in a tree

~~~
$ nitls lib/standard/ -r -t
standard
|--collection
|  |--lib/standard/collection/abstract_collection.nit
|  |--lib/standard/collection/array.nit
|  |--lib/standard/collection/collection.nit
|  |--lib/standard/collection/hash_collection.nit
|  |--lib/standard/collection/list.nit
|  |--lib/standard/collection/range.nit
|  `--lib/standard/collection/sorter.nit
|--lib/standard/environ.nit
|--lib/standard/exec.nit
|--lib/standard/file.nit
|--lib/standard/gc.nit
|--lib/standard/kernel.nit
|--lib/standard/math.nit
|--lib/standard/posix.nit
|--lib/standard/ropes.nit
|--lib/standard/standard.nit
|--lib/standard/stream.nit
|--lib/standard/string.nit
|--lib/standard/string_search.nit
`--lib/standard/time.nit
~~~

Conflicts:
	tests/testfull.sh
Merge branch 'doc_on_collection'