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

Use a code generator for singletons-base's test suite #622

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

RyanGlScott
Copy link
Collaborator

@RyanGlScott RyanGlScott commented Dec 10, 2024

This replaces singletons-base's custom Setup.hs script with a cabal code generator. This finally allows singletons-base to have a Simple build type, but at the (relatively less extreme) cost of requiring Cabal-3.8 or later in order to build.

Remarkably, everything that the custom Setup.hs script did can be done in a much simpler way with a cabal code generator, as all of the information that the singletons-base test suite needs to invoke GHC can be inferred from the arguments passed to a code generator. One downside is that due to haskell/cabal#8421, the code generator must be implemented in a standalone executable package (singletons-base-code-generator). Until that cabal issue is fixed, we will need to upload singletons-base-code-generator to Hackage with each singletons release.

Fixes #532.

This replaces `singletons-base`'s custom `Setup.hs` script with a `cabal` code
generator. This finally allows `singletons-base` to have a `Simple` build type,
but at the (relatively less extreme) cost of requiring `Cabal-3.8` or later in
order to build.

Remarkably, everything that the custom `Setup.hs` script did can be done in a
much simpler way with a `cabal` code generator, as all of the information that
the `singletons-base` test suite needs to invoke GHC can be inferred from the
arguments passed to a code generator. One downside is that due to
haskell/cabal#8421, the code generator must be
implemented in a standalone executable package
(`singletons-base-code-generator`). Until that `cabal` issue is fixed, we will
need to upload `singletons-base-code-generator` to Hackage with each
`singletons` release.

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

Successfully merging this pull request may close these issues.

Use cabal's code-generators to reimplement singletons-base test suite without custom Setup.hs
2 participants