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
db84a671
Commit
db84a671
authored
Apr 14, 2015
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove IsString usage; theres no concrete way to do String -> DisplayData
parent
dd7271b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
EasyKernel.hs
ipython-kernel/src/IHaskell/IPython/EasyKernel.hs
+4
-4
Types.hs
ipython-kernel/src/IHaskell/IPython/Types.hs
+0
-3
No files found.
ipython-kernel/src/IHaskell/IPython/EasyKernel.hs
View file @
db84a671
...
@@ -53,10 +53,10 @@ import Control.Monad (forever, when, unless)
...
@@ -53,10 +53,10 @@ import Control.Monad (forever, when, unless)
import
qualified
Data.Map
as
Map
import
qualified
Data.Map
as
Map
import
Data.Maybe
(
fromMaybe
)
import
Data.Maybe
(
fromMaybe
)
import
qualified
Data.Text
as
T
import
qualified
Data.Text
as
T
import
Data.String
(
IsString
(
..
))
import
IHaskell.IPython.Kernel
import
IHaskell.IPython.Kernel
import
IHaskell.IPython.Message.UUID
as
UUID
import
IHaskell.IPython.Message.UUID
as
UUID
import
IHaskell.IPython.Types
import
System.Directory
(
createDirectoryIfMissing
,
doesDirectoryExist
,
doesFileExist
,
import
System.Directory
(
createDirectoryIfMissing
,
doesDirectoryExist
,
doesFileExist
,
getHomeDirectory
)
getHomeDirectory
)
...
@@ -156,7 +156,7 @@ createReplyHeader parent = do
...
@@ -156,7 +156,7 @@ createReplyHeader parent = do
-- | Execute an IPython kernel for a config. Your 'main' action should call this as the last thing
-- | Execute an IPython kernel for a config. Your 'main' action should call this as the last thing
-- it does.
-- it does.
easyKernel
::
(
MonadIO
m
,
IsString
output
)
easyKernel
::
MonadIO
m
=>
FilePath
-- ^ The connection file provided by the IPython frontend
=>
FilePath
-- ^ The connection file provided by the IPython frontend
->
KernelConfig
m
output
result
-- ^ The kernel configuration specifying how to react to
->
KernelConfig
m
output
result
-- ^ The kernel configuration specifying how to react to
-- messages
-- messages
...
@@ -174,7 +174,7 @@ easyKernel profileFile config = do
...
@@ -174,7 +174,7 @@ easyKernel profileFile config = do
reply
<-
replyTo
config
execCount
zmq
req
repHeader
reply
<-
replyTo
config
execCount
zmq
req
repHeader
liftIO
$
writeChan
shellRepChan
reply
liftIO
$
writeChan
shellRepChan
reply
replyTo
::
(
MonadIO
m
,
IsString
output
)
replyTo
::
MonadIO
m
=>
KernelConfig
m
output
result
=>
KernelConfig
m
output
result
->
MVar
Integer
->
MVar
Integer
->
ZeroMQInterface
->
ZeroMQInterface
...
@@ -221,7 +221,7 @@ replyTo config execCount interface req@ExecuteRequest { getCode = code } replyHe
...
@@ -221,7 +221,7 @@ replyTo config execCount interface req@ExecuteRequest { getCode = code } replyHe
return
return
ExecuteReply
ExecuteReply
{
header
=
replyHeader
{
header
=
replyHeader
,
pagerOutput
=
[
fromString
pagerOut
]
,
pagerOutput
=
[
DisplayData
PlainText
$
T
.
pack
pagerOut
]
,
executionCounter
=
fromIntegral
counter
,
executionCounter
=
fromIntegral
counter
,
status
=
replyStatus
,
status
=
replyStatus
}
}
...
...
ipython-kernel/src/IHaskell/IPython/Types.hs
View file @
db84a671
...
@@ -431,9 +431,6 @@ replyType _ = Nothing
...
@@ -431,9 +431,6 @@ replyType _ = Nothing
data
DisplayData
=
DisplayData
MimeType
Text
data
DisplayData
=
DisplayData
MimeType
Text
deriving
(
Typeable
,
Generic
)
deriving
(
Typeable
,
Generic
)
instance
S
.
IsString
DisplayData
where
fromString
=
DisplayData
PlainText
.
Text
.
strip
.
Text
.
pack
-- We can't print the actual data, otherwise this will be printed every time it gets computed
-- We can't print the actual data, otherwise this will be printed every time it gets computed
-- because of the way the evaluator is structured. See how `displayExpr` is computed.
-- because of the way the evaluator is structured. See how `displayExpr` is computed.
instance
Show
DisplayData
where
instance
Show
DisplayData
where
...
...
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