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

Support base-4.8 #99

Closed
pharpend opened this issue Apr 25, 2015 · 3 comments
Closed

Support base-4.8 #99

pharpend opened this issue Apr 25, 2015 · 3 comments

Comments

@pharpend
Copy link
Contributor

Trying to build this library with the newest version of GHC, this error pops up:

Resolving dependencies...
Configuring github-0.13.1...
Building github-0.13.1...
Failed to install github-0.13.1
Build log ( /home/pete/.cabal/logs/github-0.13.1.log ):
Configuring github-0.13.1...
Building github-0.13.1...
Preprocessing library github-0.13.1...
[ 1 of 31] Compiling Github.Repos.Webhooks.Validate ( Github/Repos/Webhooks/Validate.hs, dist/build/Github/Repos/Webhooks/Validate.o )

Github/Repos/Webhooks/Validate.hs:10:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[ 2 of 31] Compiling Github.Data.Definitions ( Github/Data/Definitions.hs, dist/build/Github/Data/Definitions.o )
[ 3 of 31] Compiling Github.Data      ( Github/Data.hs, dist/build/Github/Data.o )

Github/Data.hs:23:20:
    Ambiguous occurrence ‘defaultTimeLocale’
    It could refer to either ‘Data.Time.defaultTimeLocale’,
                             imported from ‘Data.Time’ at Github/Data.hs:9:1-16
                             (and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
                          or ‘System.Locale.defaultTimeLocale’,
                             imported from ‘System.Locale’ at Github/Data.hs:14:23-39
cabal: Error: some packages failed to install:
github-0.13.1 failed during the building phase. The exception was:
ExitFailure 1

I believe this is due to an incompatibility with the newest version of base.

@hdgarrood
Copy link
Contributor

Yes - defaultTimeLocale is now re-exported by Data.Time in the latest version. I think the easiest fix would be to use an explicit import list when importing from either module, and to always import defaultTimeLocale from System.Locale (so that it works on base < 4.8 too).

@pharpend
Copy link
Contributor Author

I opened up a PR with a fix for base-4.8. I'm not familiar with CPP, so I'll leave the backwards compatibility stuff to someone else.

@pharpend
Copy link
Contributor Author

Ohhh okay, I see what you mean. That was the first thing I tried, actually. It didn't work, because GHC doesn't realize the type from Data.Time is the same as the one from System.Locale.

jwiegley added a commit that referenced this issue Apr 26, 2015
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