HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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.