Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
ac478079
Commit
ac478079
authored
Jun 28, 2019
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/IHaskell/IPython.hs: remove version check
parent
7515f9bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
27 deletions
+1
-27
IPython.hs
src/IHaskell/IPython.hs
+1
-27
No files found.
src/IHaskell/IPython.hs
View file @
ac478079
...
...
@@ -26,7 +26,6 @@ import System.Exit (exitFailure)
import
Data.Aeson
(
toJSON
)
import
Data.Aeson.Text
(
encodeToTextBuilder
)
import
Data.Text.Lazy.Builder
(
toLazyText
)
import
Control.Monad
(
mplus
)
import
qualified
Paths_ihaskell
as
Paths
...
...
@@ -115,30 +114,13 @@ verifyIPythonVersion = do
case
pathMay
of
Nothing
->
badIPython
"No Jupyter / IPython detected -- install Jupyter 3.0+ before using IHaskell."
Just
path
->
do
sout
<-
SH
.
silently
(
SH
.
run
path
[
"--version"
])
serr
<-
SH
.
lastStderr
let
majorVersion
=
join
.
fmap
listToMaybe
.
parseVersion
.
T
.
unpack
case
mplus
(
majorVersion
serr
)
(
majorVersion
sout
)
of
Nothing
->
badIPython
$
T
.
concat
[
"Detected Jupyter, but could not parse version number."
,
"
\n
"
,
"(stdout = "
,
sout
,
", stderr = "
,
serr
,
")"
]
Just
version
->
when
(
version
<
3
)
oldIPython
Just
_
->
pure
()
where
badIPython
::
Text
->
SH
.
Sh
()
badIPython
message
=
liftIO
$
do
IO
.
hPutStrLn
IO
.
stderr
(
T
.
unpack
message
)
exitFailure
oldIPython
=
badIPython
"Detected old version of Jupyter / IPython. IHaskell requires 3.0.0 or up."
-- | Install an IHaskell kernelspec into the right location. The right location is determined by
-- using `ipython kernelspec install --user`.
...
...
@@ -192,14 +174,6 @@ subHome path = SH.shelly $ do
home
<-
T
.
unpack
<$>
fromMaybe
"~"
<$>
SH
.
get_env
"HOME"
return
$
replace
"~"
home
path
-- | Parse an IPython version string into a list of integers.
parseVersion
::
String
->
Maybe
[
Int
]
parseVersion
versionStr
=
let
versions
=
map
readMay
$
split
"."
versionStr
in
if
all
isJust
versions
then
Just
$
catMaybes
versions
else
Nothing
-- | Get the absolute path to this IHaskell executable.
getIHaskellPath
::
SH
.
Sh
FilePath
getIHaskellPath
=
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment