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
-- 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
......@@ -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 (..), (<+>))
......
......@@ -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 =
......
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