homepage: ''
changelog-type: markdown
hash: 16ec16cddec58f1dc64b09dc12c002febbfe210bd5cd882a3b1b31961d2628ea
test-bench-deps:
  bytestring: -any
  sop-core: -any
  stm: -any
  base: '>=4.13'
  text: -any
  containers: -any
  recover-rtti: -any
  ghc-prim: -any
  tasty-quickcheck: -any
  mtl: -any
  ghc-heap: -any
  tasty: -any
  QuickCheck: -any
  aeson: -any
  vector: -any
maintainer: edsko@well-typed.com
synopsis: Recover run-time type information from the GHC heap
changelog: |
  # Revision history for recover-rtti

  ## 0.1.0.0 -- 2021-03-11

  * Alpha release
basic-deps:
  bytestring: '>=0.10 && <0.11'
  sop-core: '>=0.5 && <0.6'
  stm: '>=2.5 && <2.6'
  base: '>=4.13 && <4.16'
  text: '>=1.2 && <1.3'
  containers: '>=0.6 && <0.7'
  mtl: '>=2.2 && <2.3'
  ghc-heap: '>=8.8 && <9.1'
  aeson: '>=1.5 && <1.6'
all-versions:
- 0.1.0.0
author: Edsko de Vries
latest: 0.1.0.0
description-type: markdown
description: |
  # recover-rtti

  Recover run-time type information from the GHC heap. The key function in this
  library is

  ```haskell
  classify :: a -> Classifier a
  ```

  which recovers type information about values about which we know nothing (in
  particular, no type class constraints). One example use case is the following
  `anythingToString` function:

  ```haskell
  anythingToString :: a -> String
  ```


  We test that the result of `anythingToString` is equal to the result of regular
  `show` for a large range of data types (including user-defined ones that the
  library is not aware of). There are also other possible use cases; for example,
  it should be possible to define an `anythingToJSON` function.

  Obviously there are limitations; the most important ones are:

  * `UNPACK`ed fields are invisible to the library. This does not need to be
    a major issue though, when compiling code with `-O0` fields are not unpacked.
    (https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/pragmas.html?highlight=unpack#nounpack-pragma)
  * Record field names are not known, and so records are shown just using the
    constructor.

  There may be other gotchas as well; this library is primarily intended
  for debugging.
license-name: BSD-3-Clause

Update from Hackage at 2021-03-11T18:28:01Z
Update from Hackage at 2021-03-11T18:28:01Z
