Commit 869973df authored by Sumit Sahrawat's avatar Sumit Sahrawat

Deal with small -fcontext-stack on ghc-7.8

Use default value from ghc-7.10, i.e 100.
parent 4df9f1ec
...@@ -91,3 +91,6 @@ library ...@@ -91,3 +91,6 @@ library
-- Base language which the package is written in. -- Base language which the package is written in.
default-language: Haskell2010 default-language: Haskell2010
-- Deal with small -fcontext-stack on ghc-7.8
if impl(ghc == 7.8.*)
ghc-options: -fcontext-stack=100
...@@ -17,6 +17,7 @@ import Control.Monad (when, join) ...@@ -17,6 +17,7 @@ import Control.Monad (when, join)
import Data.Aeson import Data.Aeson
import Data.HashMap.Strict as HM import Data.HashMap.Strict as HM
import Data.IORef (newIORef) import Data.IORef (newIORef)
import Data.Monoid (mempty)
import Data.Text (Text) import Data.Text (Text)
import Data.Vinyl (Rec (..), (<+>)) import Data.Vinyl (Rec (..), (<+>))
......
...@@ -239,6 +239,10 @@ initializeImports = do ...@@ -239,6 +239,10 @@ initializeImports = do
imports <- mapM parseImportDecl $ globalImports ++ displayImports imports <- mapM parseImportDecl $ globalImports ++ displayImports
setContext $ map IIDecl $ implicitPrelude : imports 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. -- | Give a value for the `it` variable.
initializeItVariable :: Interpreter () initializeItVariable :: Interpreter ()
initializeItVariable = initializeItVariable =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment