<div dir="ltr">.. if this helps the discussion, here is <a href="https://github.com/ghc/packages-Cabal/blob/71535bfb1bf439a1af0308a8e5da9ef98cd2d88d/Cabal/Distribution/Types/GenericPackageDescription.hs">cabal file "spec"</a><div>(see also other files in the same directory)<br></div><div><br></div><div>these types are used to parse .cabal.</div><div><br></div><div>one benefit from using these types in reverse (to generate .cabal from .hs) would be:</div><div><br></div><div>it is possible to write a few libs which generate well-formed cabal files from a simplified API. It is possible this was done already.</div><div>​</div></div>