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
94338f8d
Commit
94338f8d
authored
Jun 16, 2016
by
Sumit Sahrawat
Committed by
GitHub
Jun 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #666 from sumitsahrawat/ipython-replyto-config
Fix issue #665: Make EasyKernel more configurable
parents
c783897d
6659dd83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
.travis.yml
.travis.yml
+3
-0
Calc.hs
ipython-kernel/examples/Calc.hs
+4
-0
Simple.hs
ipython-kernel/examples/Simple.hs
+4
-0
EasyKernel.hs
ipython-kernel/src/IHaskell/IPython/EasyKernel.hs
+13
-2
No files found.
.travis.yml
View file @
94338f8d
...
...
@@ -72,6 +72,9 @@ script:
cd "$TOP";
done
# Ensure that ipython-kernel examples build successfully.
stack build ipython-kernel --flag ipython-kernel:examples
# Ensure that IHaskell notebook remains unchanged.
# Run the notebook to regenerate the outputs, then compare the new notebook to the old one.
stack install --stack-yaml=stack-full.yaml
...
...
ipython-kernel/examples/Calc.hs
View file @
94338f8d
...
...
@@ -233,6 +233,10 @@ mkConfig var = KernelConfig
,
inspectInfo
=
langInfo
,
run
=
parseAndRun
,
debug
=
False
,
kernelBanner
=
"Expanded Hutton's Razor"
,
kernelProtocolVersion
=
"5.0"
,
kernelImplName
=
"expanded_huttons_razor"
,
kernelImplVersion
=
"0.0"
}
where
displayRes
(
Left
err
)
=
...
...
ipython-kernel/examples/Simple.hs
View file @
94338f8d
...
...
@@ -130,6 +130,10 @@ simpleConfig = KernelConfig
,
inspectInfo
=
languageInspect
,
run
=
languageRun
,
debug
=
False
,
kernelBanner
=
"Simple Arithmetic Expressions"
,
kernelProtocolVersion
=
"5.0"
,
kernelImplName
=
"funcalc"
,
kernelImplVersion
=
"0.0"
}
main
::
IO
()
...
...
ipython-kernel/src/IHaskell/IPython/EasyKernel.hs
View file @
94338f8d
...
...
@@ -77,6 +77,14 @@ data KernelConfig m output result =
-- should be handled by defining an appropriate error constructor in your result type.
,
run
::
T
.
Text
->
IO
()
->
(
output
->
IO
()
)
->
m
(
result
,
ExecuteReplyStatus
,
String
)
,
debug
::
Bool
-- ^ Whether to print extra debugging information to
-- | A One-line description of the kernel
,
kernelBanner
::
String
-- | The version of the messaging specification used by the kernel
,
kernelProtocolVersion
::
String
-- | Name of the kernel implementation
,
kernelImplName
::
String
-- | Version of the kernel implementation
,
kernelImplVersion
::
String
}
-- Install the kernelspec, using the `writeKernelspec` field of the kernel configuration.
...
...
@@ -160,9 +168,12 @@ replyTo config _ _ KernelInfoRequest{} replyHeader =
KernelInfoReply
{
header
=
replyHeader
,
languageInfo
=
kernelLanguageInfo
config
,
implementation
=
"ipython-kernel.EasyKernel"
,
implementationVersion
=
"0.0"
,
implementation
=
kernelImplName
config
,
implementationVersion
=
kernelImplVersion
config
,
banner
=
kernelBanner
config
,
protocolVersion
=
kernelProtocolVersion
config
}
replyTo
config
_
interface
ShutdownRequest
{
restartPending
=
pending
}
replyHeader
=
do
liftIO
$
writeChan
(
shellReplyChannel
interface
)
$
ShutdownReply
replyHeader
pending
liftIO
exitSuccess
...
...
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