@@ -93,16 +93,16 @@ Recall that to run an effectful program in ``Eff``, we use one of the
9393``run`` family of functions to run the program in a particular
9494computation context ``m``. For each effect, therefore, we must explain
9595how it is executed in a particular computation context for ``run`` to
96−work in that context. This is achieved with the following type class:
96+work in that context. This is achieved with the following interface:
9797
9898.. code-block:: idris
9999
100− class Handler (e : Effect) (m : Type -> Type) where
100+ interface Handler (e : Effect) (m : Type -> Type) where
101101 handle : resource -> (eff : e t resource resource') ->
102102 ((x : t) -> resource' x -> m a) -> m a
103103
104−We have already seen some instance declarations in the effect
105−summaries in Section :ref:`sect-simpleff`. An instance of ``Handler e
104+We have already seen some implementation declarations in the effect
105+summaries in Section :ref:`sect-simpleff`. An implementation of ``Handler e
106106m`` means that the effect declared with signature ``e`` can be run in
107107computation context ``m``. The ``handle`` function takes:
108108
@@ -123,7 +123,7 @@ in the case of ``Get``, or passes on a new state, in the case of
123123
124124.. code-block:: idris
125125
126− instance Handler State m where
126+ Handler State m where
127127 handle st Get k = k st st
128128 handle st (Put n) k = k () n
129129
@@ -176,7 +176,7 @@ The following listing summarises what is required to define the
176176 STATE : Type -> EFFECT
177177 STATE t = MkEff t State
178178
179− instance Handler State m where
179+ Handler State m where
180180 handle st Get k = k st st
181181 handle st (Put n) k = k () n
182182
@@ -211,13 +211,13 @@ directly.
211211 PutCh : Char -> sig StdIO ()
212212 GetCh : sig StdIO Char
213213
214− instance Handler StdIO IO where
214+ Handler StdIO IO where
215215 handle () (PutStr s) k = do putStr s; k () ()
216216 handle () GetStr k = do x <- getLine; k x ()
217217 handle () (PutCh c) k = do putChar c; k () ()
218218 handle () GetCh k = do x <- getChar; k x ()
219219
220− instance Handler StdIO (IOExcept a) where
220+ Handler StdIO (IOExcept a) where
221221 handle () (PutStr s) k = do ioe_lift $ putStr s; k () ()
222222 handle () GetStr k = do x <- ioe_lift $ getLine; k x ()
223223 handle () (PutCh c) k = do ioe_lift $ putChar c; k () ()
@@ -241,10 +241,10 @@ error.
241241 data Exception : Type -> Effect where
242242 Raise : a -> sig (Exception a) b
243243
244− instance Handler (Exception a) Maybe where
244+ Handler (Exception a) Maybe where
245245 handle _ (Raise e) k = Nothing
246246
247− instance Handler (Exception a) List where
247+ Handler (Exception a) List where
248248 handle _ (Raise e) k = []
249249
250250 EXCEPTION : Type -> EFFECT
@@ -265,14 +265,14 @@ value.
265265 data Selection : Effect where
266266 Select : List a -> sig Selection a
267267
268− instance Handler Selection Maybe where
268+ Handler Selection Maybe where
269269 handle _ (Select xs) k = tryAll xs where
270270 tryAll [] = Nothing
271271 tryAll (x :: xs) = case k x () of
272272 Nothing => tryAll xs
273273 Just v => Just v
274274
275− instance Handler Selection List where
275+ Handler Selection List where
276276 handle r (Select xs) k = concatMap (\x => k x r) xs
277277
278278 SELECT : EFFECT
@@ -308,7 +308,7 @@ the equivalent ``Eff`` programs.
308308 WriteLine : String -> sig FileIO () (OpenFile Write)
309309 EOF : sig FileIO Bool (OpenFile Read)
310310
311− instance Handler FileIO IO where
311+ Handler FileIO IO where
312312 handle () (Open fname m) k = do h <- openFile fname m
313313 if !(validFile h)
314314 then k True (FH h)