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
9036da3d
Commit
9036da3d
authored
May 17, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made stdin work
parent
699e292b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
19 deletions
+9
-19
widget.html
ihaskell-display/ihaskell-parsec/widget.html
+1
-0
ihaskell.cabal
ihaskell.cabal
+0
-2
Test.ipynb
notebooks/Test.ipynb
+6
-15
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+2
-2
No files found.
ihaskell-display/ihaskell-parsec/widget.html
View file @
9036da3d
...
...
@@ -7,6 +7,7 @@
// Only load this script once.
var
kernel
=
IPython
.
notebook
.
kernel
;
var
initialized
=
kernel
!==
undefined
&&
kernel
!=
null
;
console
.
log
(
"Initialized"
,
initialized
);
if
(
initialized
&&
window
.
parsecWidgetRegistered
===
undefined
)
{
// Do not load this script again.
...
...
ihaskell.cabal
View file @
9036da3d
...
...
@@ -141,7 +141,6 @@ executable IHaskell
directory -any,
ghc ==7.6.*,
ihaskell -any,
ipython-kernel -any,
MissingH >=1.2,
text -any,
unix >= 2.6
...
...
@@ -173,7 +172,6 @@ Test-Suite hspec
hspec -any,
HTTP -any,
HUnit -any,
ipython-kernel -any,
MissingH >=1.2,
mtl >=2.1,
parsec -any,
...
...
notebooks/Test.ipynb
View file @
9036da3d
...
...
@@ -2,7 +2,7 @@
"metadata": {
"language": "haskell",
"name": "",
"signature": "sha256:
a97e75023c94aa5ee7bcd22c902e508c1e4d91e89ccea56df5c4fec8f369f94a
"
"signature": "sha256:
e714927a2d2b479853e19f3784692d8043ea0de9bcba6778363470d13d4f3f85
"
},
"nbformat": 3,
"nbformat_minor": 0,
...
...
@@ -44,8 +44,7 @@
"metadata": {},
"output_type": "display_data"
}
],
"prompt_number": 2
]
},
{
"cell_type": "code",
...
...
@@ -84,17 +83,8 @@
" return (read (value ++ \".\" ++ after) :: Float)\n",
" \n",
" -- Parse any whitespace\n",
" whitespace = many $ oneOf \" \\t\""
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" whitespace = many $ oneOf \" \\t\"\n",
"\n",
"parser"
],
"language": "python",
...
...
@@ -111,6 +101,7 @@
"// Only load this script once.\n",
"var kernel = IPython.notebook.kernel;\n",
"var initialized = kernel !== undefined && kernel != null;\n",
"console.log(\"Initialized\", initialized);\n",
"if (initialized && window.parsecWidgetRegistered === undefined) {\n",
"\n",
"// Do not load this script again.\n",
...
...
@@ -194,7 +185,7 @@
"output_type": "display_data"
}
],
"prompt_number":
9
"prompt_number":
1
},
{
"cell_type": "code",
...
...
src/IHaskell/Eval/Evaluate.hs
View file @
9036da3d
...
...
@@ -106,7 +106,7 @@ globalImports :: [String]
globalImports
=
[
"import IHaskell.Display()"
,
"import qualified IHaskell.Display"
,
"import qualified IPython.Stdin"
,
"import qualified I
Haskell.I
Python.Stdin"
,
"import qualified System.Posix.IO as IHaskellIO"
,
"import qualified System.IO as IHaskellSysIO"
]
...
...
@@ -134,7 +134,7 @@ interpret allowedStdin action = runGhc (Just libdir) $ do
-- Close stdin so it can't be used.
-- Otherwise it'll block the kernel forever.
dir
<-
liftIO
getIHaskellDir
let
cmd
=
printf
"IPython.Stdin.fixStdin
\"
%s
\"
"
dir
let
cmd
=
printf
"I
Haskell.I
Python.Stdin.fixStdin
\"
%s
\"
"
dir
when
allowedStdin
$
void
$
runStmt
cmd
RunToCompletion
...
...
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