haskell / haskell/cabal

Changing the type of PackageDescription.category from ShortText to [ShortText]

Open
#7,850 18 comments 0 reactions 1 assignee Assigned to @emilypi View on GitHub
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

At present time, Cabal & Hackage encourage the end-user to include multiple categories in a Cabal file.

This practice, which is widely adopted, is currently not reflected in the API, as the type of the `categories` field for the [PackageDescription](https://hackage.haskell.org/package/Cabal-3.6.2.0/docs/Distribution-Types-PackageDescription.html#t:PackageDescription) tells us that its content is a `ShortText`.

On its side, Hackage enables this with the [`categorySplit`](https://github.com/haskell/hackage-server/blob/c40bc16ff221505c6a9cd1099460cf72af56228f/Distribution/Server/Packages/Render.hs#L176-L184) function in its web renderer.

As a consequence, I would like to change the definition of `PackageDescription.copyright` from `ShortText` to `[ShortText]`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.