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
3e9677cc
Commit
3e9677cc
authored
Oct 26, 2015
by
Tom McLaughlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up build
parent
e6fb0fe0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
15 deletions
+12
-15
Parser.hs
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
+3
-3
UUID.hs
ipython-kernel/src/IHaskell/IPython/Message/UUID.hs
+1
-2
Writer.hs
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
+1
-6
Types.hs
ipython-kernel/src/IHaskell/IPython/Types.hs
+7
-4
No files found.
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
View file @
3e9677cc
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing #-}
-- | Description : Parsing messages received from IPython
--
...
...
@@ -7,15 +8,14 @@
-- the low-level 0MQ interface.
module
IHaskell.IPython.Message.Parser
(
parseMessage
)
where
-- import Control.Applicative ((<|>), (<$>), (<*>))
import
Data.Aeson
((
.:
),
(
.:?
),
decode
,
Result
(
..
),
Object
,
Value
(
..
))
import
Data.Aeson.Types
(
parse
,
parseEither
)
import
Data.ByteString
hiding
(
unpack
)
import
qualified
Data.ByteString.Lazy
as
Lazy
import
Data.HashMap.Strict
as
HM
import
Data.Map
(
Map
)
import
Data.Maybe
(
catMaybes
,
fromMaybe
)
import
Data.Text
(
Text
,
unpack
,
concat
)
import
Data.Maybe
(
fromMaybe
)
import
Data.Text
(
Text
,
unpack
)
import
Debug.Trace
import
IHaskell.IPython.Types
...
...
ipython-kernel/src/IHaskell/IPython/Message/UUID.hs
View file @
3e9677cc
...
...
@@ -4,9 +4,8 @@
module
IHaskell.IPython.Message.UUID
(
UUID
,
random
,
randoms
,
uuidToString
)
where
import
Control.Monad
(
mzero
,
replicateM
)
-- import Control.Applicative ((<$>))
import
Data.Text
(
pack
)
import
Data.Aeson
import
Data.Text
(
pack
)
import
Data.UUID.V4
(
nextRandom
)
-- | A UUID (universally unique identifier).
...
...
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
View file @
3e9677cc
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing -fno-warn-unused-matches #-}
-- | Description : @ToJSON@ for Messages
--
...
...
@@ -7,13 +8,7 @@ module IHaskell.IPython.Message.Writer (ToJSON(..)) where
import
Data.Aeson
import
Data.Map
(
Map
)
-- import Data.Monoid (mempty)
import
Data.Text
(
Text
,
pack
)
-- import qualified Data.ByteString as B
-- import qualified Data.ByteString.Lazy as L
-- import Data.Text.Encoding
import
IHaskell.IPython.Types
instance
ToJSON
LanguageInfo
where
...
...
ipython-kernel/src/IHaskell/IPython/Types.hs
View file @
3e9677cc
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing -fno-warn-unused-matches #-}
-- | This module contains all types used to create an IPython language kernel.
module
IHaskell.IPython.Types
(
...
...
@@ -34,13 +35,11 @@ module IHaskell.IPython.Types (
extractPlain
,
)
where
-- import Control.Applicative ((<$>), (<*>))
import
Data.Aeson
import
Data.ByteString
(
ByteString
)
import
Data.List
(
find
)
import
Data.Map
(
Map
)
import
Data.Serialize
-- import qualified Data.String as S
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
Text
import
qualified
Data.Text.Encoding
as
Text
...
...
@@ -507,8 +506,12 @@ data DisplayData = DisplayData MimeType Text
-- 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.
instance
Show
DisplayData
where
show
_
=
"DisplayData"
show
(
DisplayData
PlainText
t
)
=
"DisplayData PlainText ("
++
show
t
++
")"
show
(
DisplayData
(
MimePng
w
h
)
t
)
=
"DisplayData (Png "
++
show
(
w
,
h
)
++
")"
show
(
DisplayData
MimeSvg
t
)
=
"DisplayData (Svg)"
show
(
DisplayData
(
MimeJpg
w
h
)
t
)
=
"DisplayData (Jpg "
++
show
(
w
,
h
)
++
")"
show
(
DisplayData
MimeHtml
t
)
=
"DisplayData (Html "
++
show
t
++
")"
show
(
DisplayData
typ
t
)
=
"DisplayData (unknown: "
++
show
typ
++
")"
-- Allow DisplayData serialization
instance
Serialize
Text
where
put
str
=
put
(
Text
.
encodeUtf8
str
)
...
...
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