Commit 71265f2d authored by Andrew Gibiansky's avatar Andrew Gibiansky

Fix build failures

parent 8e5e51ff
...@@ -74,7 +74,7 @@ eval string = do ...@@ -74,7 +74,7 @@ eval string = do
getTemporaryDirectory >>= setCurrentDirectory getTemporaryDirectory >>= setCurrentDirectory
let state = defaultKernelState { getLintStatus = LintOff } let state = defaultKernelState { getLintStatus = LintOff }
interpret libdir False $ Eval.evaluate state string publish noWidgetHandling interpret libdir False $ const $ Eval.evaluate state string publish noWidgetHandling
out <- readIORef outputAccum out <- readIORef outputAccum
pagerOut <- readIORef pagerAccum pagerOut <- readIORef pagerAccum
return (reverse out, unlines . map extractPlain . reverse $ pagerOut) return (reverse out, unlines . map extractPlain . reverse $ pagerOut)
...@@ -193,9 +193,12 @@ inDirectory dirs files action = shelly $ withTmpDir $ \dirPath -> ...@@ -193,9 +193,12 @@ inDirectory dirs files action = shelly $ withTmpDir $ \dirPath ->
return out return out
withHsDirectory :: (Shelly.FilePath -> Interpreter a) -> IO a withHsDirectory :: (Shelly.FilePath -> Interpreter a) -> IO a
withHsDirectory = inDirectory ["" </> "dir", "dir" </> "dir1"] withHsDirectory = inDirectory [p "" </> p "dir", p "dir" </> p "dir1"]
[""</> "file1.hs", "dir" </> "file2.hs", [p ""</> p "file1.hs", p "dir" </> p "file2.hs",
"" </> "file1.lhs", "dir" </> "file2.lhs"] p "" </> p "file1.lhs", p "dir" </> p "file2.lhs"]
where
p :: FilePath -> FilePath
p = id
main :: IO () main :: IO ()
main = hspec $ do main = hspec $ do
......
name: ipython-kernel name: ipython-kernel
version: 0.6.1.2 version: 0.6.1.3
synopsis: A library for creating kernels for IPython frontends synopsis: A library for creating kernels for IPython frontends
description: ipython-kernel is a library for communicating with frontends for the interactive IPython framework. It is used extensively in IHaskell, the interactive Haskell environment. description: ipython-kernel is a library for communicating with frontends for the interactive IPython framework. It is used extensively in IHaskell, the interactive Haskell environment.
......
...@@ -117,7 +117,9 @@ runKernel kernelOpts profileSrc = do ...@@ -117,7 +117,9 @@ runKernel kernelOpts profileSrc = do
(exitCode, stackStdout, _) <- readProcessWithExitCode "stack" [] "" (exitCode, stackStdout, _) <- readProcessWithExitCode "stack" [] ""
let stack = exitCode == ExitSuccess && "The Haskell Tool Stack" `isInfixOf` stackStdout let stack = exitCode == ExitSuccess && "The Haskell Tool Stack" `isInfixOf` stackStdout
#if MIN_VERSION_base(4,7,0)
-- If we're in a stack directory, use `stack` to set the environment -- If we're in a stack directory, use `stack` to set the environment
-- We can't do this with base <= 4.6 because setEnv doesn't exist.
when stack $ do when stack $ do
stackEnv <- lines <$> readProcess "stack" ["exec", "env"] "" stackEnv <- lines <$> readProcess "stack" ["exec", "env"] ""
forM_ stackEnv $ \line -> forM_ stackEnv $ \line ->
...@@ -125,6 +127,7 @@ runKernel kernelOpts profileSrc = do ...@@ -125,6 +127,7 @@ runKernel kernelOpts profileSrc = do
in case tailMay val of in case tailMay val of
Nothing -> return () Nothing -> return ()
Just val' -> setEnv var val' Just val' -> setEnv var val'
#endif
-- Serve on all sockets and ports defined in the profile. -- Serve on all sockets and ports defined in the profile.
interface <- serveProfile profile debug interface <- serveProfile profile debug
......
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