You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use Distribution.Fields.Pretty in cabal init. #6187
One way to solve this is to first generate GenericPackageDescription of a new package,
process it down to [PrettyField ()] and attach comments to relevant fields in ad-hoc post-processing step.
This won't if cabal init ought to generate common stanzas, or some other structure not visible in GPD.
This way cabal format on non-commented cabal init file would be no-op.
An alternative, to achieve cabal format and cabal init compatibility, is to change cabal format to work like cabal-fmt, i.e. only on Field/PrettyField; not going down to GPD at all. If someone thinks that's a way to go, please open an issue and argue why "through GPD" is not required.
Activity
phadej commentedon Aug 10, 2019
One way to solve this is to first generate
GenericPackageDescriptionof a new package,process it down to
[PrettyField ()]and attach comments to relevant fields in ad-hoc post-processing step.This won't if
cabal initought to generate common stanzas, or some other structure not visible in GPD.This way
cabal formaton non-commentedcabal initfile would be no-op.An alternative, to achieve
cabal formatandcabal initcompatibility, is to changecabal formatto work likecabal-fmt, i.e. only onField/PrettyField; not going down to GPD at all. If someone thinks that's a way to go, please open an issue and argue why "through GPD" is not required.