using #if MIN_VERSION_ leads to error
Opened this issue · 3 comments
epsilonhalbe commented
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 commented
Have you enabled CPP language extension?
You can enable it with language pragma at the top of your source file
{-# LANGUAGE CPP #-}
epsilonhalbe commented
Yes i did, the program works if i use snap-static-loader
epsilonhalbe commented
If you give me some hints, where to start, i would be willing to try to fix the problem.