@@ -10,7 +10,7 @@ module, a list of ``import`` statements giving the other modules which
10are to be imported, and a collection of declarations and definitions of
10are to be imported, and a collection of declarations and definitions of
11types, classes and functions. For example, the listing below gives a
11types, classes and functions. For example, the listing below gives a
12module which defines a binary tree type ``BTree`` (in a file
12module which defines a binary tree type ``BTree`` (in a file
13−``btree.idr``):;
13+``btree.idr``):
15.. code-block:: idris
15.. code-block:: idris
@@ -32,8 +32,9 @@ module which defines a binary tree type ``BTree`` (in a file
32 toTree [] = Leaf
32 toTree [] = Leaf
33 toTree (x :: xs) = insert x (toTree xs)
33 toTree (x :: xs) = insert x (toTree xs)
35Then, this gives a main program (in a file
36Then, this gives a main program (in a file
36−``bmain.idr``) which uses the ``bst`` module to sort a list::
37+``bmain.idr``) which uses the ``bst`` module to sort a list:
38.. code-block:: idris
39.. code-block:: idris
@@ -45,6 +46,7 @@ Then, this gives a main program (in a file
45 main = do let t = toTree [1,8,2,7,9,3]
46 main = do let t = toTree [1,8,2,7,9,3]
46 print (btree.toList t)
47 print (btree.toList t)
48The same names can be defined in multiple modules. This is possible
50The same names can be defined in multiple modules. This is possible
49because in practice names are *qualified* with the name of the module.
51because in practice names are *qualified* with the name of the module.
50The names defined in the ``btree`` module are, in full:
52The names defined in the ``btree`` module are, in full: