Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gibiansky committed Aug 17, 2015
1 parent 96ce950 commit 35e469d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/IHaskell/IPython.hs
Expand Up @@ -134,15 +134,23 @@ verifyIPythonVersion = do
(Nothing, Nothing) -> badIPython
"No Jupyter detected -- install Jupyter 3.0+ before using IHaskell."
(Just path, _) -> do
SH.silently (SH.run path ["--version"])
output <- T.unpack <$> SH.lastStderr
case parseVersion output of
stdout <- SH.silently (SH.run path ["--version"])
stderr <- SH.lastStderr
case parseVersion $ T.unpack stderr of
Just (4:_) -> return ()
Just (3:_) -> return ()
Just (2:_) -> oldIPython
Just (1:_) -> oldIPython
Just (0:_) -> oldIPython
_ -> badIPython "Detected Jupyter, but could not parse version number."
_ -> badIPython $ T.concat
[ "Detected Jupyter, but could not parse version number."
, "\n"
, "(stdout = "
, stdout
, ", stderr = "
, stderr
, ")"
]
(_, Just path) -> do
output <- T.unpack <$> SH.silently (SH.run path ["--version"])
case parseVersion output of
Expand Down

0 comments on commit 35e469d

Please sign in to comment.