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
4ebeb1fb
Commit
4ebeb1fb
authored
Oct 28, 2015
by
Sumit Sahrawat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting fixes
parent
a8e09f58
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
27 deletions
+28
-27
Parser.hs
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
+6
-5
Writer.hs
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
+16
-8
Types.hs
ipython-kernel/src/IHaskell/IPython/Types.hs
+6
-14
No files found.
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
View file @
4ebeb1fb
...
...
@@ -153,8 +153,8 @@ executeErrorParser = requestParser $ \obj -> do
return
$
ExecuteError
noHeader
[]
traceback
ename
evalue
makeDisplayDatas
::
Object
->
[
DisplayData
]
makeDisplayDatas
dataDict
=
[
DisplayData
(
read
$
unpack
mimeType
)
content
|
(
mimeType
,
String
content
)
<-
HM
.
toList
dataDict
]
makeDisplayDatas
dataDict
=
[
DisplayData
(
read
$
unpack
mimeType
)
content
|
(
mimeType
,
String
content
)
<-
HM
.
toList
dataDict
]
-- | Parse an execute result
executeResultParser
::
LByteString
->
Message
...
...
@@ -173,7 +173,8 @@ displayDataParser = requestParser $ \obj -> do
maybeSource
<-
obj
.:?
"source"
return
$
PublishDisplayData
noHeader
(
fromMaybe
""
maybeSource
)
displayDatas
requestParser
parser
content
=
case
parseEither
parser
decoded
of
requestParser
parser
content
=
case
parseEither
parser
decoded
of
Right
parsed
->
parsed
Left
err
->
trace
(
"Parse error: "
++
show
err
)
SendNothing
where
...
...
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
View file @
4ebeb1fb
...
...
@@ -29,13 +29,21 @@ instance ToJSON Message where
,
"language_info"
.=
languageInfo
rep
]
toJSON
ExecuteRequest
{
getCode
=
code
,
getSilent
=
silent
,
getStoreHistory
=
storeHistory
,
getAllowStdin
=
allowStdin
,
getUserVariables
=
userVariables
,
getUserExpressions
=
userExpressions
toJSON
ExecuteRequest
{
getCode
=
code
,
getSilent
=
silent
,
getStoreHistory
=
storeHistory
,
getAllowStdin
=
allowStdin
,
getUserVariables
=
userVariables
,
getUserExpressions
=
userExpressions
}
=
object
[
"code"
.=
code
,
"silent"
.=
silent
,
"store_history"
.=
storeHistory
,
"allow_stdin"
.=
allowStdin
,
"user_variables"
.=
userVariables
,
"user_expressions"
.=
userExpressions
object
[
"code"
.=
code
,
"silent"
.=
silent
,
"store_history"
.=
storeHistory
,
"allow_stdin"
.=
allowStdin
,
"user_variables"
.=
userVariables
,
"user_expressions"
.=
userExpressions
]
toJSON
ExecuteReply
{
status
=
status
,
executionCounter
=
counter
,
pagerOutput
=
pager
}
=
...
...
ipython-kernel/src/IHaskell/IPython/Types.hs
View file @
4ebeb1fb
...
...
@@ -349,17 +349,10 @@ data Message =
,
inCode
::
String
-- ^ Submitted input code.
,
executionCount
::
Int
-- ^ Which input this is.
}
|
Input
{
header
::
MessageHeader
,
getCode
::
Text
,
executionCount
::
Int
}
|
Output
{
header
::
MessageHeader
,
getText
::
[
DisplayData
]
,
executionCount
::
Int
}
|
CompleteRequest
|
Input
{
header
::
MessageHeader
,
getCode
::
Text
,
executionCount
::
Int
}
|
Output
{
header
::
MessageHeader
,
getText
::
[
DisplayData
],
executionCount
::
Int
}
|
CompleteRequest
{
header
::
MessageHeader
,
getCode
::
Text
{- ^
The entire block of text where the line is. This may be useful in the
...
...
@@ -489,7 +482,6 @@ instance FromJSON StreamType where
parseJSON
(
String
"stdout"
)
=
return
Stdout
parseJSON
(
String
"stderr"
)
=
return
Stderr
-- | Get the reply message type for a request message type.
replyType
::
MessageType
->
Maybe
MessageType
replyType
KernelInfoRequestMessage
=
Just
KernelInfoReplyMessage
...
...
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