HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehspec-golden-aeson-0.9.0.0Haskell2010

Test.Aeson.Internal.ADT.RoundtripSpecs

Internal module, use at your own risk.

  • 2 values

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.