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

Can't compile when __GLASGOW_HASKELL__ < 700 #46

Open
osa1 opened this issue Aug 14, 2018 · 0 comments
Open

Can't compile when __GLASGOW_HASKELL__ < 700 #46

osa1 opened this issue Aug 14, 2018 · 0 comments

Comments

@osa1
Copy link

osa1 commented Aug 14, 2018

In doubt this code compiles with GHC 7.0 even after fixing this, but still, in this code:

#if __GLASGOW_HASKELL__ >= 700
import Control.Exception (mask_)
#else
import qualified Control.Exception
mask_ = Control.Exception.block
#endif

import Control.Exception (try, IOException)

For GHC < 7.0 this defines a top-level value and then imports another module, which is not allowed. Value definitions should come after all imports.

As a fix I'd suggest dropping support for GHC 7.0 as it's probably not used these days (it was released in 2010).

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