Note about exception handling.
This commit is contained in:
@@ -114,6 +114,19 @@ manually.
|
|||||||
import GHC.Show (Show(..))
|
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
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -34,6 +34,8 @@ library
|
|||||||
exposed-modules:
|
exposed-modules:
|
||||||
Protolude
|
Protolude
|
||||||
Unsafe
|
Unsafe
|
||||||
|
|
||||||
|
other-modules:
|
||||||
Base
|
Base
|
||||||
Applicative
|
Applicative
|
||||||
Bool
|
Bool
|
||||||
@@ -48,8 +50,6 @@ library
|
|||||||
Bifunctor
|
Bifunctor
|
||||||
Panic
|
Panic
|
||||||
|
|
||||||
other-modules:
|
|
||||||
|
|
||||||
default-extensions:
|
default-extensions:
|
||||||
NoImplicitPrelude
|
NoImplicitPrelude
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
|
|||||||
Reference in New Issue
Block a user