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
3da50156
Commit
3da50156
authored
Mar 02, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing --ipython flag, closes #178
parent
e29336d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
18 deletions
+20
-18
Test.ipynb
notebooks/Test.ipynb
+3
-6
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+1
-1
IPython.hs
src/IHaskell/IPython.hs
+16
-11
No files found.
notebooks/Test.ipynb
View file @
3da50156
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/IHaskell/Eval/Evaluate.hs
View file @
3da50156
...
...
@@ -708,7 +708,7 @@ evalCommand output (Expression expr) state = do
useDisplay
displayExpr
=
do
-- If there are instance matches, convert the object into
-- a Display. We also serialize it into a bytestring. We get
-- the bytestring as a dynamic and then convert back to
-- the bytestring
IO action
as a dynamic and then convert back to
-- a bytestring, which we promptly unserialize. Note that
-- attempting to do this without the serialization to binary and
-- back gives very strange errors - all the types match but it
...
...
src/IHaskell/IPython.hs
View file @
3da50156
...
...
@@ -37,6 +37,7 @@ import IHaskell.Types
data
WhichIPython
=
DefaultIPython
-- ^ Use the one that IHaskell tries to install.
|
ExplicitIPython
String
-- ^ Use the command-line flag provided one.
deriving
Eq
-- | Which commit of IPython we are on.
ipythonCommit
::
Text
...
...
@@ -51,17 +52,21 @@ ipython :: WhichIPython -- ^ Which IPython to use (user-provided or IHaskell-ins
->
Bool
-- ^ Whether to suppress output.
->
[
Text
]
-- ^ IPython command line arguments.
->
Sh
String
-- ^ IPython output.
ipython
which
suppress
args
=
do
runCmd
<-
liftIO
$
Paths
.
getDataFileName
"installation/run.sh"
venv
<-
fpToText
<$>
ipythonDir
let
cmdArgs
=
[
pack
runCmd
,
venv
]
++
args
-- We have this because `silently` in shelly < 1.4 does not silence
-- stderr. In shelly 1.4, however, using `run` does not let us use stdin,
-- and the current code breaks for unknown reasons. When the bug
-- https://github.com/yesodweb/Shelly.hs/issues/54
-- is closed, we should edit ihaskell.cabal to allow shelly 1.4.
runHandles
"bash"
cmdArgs
handles
doNothing
ipython
which
suppress
args
|
which
==
DefaultIPython
=
do
runCmd
<-
liftIO
$
Paths
.
getDataFileName
"installation/run.sh"
venv
<-
fpToText
<$>
ipythonDir
let
cmdArgs
=
[
pack
runCmd
,
venv
]
++
args
-- We have this because `silently` in shelly < 1.4 does not silence
-- stderr. In shelly 1.4, however, using `run` does not let us use stdin,
-- and the current code breaks for unknown reasons. When the bug
-- https://github.com/yesodweb/Shelly.hs/issues/54
-- is closed, we should edit ihaskell.cabal to allow shelly 1.4.
runHandles
"bash"
cmdArgs
handles
doNothing
|
otherwise
=
do
let
ExplicitIPython
exe
=
which
runHandles
(
fpFromString
exe
)
args
handles
doNothing
where
handles
=
[
InHandle
Inherit
,
outHandle
suppress
,
errorHandle
suppress
]
outHandle
True
=
OutHandle
CreatePipe
outHandle
False
=
OutHandle
Inherit
...
...
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