Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec-version-specific Package types #100

Open
quasicomputational opened this issue Jun 22, 2018 · 1 comment
Open

Spec-version-specific Package types #100

quasicomputational opened this issue Jun 22, 2018 · 1 comment

Comments

@quasicomputational
Copy link
Collaborator

From #98:

It turns out that it's easy to generate invalid .cabal files for cabal-version: 2.2, because non-SPDX licenses aren't at all supported, and pre-2.2 spec versions will fail with SPDX. So, if we want to follow the dictum of 'make illegal states unrepresentable', we should change the Package type to be a union of pre-2.2 and post-2.2 records, or do something similar.

There are some other cases where we'd want to do this (e.g., no autogen-modules before whichever version that was introduced in), as well.

@quasicomputational
Copy link
Collaborator Author

An alternative to let Package = < Package2_0 : { ... } | Package2_2 : { ... } | ... > would be to keep Package as it is (a direct translation of PackageDescription) and then implement Package2_0 -> Package and Package2_2 -> Package functions in Dhall, and recommend that this is what users do. That has the advantage that I can try it out today and see if it's horrible or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant