Deal with small -fcontext-stack on ghc-7.8

Use default value from ghc-7.10, i.e 100.
This commit is contained in:
Sumit Sahrawat 2015-07-05 11:13:58 +05:30
parent 4df9f1ec23
commit 869973df43
3 changed files with 8 additions and 0 deletions

View File

@ -91,3 +91,6 @@ library
-- Base language which the package is written in.
default-language: Haskell2010
-- Deal with small -fcontext-stack on ghc-7.8
if impl(ghc == 7.8.*)
ghc-options: -fcontext-stack=100

View File

@ -17,6 +17,7 @@ import Control.Monad (when, join)
import Data.Aeson
import Data.HashMap.Strict as HM
import Data.IORef (newIORef)
import Data.Monoid (mempty)
import Data.Text (Text)
import Data.Vinyl (Rec (..), (<+>))

View File

@ -239,6 +239,10 @@ initializeImports = do
imports <- mapM parseImportDecl $ globalImports ++ displayImports
setContext $ map IIDecl $ implicitPrelude : imports
-- Set -fcontext-stack to 100 (default in ghc-7.10). ghc-7.8 uses 20, which is too small.
let contextStackFlag = printf "-fcontext-stack=%d" (100 :: Int)
void $ setFlags [contextStackFlag]
-- | Give a value for the `it` variable.
initializeItVariable :: Interpreter ()
initializeItVariable =