Skip to content

Use Distribution.Fields.Pretty in cabal init. #6187

Open

Description

@phadej

This will make output of cabal init and cabal format closer to each other.

Activity

  1. phadej commented on Aug 10, 2019

    @phadej
    CollaboratorAuthor

    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.

  2. self-assigned this
    on Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions