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

Incorrect bounds in .cabal file #25

Open
phlummox opened this issue Apr 12, 2020 · 5 comments
Open

Incorrect bounds in .cabal file #25

phlummox opened this issue Apr 12, 2020 · 5 comments

Comments

@phlummox
Copy link

The bounds on "base" look to be wrong in simple-templates.cabal.

simple-templates purports to be able to use any version of base < 6, but I don't think that is correct.
It imports Data.Semigroup (in src/Web/Simple/Templates/Types.hs), which has only existed since base 4.9.0.0.

@phlummox
Copy link
Author

Apologies, that link points to the wrong version of the .cabal file. I'm referring to simple-templates 0.9.0.0, the current most recent version available on hackage, which seems to be from commit fb9adcf - though I can't be sure, as the tag numbers don't seem to consistently match the version numbers for that package.

@phlummox
Copy link
Author

phlummox commented Apr 12, 2020

Compilation also seems to fail with base 4.9.0.0 / ghc 8.0.1, base 4.9.1.0/ ghc 8.0.2, and base 4.10.1.0 / 8.2.2 - I get

src/Web/Simple/Templates/Types.hs:66:34: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Data.Monoid.<>’,
                             imported from ‘Data.Monoid’ at src/Web/Simple/Templates/Types.hs:6:1-18
                          or ‘Data.Semigroup.<>’,
                             imported from ‘Data.Semigroup’ at src/Web/Simple/Templates/Types.hs:7:1-21

@alevy
Copy link
Owner

alevy commented Apr 16, 2020

@phlummox thanks. I'll try to fix this, but a PR fixing this would be merged almost instantaneously.

My position right now is that anything > 1.0 (the current revision) does not need to be backwards compatible with older versions of GHC, since it would just result in too much #ifdefs throughout.

@alevy
Copy link
Owner

alevy commented Apr 16, 2020

If you want to patch a pre-1.0 version (there is currently no functional difference) to work with other older GHCs and bases, I'm happy to push an update to hackage, and track it in a separate branch (so we can continue back-porting issues).

@phlummox
Copy link
Author

No worries, I'll see how I go. For my own package,adding a constraint to the .cabal file, equivalent to "if ghc < 8.4.4 , use simple-templates < 0.9.0.0, otherwise any is okay" was enough to get it building on all the versions of GHC I tried.

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

2 participants