Note about exception handling.

This commit is contained in:
Stephen Diehl
2016-07-02 14:00:26 -04:00
parent 21be7f2908
commit 6b6f8967ac
2 changed files with 15 additions and 2 deletions
+13
View File
@@ -114,6 +114,19 @@ manually.
import GHC.Show (Show(..))
```
* Partial functions like ``undefined`` and ``error`` raise compiler warnings on
usage.
This is by design. For fatal uncatchable errors use the provided ``panic``
function if you intend the program to immediately abort.
```haskell
panic "This is fatal my failure"
```
If inside of IO simply use ``throwIO`` for exception handling, or if in pure
business logic use well-typed checked exceptions of the ``ExceptT`` and variety.
License
-------
+2 -2
View File
@@ -34,6 +34,8 @@ library
exposed-modules:
Protolude
Unsafe
other-modules:
Base
Applicative
Bool
@@ -48,8 +50,6 @@ library
Bifunctor
Panic
other-modules:
default-extensions:
NoImplicitPrelude
OverloadedStrings