@@ -599,7 +599,7 @@ $ curl -H 'Accept: text/html' http://localhost:8081/persons
599
599
600
600
## The `Handler` monad
601
601
602
- At the heart of the handlers is the monad they run in, namely a newtype `Handler` around `ExceptT ServerErroror IO`
602
+ At the heart of the handlers is the monad they run in, namely a newtype `Handler` around `ExceptT ServerError IO`
603
603
([haddock documentation for `ExceptT`](http://hackage.haskell.org/package/mtl-2.2.1 /docs/Control-Monad-Except.html#t:ExceptT)).
604
604
One might wonder: why this monad? The answer is that it is the
605
605
simplest monad with the following properties:
@@ -622,7 +622,7 @@ action that either returns an error or a result.
622
622
623
623
The module [`Control.Monad.Except`](https://hackage.haskell.org/package/mtl-2.2.1 /docs/Control-Monad-Except.html#t:ExceptT)
624
624
from which `ExceptT` comes is worth looking at.
625
- Perhaps most importantly, `ExceptT` and `Handler` are an instances of `MonadError`, so
625
+ Perhaps most importantly, `ExceptT` and `Handler` are instances of `MonadError`, so
626
626
`throwError` can be used to return an error from your handler (whereas `return`
627
627
is enough to return a success).
628
628
@@ -632,8 +632,8 @@ kind and abort early. The next two sections cover how to do just that.
632
632
633
633
### Performing IO
634
634
635
- Another important instances from the list above are `MonadIO m => MonadIO
636
- (ExceptT e m)`, and therefore also `MonadIO Handler` as there is `MonadIO IO` instance.
635
+ Other important instances from the list above are `MonadIO m => MonadIO
636
+ (ExceptT e m)`, and therefore also `MonadIO Handler` as there is a `MonadIO IO` instance.
637
637
[`MonadIO`](http://hackage.haskell.org/package/transformers-0.4.3.0 /docs/Control-Monad-IO-Class.html)
638
638
is a class from the **transformers** package defined as:
639
639
0 commit comments