homepage: https://github.com/jacobstanley/quiet#readme
changelog-type: markdown
hash: c0f787132bde0c9e9713465b8afc64a99619b73c3a652e3236f7726460f2dc61
test-bench-deps:
  quiet: -any
  base: ! '>=4.7 && <5'
maintainer: jacob@stanley.io
synopsis: Generic deriving of Read/Show with no record labels.
changelog: |
  # Changelog for quiet

  ## Unreleased changes
basic-deps:
  base: ! '>=4.7 && <5'
all-versions:
- '0.1'
author: Jacob Stanley
latest: '0.1'
description-type: markdown
description: |
  # quiet

  Generic deriving of `Read` / `Show` with no record labels.

  [![Hackage][hackage-shield]][hackage] [![Travis][travis-shield]][travis]

  Often one wants to create a `newtype` which has a convenient field
  accessor like `unUserId` below, but that makes the derived `Show`
  instance overly verbose.

  For example:

  ```hs
  newtype UserId = UserId { unUserId :: String } deriving (Show)
  ```

  Renders as:

  ```
  ghci> show (UserId "simon")
  UserId {unUserId = "simon"}
  ```

  With 'qshowsPrec' you can have a `Show` instance which doesn't print
  the field labels. It will render as if the `unUserId` accessor wasn't
  present at all.

  ```hs
  newtype UserId = UserId { unUserId :: String } deriving (Generic)

  instance Show UserId where showsPrec = qshowsPrec
  ```

  ```
  ghci> show (UserId "simon")
  UserId "simon"
  ```

  A compatible `Read` instance can also be derived using `qreadPrec` if
  necessary.

  ```hs
  instance Read UserId where showsPrec = qreadPrec
  ```
   [hackage]: http://hackage.haskell.org/package/quiet
   [hackage-shield]: https://img.shields.io/hackage/v/quiet.svg?style=flat

   [travis]: https://travis-ci.org/jacobstanley/quiet
   [travis-shield]: https://travis-ci.org/jacobstanley/quiet.svg?branch=master
license-name: BSD-3-Clause

Update from Hackage at 2020-02-01T12:27:46Z
Update from Hackage at 2020-02-01T12:27:46Z
