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

using #if MIN_VERSION_ leads to error #14

Open
epsilonhalbe opened this issue Oct 15, 2015 · 3 comments
Open

using #if MIN_VERSION_ leads to error #14

epsilonhalbe opened this issue Oct 15, 2015 · 3 comments

Comments

@epsilonhalbe
Copy link

I am including cpp-statements to get rid of the warnings introduced by Applicative moving into base

so if I put

#if !MIN_VERSION_(4,8,0)
import Control.Applicative
#endif

in some module I get the following runtime-error:

GHC returned a result but said [GhcError {errMsg = "src/Site.hs":14:0:\n error: missing binary operator before token \"(\"\n    #if MIN_VERSION_base(4,8,0)\n    ^"}]

the example you can use is a minimal snap setup as I referred to in issue #11 tmp , just add the CPP-paragraph from above in Site.hs.

@sopvop
Copy link

sopvop commented Oct 16, 2015

Have you enabled CPP language extension?
You can enable it with language pragma at the top of your source file

{-# LANGUAGE CPP #-}

@epsilonhalbe
Copy link
Author

Yes i did, the program works if i use snap-static-loader

@epsilonhalbe
Copy link
Author

If you give me some hints, where to start, i would be willing to try to fix the problem.

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