@@ -16,9 +16,8 @@ provides an interface for converting values to
1616
1717\begin{SaveVerbatim}{showclass}
1818
19−class Show a where {
19+class Show a where
2020 show : a -> String
21−}
2221
2322\end{SaveVerbatim}
2423\useverb{showclass}
@@ -43,10 +42,9 @@ could be defined as:
4342
4443\begin{SaveVerbatim}{shownat}
4544
46−instance Show Nat where {
45+instance Show Nat where
4746 show O = "O"
4847 show (S k) = "s" ++ show k
49−}
5048
5149Idris> show (S (S (S O)))
5250"sssO" : String
@@ -62,14 +60,12 @@ to a \texttt{String}:
6260
6361\begin{SaveVerbatim}{showvec}
6462
65−instance Show a => Show (Vect a n) where {
66− show xs = "[" ++ show' xs ++ "]" where {
63+instance Show a => Show (Vect a n) where
64+ show xs = "[" ++ show' xs ++ "]" where
6765 show' : Show a => Vect a n -> String
6866 show' VNil = ""
6967 show' (x :: VNil) = show x
7068 show' (x :: xs) = show x ++ ", " ++ show' xs
71− }
72−}
7369
7470\end{SaveVerbatim}
7571\useverb{showvec}
@@ -81,10 +77,9 @@ values for equality or inequality, with instances for all of the built-in types:
8177
8278\begin{SaveVerbatim}{eqbasic}
8379
84−class Eq a where {
80+class Eq a where
8581 (==) : a -> a -> Bool
8682 (/=) : a -> a -> Bool
87−}
8883
8984\end{SaveVerbatim}
9085\useverb{eqbasic}
@@ -95,14 +90,13 @@ For example, for an instance of \texttt{Eq} for \texttt{Nat}:
9590
9691\begin{SaveVerbatim}{eqnat}
9792
98−instance Eq Nat where {
93+instance Eq Nat where
9994 O == O = True
10095 (S x) == (S y) = x == y
10196 O == (S y) = False
10297 (S x) == O = False
10398
10499 x /= y = not (x == y)
105−}
106100
107101\end{SaveVerbatim}
108102\useverb{eqnat}
@@ -115,13 +109,12 @@ declaration, in terms of the other method:
115109
116110\begin{SaveVerbatim}{eqdefault}
117111
118−class Eq a where {
112+class Eq a where
119113 (==) : a -> a -> Bool
120114 (/=) : a -> a -> Bool
121115
122116 x /= y = not (x == y)
123117 y == y = not (x /= y)
124−}
125118
126119\end{SaveVerbatim}
127120\useverb{eqdefault}
@@ -146,7 +139,7 @@ data Ordering = LT | EQ | GT
146139
147140\begin{SaveVerbatim}{eqord}
148141
149−class Eq a => Ord a where {
142+class Eq a => Ord a where
150143 compare : a -> a -> Ordering
151144
152145 (<) : a -> a -> Bool
@@ -155,7 +148,6 @@ class Eq a => Ord a where {
155148 (>=) : a -> a -> Bool
156149 max : a -> a -> a
157150 min : a -> a -> a
158−}
159151
160152\end{SaveVerbatim}
161153\useverb{eqord}
@@ -200,10 +192,9 @@ declaration. For example:
200192
201193\begin{SaveVerbatim}{monad}
202194
203−class Monad (m : Set -> Set) where {
195+class Monad (m : Set -> Set) where
204196 return : a -> m a
205197 (>>=) : m a -> (a -> m b) -> m b
206−}
207198
208199\end{SaveVerbatim}
209200\useverb{monad}
@@ -225,12 +216,11 @@ We can also define an instance for \texttt{Maybe}, as follows:
225216
226217\begin{SaveVerbatim}{maybemonad}
227218
228−instance Monad Maybe where {
219+instance Monad Maybe where
229220 return = Just
230221
231222 Nothing >>= k = Nothing
232223 (Just x) >>= k = k x
233−}
234224
235225\end{SaveVerbatim}
236226\useverb{maybemonad}
@@ -242,10 +232,9 @@ Using this we can, for example, define a function which adds two
242232\begin{SaveVerbatim}{maybeadd}
243233
244234m_add : Maybe Int -> Maybe Int -> Maybe Int
245−m_add x y = do { x' <- x -- Extract value from x
246− y' <- y -- Extract value from y
247− return (x' + y') -- Add them
248− }
235+m_add x y = do x' <- x -- Extract value from x
236+ y' <- y -- Extract value from y
237+ return (x' + y') -- Add them
249238
250239\end{SaveVerbatim}
251240\useverb{maybeadd}
@@ -273,10 +262,9 @@ general, and applies to anything which is an instance of \texttt{MonadPlus}:
273262
274263\begin{SaveVerbatim}{monadplus}
275264
276−class Monad m => MonadPlus (m : Set -> Set) where {
265+class Monad m => MonadPlus (m : Set -> Set) where
277266 mplus : m a -> m a -> m a
278267 mzero : m a
279−}
280268
281269\end{SaveVerbatim}
282270\useverb{monadplus}