Commit 602939ad authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge pull request #488 from FranklinChen/7.10.1

7.10.1
parents 44ebe75c f743bcda
...@@ -43,7 +43,7 @@ install: ...@@ -43,7 +43,7 @@ install:
# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. # Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
script: script:
- | - |
if [ ${GHCVER%.*} = "7.8" ]; then if [ ${GHCVER%.*} = "7.8" ] || [ ${GHCVER%.*} = "7.10" ]; then
travis_retry ./build.sh all travis_retry ./build.sh all
else else
travis_retry ./build.sh ihaskell travis_retry ./build.sh ihaskell
......
...@@ -14,13 +14,13 @@ import Diagrams.Backend.Cairo ...@@ -14,13 +14,13 @@ import Diagrams.Backend.Cairo
import IHaskell.Display import IHaskell.Display
import IHaskell.Display.Diagrams.Animation import IHaskell.Display.Diagrams.Animation
instance IHaskellDisplay (QDiagram Cairo R2 Any) where instance IHaskellDisplay (QDiagram Cairo V2 Double Any) where
display renderable = do display renderable = do
png <- diagramData renderable PNG png <- diagramData renderable PNG
svg <- diagramData renderable SVG svg <- diagramData renderable SVG
return $ Display [png, svg] return $ Display [png, svg]
diagramData :: Diagram Cairo R2 -> OutputType -> IO DisplayData diagramData :: Diagram Cairo -> OutputType -> IO DisplayData
diagramData renderable format = do diagramData renderable format = do
switchToTmpDir switchToTmpDir
...@@ -33,7 +33,7 @@ diagramData renderable format = do ...@@ -33,7 +33,7 @@ diagramData renderable format = do
-- Write the image. -- Write the image.
let filename = ".ihaskell-diagram." ++ extension format let filename = ".ihaskell-diagram." ++ extension format
renderCairo filename (mkSizeSpec (Just imgWidth) (Just imgHeight)) renderable renderCairo filename (mkSizeSpec2D (Just imgWidth) (Just imgHeight)) renderable
-- Convert to base64. -- Convert to base64.
imgData <- readFile $ fpFromString filename imgData <- readFile $ fpFromString filename
...@@ -49,5 +49,5 @@ diagramData renderable format = do ...@@ -49,5 +49,5 @@ diagramData renderable format = do
extension PNG = "png" extension PNG = "png"
-- Rendering hint. -- Rendering hint.
diagram :: Diagram Cairo R2 -> Diagram Cairo R2 diagram :: Diagram Cairo -> Diagram Cairo
diagram = id diagram = id
...@@ -11,13 +11,13 @@ import Diagrams.Backend.CmdLine (DiagramOpts(..), mainRender) ...@@ -11,13 +11,13 @@ import Diagrams.Backend.CmdLine (DiagramOpts(..), mainRender)
import IHaskell.Display import IHaskell.Display
instance IHaskellDisplay (QAnimation Cairo R2 Any) where instance IHaskellDisplay (QAnimation Cairo V2 Double Any) where
display renderable = do display renderable = do
gif <- animationData renderable gif <- animationData renderable
return $ Display [html $ "<img src=\"data:image/gif;base64," return $ Display [html $ "<img src=\"data:image/gif;base64,"
++ gif ++ "\" />"] ++ gif ++ "\" />"]
animationData :: Animation Cairo R2 -> IO String animationData :: Animation Cairo V2 Double -> IO String
animationData renderable = do animationData renderable = do
switchToTmpDir switchToTmpDir
...@@ -51,5 +51,5 @@ animationData renderable = do ...@@ -51,5 +51,5 @@ animationData renderable = do
return . unpack . base64 $ imgData return . unpack . base64 $ imgData
-- Rendering hint. -- Rendering hint.
animation :: Animation Cairo R2 -> Animation Cairo R2 animation :: Animation Cairo V2 Double -> Animation Cairo V2 Double
animation = id animation = id
...@@ -63,13 +63,13 @@ library ...@@ -63,13 +63,13 @@ library
bytestring, bytestring,
directory, directory,
-- Use diagrams wrapper package to ensure all same versions of subpackages -- Use diagrams wrapper package to ensure all same versions of subpackages
diagrams==1.2.*, diagrams >= 1.3,
diagrams-lib, diagrams-lib,
diagrams-cairo, diagrams-cairo,
ihaskell >= 0.5, ihaskell >= 0.5,
-- The active package, used to represent animations -- The active package, used to represent animations
active >= 0.1.0 && <0.1.1 active >= 0.2
-- Directories containing source files. -- Directories containing source files.
-- hs-source-dirs: -- hs-source-dirs:
......
...@@ -13,14 +13,14 @@ library ...@@ -13,14 +13,14 @@ library
exposed-modules: IHaskell.Display.Rlangqq exposed-modules: IHaskell.Display.Rlangqq
other-extensions: TupleSections, TemplateHaskell other-extensions: TupleSections, TemplateHaskell
build-depends: base <5, build-depends: base <5,
Rlang-QQ >=0.2 && <0.3, Rlang-QQ >= 0.3,
directory >=1.2 && <1.3, directory >=1.2 && <1.3,
filepath >=1.3 && <1.5, filepath >=1.3 && <1.5,
bytestring >=0.10 && <0.11, bytestring >=0.10 && <0.11,
base64-bytestring >=1.0 && <1.1, base64-bytestring >=1.0 && <1.1,
ihaskell >= 0.5, ihaskell >= 0.5,
ihaskell-blaze >=0.2 && <0.3, ihaskell-blaze >=0.2 && <0.3,
blaze-html >=0.6 && <0.8, blaze-html >=0.6 && <0.9,
split >=0.2 && <0.3, split >=0.2 && <0.3,
stm -any, stm -any,
xformat >=0.1 && <0.2, xformat >=0.1 && <0.2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment