mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-21 02:07:25 +03:00
937aa8fc43
Until now namespaces were stored as (reversed) lists of strings. It led to: * confusing code where we work on the underlying representation of namespaces rather than say what we mean (using `isSuffixOf` to mean `isParentOf`) * potentially introducing errors by not respecting the invariant cf. bug report #616 (but also name generation in the scheme backend although that did not lead to bugs as it was self-consistent AFAICT) * ad-hoc code to circumvent overlapping interface implementation when showing / pretty-printing namespaces This PR introduces a `Namespace` newtype containing a list of strings. Nested namespaces are still stored in reverse order but the exposed interface aims to support programming by saying what we mean (`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.) irrespective of the underlying representation. |
||
---|---|---|
.. | ||
chez | ||
ideMode | ||
idris2 | ||
node | ||
prelude/reg001 | ||
ttimp | ||
typedd-book | ||
Main.idr | ||
Makefile | ||
README.md | ||
tests.ipkg |
Tests
Note: The commands listed in this section should be run from the repository's root folder.
Run all tests: make test
To run only a subset of the tests use: make test only=NAME
. NAME
is matched against the path to each test case.
Examples:
make test only=chez
will run all Chez Scheme tests.make test only=ttimp/basic
will run all basic tests forTTImp
.make test only=idris2/basic001
will run a specific test.