Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for common stanzas #569

@ramirez7

Description

@ramirez7

I saw this #513

I'm opening a new issue about the same thing.

YAML includes are inadequate for DRYing up even moderately-complex cabal config. Mostly due to the lack of recursive merge.

For instance, if I define a shared YAML file with default-extensions for my entire monorepo but a single package wants to add another default-extension just for itself, it clobbers the include. There's no good way around this using just YAML includes.

Now, if I could use cabal common stanzas, then YAML includes could help me:

  • I could define the common stanzas in shared YAML across my monorepo
  • My individual packages' package.yaml could include the common stanzas
  • Each package.yaml could then use cabal import accordingly.

I guess an alternative would be for hpack to add support for proper YAML recursive merge. But even if it had that, I don't see why hpack shouldn't support the cabal feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions