Link to pretty printer library.
This commit is contained in:
@@ -104,8 +104,9 @@ putLText :: MonadIO m => TL.Text -> m ()
|
|||||||
|
|
||||||
Generally speaking writing manual instances of Show is a [Haskell antipattern](
|
Generally speaking writing manual instances of Show is a [Haskell antipattern](
|
||||||
http://www.stephendiehl.com/posts/strings.html) because it produces
|
http://www.stephendiehl.com/posts/strings.html) because it produces
|
||||||
law-violating instances of Show. You probably want to use a pretty printer
|
law-violating instances of Show. You probably want to use a [pretty
|
||||||
library for custom printing.
|
printer](https://hackage.haskell.org/package/wl-pprint-text) library for custom
|
||||||
|
printing.
|
||||||
|
|
||||||
If backwards compatibility is needed then the base library can be imported
|
If backwards compatibility is needed then the base library can be imported
|
||||||
manually.
|
manually.
|
||||||
@@ -114,6 +115,9 @@ manually.
|
|||||||
import GHC.Show (Show(..))
|
import GHC.Show (Show(..))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Automatic deriving of ``Show`` for your types is still supported since the class
|
||||||
|
is in scope by default.
|
||||||
|
|
||||||
* **Partial functions like ``undefined`` and ``error`` raise compiler warnings on
|
* **Partial functions like ``undefined`` and ``error`` raise compiler warnings on
|
||||||
usage.**
|
usage.**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user