Skip to content

Can't compile when __GLASGOW_HASKELL__ < 700 #46

Description

@osa1

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions