Commit 1c0d4549 authored by sumitsahrawat's avatar sumitsahrawat Committed by Andrew Gibiansky

Another round of fixes

* Try to fix issue with `cabal configure --enable-tests' on travis.

* Remove upper bounds for version of ihaskell from ihaskell-rlangqq,
  taking cue from the other ihaskell-* packages.

* Fix formatting issues with IHaskell.Display.Plot.
parent e46922c0
...@@ -49,6 +49,7 @@ script: ...@@ -49,6 +49,7 @@ script:
travis_retry ./build.sh ihaskell travis_retry ./build.sh ihaskell
fi fi
# Build and run the test suite # Build and run the test suite
- travis_retry cabal install --only-dependencies --enable-tests
- travis_retry cabal configure --enable-tests - travis_retry cabal configure --enable-tests
- travis_retry cabal test --show-details=always - travis_retry cabal test --show-details=always
- | - |
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
module IHaskell.Display.Plot where module IHaskell.Display.Plot where
import ClassyPrelude import ClassyPrelude
import qualified Data.ByteString.Char8 as Char import qualified Data.ByteString.Char8 as Char
import Graphics.Rendering.Plot import Graphics.Rendering.Plot
import IHaskell.Display import IHaskell.Display
instance IHaskellDisplay (Figure ()) where instance IHaskellDisplay (Figure ()) where
display figure = do display figure = do
...@@ -32,11 +32,13 @@ figureData figure format = do ...@@ -32,11 +32,13 @@ figureData figure format = do
-- Read back, and convert to base64. -- Read back, and convert to base64.
imgData <- readFile $ fpFromString fname imgData <- readFile $ fpFromString fname
let value = case format of let value =
PNG -> png w h $ base64 imgData case format of
SVG -> svg $ Char.unpack imgData PNG -> png w h $ base64 imgData
SVG -> svg $ Char.unpack imgData
return value return value
where where
extension SVG = "svg" extension SVG = "svg"
extension PNG = "png" extension PNG = "png"
...@@ -18,7 +18,7 @@ library ...@@ -18,7 +18,7 @@ library
filepath >=1.3 && <1.4, filepath >=1.3 && <1.4,
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.8,
split >=0.2 && <0.3, split >=0.2 && <0.3,
......
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