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
e6fb0fe0
Commit
e6fb0fe0
authored
Sep 06, 2015
by
Tom McLaughlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks
parent
c7a167a3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
23 deletions
+21
-23
.gitignore
.gitignore
+1
-2
Diagrams.hs
...ll-display/ihaskell-diagrams/IHaskell/Display/Diagrams.hs
+8
-2
Parser.hs
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
+1
-1
UUID.hs
ipython-kernel/src/IHaskell/IPython/Message/UUID.hs
+1
-1
Writer.hs
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
+4
-4
Types.hs
ipython-kernel/src/IHaskell/IPython/Types.hs
+2
-2
ZeroMQ.hs
ipython-kernel/src/IHaskell/IPython/ZeroMQ.hs
+4
-4
stack.yaml
ipython-kernel/stack.yaml
+0
-7
No files found.
.gitignore
View file @
e6fb0fe0
...
@@ -22,5 +22,4 @@ cabal.sandbox.config
...
@@ -22,5 +22,4 @@ cabal.sandbox.config
.tmp1
.tmp1
.tmp2
.tmp2
.tmp3
.tmp3
.stack-work
.stack-work
ghc-parser/*
\ No newline at end of file
\ No newline at end of file
ihaskell-display/ihaskell-diagrams/IHaskell/Display/Diagrams.hs
View file @
e6fb0fe0
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
module
IHaskell.Display.Diagrams
(
diagram
,
animation
)
where
module
IHaskell.Display.Diagrams
(
diagram
,
animation
)
where
import
System.Directory
import
qualified
Data.ByteString.Char8
as
Char
import
qualified
Data.ByteString.Char8
as
Char
import
System.Directory
import
System.IO.Unsafe
import
System.IO.Unsafe
import
Diagrams.Prelude
import
Diagrams.Backend.Cairo
import
Diagrams.Backend.Cairo
import
Diagrams.Prelude
import
IHaskell.Display
import
IHaskell.Display
import
IHaskell.Display.Diagrams.Animation
import
IHaskell.Display.Diagrams.Animation
...
@@ -20,6 +20,7 @@ instance IHaskellDisplay (QDiagram Cairo V2 Double Any) where
...
@@ -20,6 +20,7 @@ instance IHaskellDisplay (QDiagram Cairo V2 Double Any) where
diagramData
::
Diagram
Cairo
->
OutputType
->
IO
DisplayData
diagramData
::
Diagram
Cairo
->
OutputType
->
IO
DisplayData
diagramData
renderable
format
=
do
diagramData
renderable
format
=
do
putStrLn
"About to switch to tmp dir!"
switchToTmpDir
switchToTmpDir
-- Compute width and height.
-- Compute width and height.
...
@@ -29,12 +30,17 @@ diagramData renderable format = do
...
@@ -29,12 +30,17 @@ diagramData renderable format = do
imgHeight
=
300
imgHeight
=
300
imgWidth
=
aspect
*
imgHeight
imgWidth
=
aspect
*
imgHeight
putStrLn
"Going to do renderCairo!"
-- Write the image.
-- Write the image.
let
filename
=
".ihaskell-diagram."
++
extension
format
let
filename
=
".ihaskell-diagram."
++
extension
format
renderCairo
filename
(
mkSizeSpec2D
(
Just
imgWidth
)
(
Just
imgHeight
))
renderable
renderCairo
filename
(
mkSizeSpec2D
(
Just
imgWidth
)
(
Just
imgHeight
))
renderable
putStrLn
"Did renderCairo, about to readFile"
-- Convert to base64.
-- Convert to base64.
imgData
<-
Char
.
readFile
filename
imgData
<-
Char
.
readFile
filename
putStrLn
"Did readFile"
let
value
=
let
value
=
case
format
of
case
format
of
PNG
->
png
(
floor
imgWidth
)
(
floor
imgHeight
)
$
base64
imgData
PNG
->
png
(
floor
imgWidth
)
(
floor
imgHeight
)
$
base64
imgData
...
...
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
View file @
e6fb0fe0
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-- the low-level 0MQ interface.
-- the low-level 0MQ interface.
module
IHaskell.IPython.Message.Parser
(
parseMessage
)
where
module
IHaskell.IPython.Message.Parser
(
parseMessage
)
where
import
Control.Applicative
((
<|>
),
(
<$>
),
(
<*>
))
--
import Control.Applicative ((<|>), (<$>), (<*>))
import
Data.Aeson
((
.:
),
(
.:?
),
decode
,
Result
(
..
),
Object
,
Value
(
..
))
import
Data.Aeson
((
.:
),
(
.:?
),
decode
,
Result
(
..
),
Object
,
Value
(
..
))
import
Data.Aeson.Types
(
parse
,
parseEither
)
import
Data.Aeson.Types
(
parse
,
parseEither
)
import
Data.ByteString
hiding
(
unpack
)
import
Data.ByteString
hiding
(
unpack
)
...
...
ipython-kernel/src/IHaskell/IPython/Message/UUID.hs
View file @
e6fb0fe0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
module
IHaskell.IPython.Message.UUID
(
UUID
,
random
,
randoms
,
uuidToString
)
where
module
IHaskell.IPython.Message.UUID
(
UUID
,
random
,
randoms
,
uuidToString
)
where
import
Control.Monad
(
mzero
,
replicateM
)
import
Control.Monad
(
mzero
,
replicateM
)
import
Control.Applicative
((
<$>
))
--
import Control.Applicative ((<$>))
import
Data.Text
(
pack
)
import
Data.Text
(
pack
)
import
Data.Aeson
import
Data.Aeson
import
Data.UUID.V4
(
nextRandom
)
import
Data.UUID.V4
(
nextRandom
)
...
...
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
View file @
e6fb0fe0
...
@@ -7,12 +7,12 @@ module IHaskell.IPython.Message.Writer (ToJSON(..)) where
...
@@ -7,12 +7,12 @@ module IHaskell.IPython.Message.Writer (ToJSON(..)) where
import
Data.Aeson
import
Data.Aeson
import
Data.Map
(
Map
)
import
Data.Map
(
Map
)
import
Data.Monoid
(
mempty
)
--
import Data.Monoid (mempty)
import
Data.Text
(
Text
,
pack
)
import
Data.Text
(
Text
,
pack
)
import
qualified
Data.ByteString
as
B
--
import qualified Data.ByteString as B
import
qualified
Data.ByteString.Lazy
as
L
--
import qualified Data.ByteString.Lazy as L
import
Data.Text.Encoding
--
import Data.Text.Encoding
import
IHaskell.IPython.Types
import
IHaskell.IPython.Types
...
...
ipython-kernel/src/IHaskell/IPython/Types.hs
View file @
e6fb0fe0
...
@@ -34,13 +34,13 @@ module IHaskell.IPython.Types (
...
@@ -34,13 +34,13 @@ module IHaskell.IPython.Types (
extractPlain
,
extractPlain
,
)
where
)
where
import
Control.Applicative
((
<$>
),
(
<*>
))
--
import Control.Applicative ((<$>), (<*>))
import
Data.Aeson
import
Data.Aeson
import
Data.ByteString
(
ByteString
)
import
Data.ByteString
(
ByteString
)
import
Data.List
(
find
)
import
Data.List
(
find
)
import
Data.Map
(
Map
)
import
Data.Map
(
Map
)
import
Data.Serialize
import
Data.Serialize
import
qualified
Data.String
as
S
--
import qualified Data.String as S
import
Data.Text
(
Text
)
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
Text
import
qualified
Data.Text
as
Text
import
qualified
Data.Text.Encoding
as
Text
import
qualified
Data.Text.Encoding
as
Text
...
...
ipython-kernel/src/IHaskell/IPython/ZeroMQ.hs
View file @
e6fb0fe0
...
@@ -18,9 +18,9 @@ import Control.Concurrent
...
@@ -18,9 +18,9 @@ import Control.Concurrent
import
Control.Exception
import
Control.Exception
import
Control.Monad
import
Control.Monad
import
Data.Aeson
import
Data.Aeson
import
qualified
Data.ByteString.Lazy
as
LBS
import
Data.ByteString
(
ByteString
)
import
Data.ByteString
(
ByteString
)
import
qualified
Data.ByteString.Char8
as
Char
import
qualified
Data.ByteString.Char8
as
Char
import
qualified
Data.ByteString.Lazy
as
LBS
import
Data.Char
import
Data.Char
import
Data.Digest.Pure.SHA
as
SHA
import
Data.Digest.Pure.SHA
as
SHA
import
Data.Monoid
((
<>
))
import
Data.Monoid
((
<>
))
...
@@ -28,16 +28,16 @@ import qualified Data.Text.Encoding as Text
...
@@ -28,16 +28,16 @@ import qualified Data.Text.Encoding as Text
import
System.ZMQ4
as
ZMQ4
hiding
(
stdin
)
import
System.ZMQ4
as
ZMQ4
hiding
(
stdin
)
import
Text.Read
(
readMaybe
)
import
Text.Read
(
readMaybe
)
import
IHaskell.IPython.Types
import
IHaskell.IPython.Message.Parser
import
IHaskell.IPython.Message.Parser
import
IHaskell.IPython.Message.Writer
import
IHaskell.IPython.Message.Writer
()
import
IHaskell.IPython.Types
-- | The channel interface to the ZeroMQ sockets. All communication is done via Messages, which are
-- | The channel interface to the ZeroMQ sockets. All communication is done via Messages, which are
-- encoded and decoded into a lower level form before being transmitted to IPython. These channels
-- encoded and decoded into a lower level form before being transmitted to IPython. These channels
-- should functionally serve as high-level sockets which speak Messages instead of ByteStrings.
-- should functionally serve as high-level sockets which speak Messages instead of ByteStrings.
data
ZeroMQInterface
=
data
ZeroMQInterface
=
Channels
Channels
{
{
-- | A channel populated with requests from the frontend.
-- | A channel populated with requests from the frontend.
shellRequestChannel
::
Chan
Message
shellRequestChannel
::
Chan
Message
-- | Writing to this channel causes a reply to be sent to the frontend.
-- | Writing to this channel causes a reply to be sent to the frontend.
...
...
ipython-kernel/stack.yaml
deleted
100644 → 0
View file @
c7a167a3
flags
:
ipython-kernel
:
examples
:
false
packages
:
-
'
.'
extra-deps
:
[]
resolver
:
nightly-2015-08-15
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