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
f7efb69b
Commit
f7efb69b
authored
Dec 13, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed cereal from globalImports, now exported from IHaskell.Display
parent
bae2b044
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
Display.hs
IHaskell/Display.hs
+7
-1
Evaluate.hs
IHaskell/Eval/Evaluate.hs
+1
-6
No files found.
IHaskell/Display.hs
View file @
f7efb69b
...
...
@@ -3,10 +3,13 @@
module
IHaskell.Display
(
IHaskellDisplay
(
..
),
plain
,
html
html
,
serializeDisplay
)
where
import
ClassyPrelude
import
Data.Serialize
as
Serialize
import
Data.ByteString
import
Data.String.Utils
(
rstrip
)
import
IHaskell.Types
...
...
@@ -22,3 +25,6 @@ plain = Display PlainText . rstrip
-- | Generate an HTML display.
html
::
String
->
DisplayData
html
=
Display
MimeHtml
serializeDisplay
::
[
DisplayData
]
->
ByteString
serializeDisplay
=
Serialize
.
encode
IHaskell/Eval/Evaluate.hs
View file @
f7efb69b
...
...
@@ -98,11 +98,6 @@ type Interpreter = Ghc
globalImports
::
[
String
]
globalImports
=
[
"import Prelude"
-- IHaskell.Display must be imported in order for the IHaskellDisplay
-- data typeclass to function properly.
--, "import Data.Typeable"
,
"import qualified Data.Serialize as Serialize"
,
"import Data.Serialize"
,
"import IHaskell.Types"
,
"import IHaskell.Display"
,
"import Control.Applicative ((<$>))"
...
...
@@ -364,7 +359,7 @@ evalCommand (Expression expr) = do
-- attempting to do this without the serialization to binary and
-- back gives very strange errors - all the types match but it
-- refuses to decode back into a [DisplayData].
displayedBytestring
<-
dynCompileExpr
"
Serialize.encode
(IHaskell.Display.display it)"
displayedBytestring
<-
dynCompileExpr
"
IHaskell.Display.serializeDisplay
(IHaskell.Display.display it)"
case
fromDynamic
displayedBytestring
of
Nothing
->
error
"Expecting lazy Bytestring"
Just
bytestring
->
...
...
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