@@ -29,6 +29,9 @@ written as follows::
29Other examples of package files can be found in the ``libs`` directory
29Other examples of package files can be found in the ``libs`` directory
30of the main Idris repository, and in `third-party libraries <https://github.com/idris-lang/Idris-dev/wiki/Libraries>`_.
30of the main Idris repository, and in `third-party libraries <https://github.com/idris-lang/Idris-dev/wiki/Libraries>`_.
32Other common fields which may be present in an ``ipkg`` file are:
35Other common fields which may be present in an ``ipkg`` file are:
34+ ``sourcedir = <dir>``, which takes the directory (relative to the
37+ ``sourcedir = <dir>``, which takes the directory (relative to the
@@ -44,6 +47,9 @@ Other common fields which may be present in an ``ipkg`` file are:
44+ ``opts = "<idris options>"``, which allows options (such as other
47+ ``opts = "<idris options>"``, which allows options (such as other
45 packages) to be passed to Idris.
48 packages) to be passed to Idris.
47In more advanced cases, particularly to support creating bindings to
53In more advanced cases, particularly to support creating bindings to
48external ``C`` libraries, the following options are available:
54external ``C`` libraries, the following options are available:
@@ -57,14 +63,17 @@ external ``C`` libraries, the following options are available:
57+ ``objs = <objs>``, which takes a comma separated list of additional
63+ ``objs = <objs>``, which takes a comma separated list of additional
58 object files to be installed, perhaps generated by the ``Makefile``.
64 object files to be installed, perhaps generated by the ``Makefile``.
60−For testing Idris packages, there is a rudimentary testing harness built into Idris.
69+For testing Idris packages, there is a rudimentary testing harness, which is run in the ``IO`` context, built into Idris.
61−This allows for testing functions that are written in context of ``IO`` to be run automatically in a fresh environment on your computer.
70+This allows for testing modules containting functions that test aspects of your package to be run automatically in a fresh environment on your computer.
62−The field is:
71+All test functions must return ``IO ()``, and are listed in the ``ipkg`` file using the field:
64−+ ``tests = <test functions>``, which takes the qualified names of all tests to be run.
73++ ``tests = <test functions>``, which takes the qualified names of all test functions to be run.
66.. IMPORTANT::
75.. IMPORTANT::
67− The tests must also be added to the list of modules in ``modules``.
76+ The modules containing the test functions must also be added to the list of modules.
69Using Package files
78Using Package files
70===================
79===================