HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehspec-golden-aeson-0.9.0.0Haskell2010

Test.Aeson.Internal.ADT.RoundtripSpecs

Internal module, use at your own risk.

Synopsis

A roundtrip test to check whether values of all of constructors of the given type can be successfully converted to JSON and back to a Haskell value.

roundtripADTSpecs will

  • create random values for each constructor using ToADTArbitrary,

  • convert them into JSON using ToJSON,

  • read them back into Haskell using FromJSON and

  • make sure that the result is the same as the value it started with using Eq.