on master help sign in
correct examples so that they actually compile
8468d82max ulidtko
docs/tutorial/modules.rst+4−4
@@ -26,7 +26,7 @@ module which defines a binary tree type ``BTree`` (in a file
26
26
27 toList : BTree a -> List a
27 toList : BTree a -> List a
28 toList Leaf = []
28 toList Leaf = []
29− toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
29+ toList (Node l v r) = Btree.toList l ++ (v :: Btree.toList r)
30
30
31 toTree : Ord a => List a -> BTree a
31 toTree : Ord a => List a -> BTree a
32 toTree [] = Leaf
32 toTree [] = Leaf
@@ -44,7 +44,7 @@ Then, this gives a main program (in a file
44
44
45 main : IO ()
45 main : IO ()
46 main = do let t = toTree [1,8,2,7,9,3]
46 main = do let t = toTree [1,8,2,7,9,3]
47− print (btree.toList t)
47+ print (Btree.toList t)
48
48
49
49
50
50
@@ -118,7 +118,7 @@ functions to be exported as ``abstract``, as we see below:
118 abstract
118 abstract
119 toList : BTree a -> List a
119 toList : BTree a -> List a
120 toList Leaf = []
120 toList Leaf = []
121− toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
121+ toList (Node l v r) = Btree.toList l ++ (v :: Btree.toList r)
122
122
123 abstract
123 abstract
124 toTree : Ord a => List a -> BTree a
124 toTree : Ord a => List a -> BTree a
@@ -144,7 +144,7 @@ directive, for example:
144
144
145 toList : BTree a -> List a
145 toList : BTree a -> List a
146 toList Leaf = []
146 toList Leaf = []
147− toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
147+ toList (Node l v r) = Btree.toList l ++ (v :: Btree.toList r)
148
148
149 toTree : Ord a => List a -> BTree a
149 toTree : Ord a => List a -> BTree a
150 toTree [] = Leaf
150 toTree [] = Leaf