Link to pretty printer library.

This commit is contained in:
Stephen Diehl
2016-07-02 17:57:44 -04:00
parent b658b4c8ef
commit 2f619f3ebd
+6 -2
View File
@@ -104,8 +104,9 @@ putLText :: MonadIO m => TL.Text -> m ()
Generally speaking writing manual instances of Show is a [Haskell antipattern](
http://www.stephendiehl.com/posts/strings.html) because it produces
law-violating instances of Show. You probably want to use a pretty printer
library for custom printing.
law-violating instances of Show. You probably want to use a [pretty
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
manually.
@@ -114,6 +115,9 @@ manually.
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
usage.**