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
b73a8280
Commit
b73a8280
authored
Nov 21, 2021
by
Matthieu Coudron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print where kernel is installed
parent
419650fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
Main.hs
main/Main.hs
+1
-1
IPython.hs
src/IHaskell/IPython.hs
+5
-3
No files found.
main/Main.hs
View file @
b73a8280
...
...
@@ -62,7 +62,7 @@ ihaskell (Args ConvertLhs args) = showingHelp ConvertLhs args $ convert args
ihaskell
(
Args
InstallKernelSpec
args
)
=
showingHelp
InstallKernelSpec
args
$
do
let
kernelSpecOpts
=
parseKernelArgs
args
replaceIPythonKernelspec
kernelSpecOpts
installLabextension
installLabextension
(
kernelSpecDebug
kernelSpecOpts
)
ihaskell
(
Args
(
Kernel
(
Just
filename
))
args
)
=
do
let
kernelSpecOpts
=
parseKernelArgs
args
runKernel
kernelSpecOpts
filename
...
...
src/IHaskell/IPython.hs
View file @
b73a8280
...
...
@@ -171,10 +171,11 @@ installKernelspec repl opts = void $ do
installPrefixFlag
=
maybe
[
"--user"
]
(
\
prefix
->
[
"--prefix"
,
T
.
pack
prefix
])
(
kernelSpecInstallPrefix
opts
)
cmd
=
concat
[[
"kernelspec"
,
"install"
],
installPrefixFlag
,
[
SH
.
toTextIgnore
kernelDir
],
replaceFlag
]
SH
.
silently
$
SH
.
run
ipython
cmd
let
transformOutput
=
if
kernelSpecDebug
opts
then
id
else
SH
.
silently
transformOutput
$
SH
.
run
ipython
cmd
installLabextension
::
IO
()
installLabextension
=
SH
.
shelly
$
do
installLabextension
::
Bool
->
IO
()
installLabextension
debug
=
SH
.
shelly
$
do
-- Find the prebuilt extension directory
ihaskellDataDir
<-
liftIO
$
Paths
.
getDataDir
let
labextensionDataDir
=
ihaskellDataDir
...
...
@@ -188,6 +189,7 @@ installLabextension = SH.shelly $ do
SH
.</>
(
"labextensions"
::
SH
.
FilePath
)
SH
.</>
(
"jupyterlab-ihaskell"
::
SH
.
FilePath
)
when
debug
(
putStrLn
$
"Installing kernel in folder: "
++
show
jupyterlabIHaskellDir
)
-- Remove the extension directory with extreme prejudice if it already exists
SH
.
rm_rf
jupyterlabIHaskellDir
-- Create an empty 'jupyterlab-ihaskell' directory to install our extension in
...
...
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