Merge pull request #497 from sumitsahrawat/fp-conversions

Temporary fix for classy-prelude
This commit is contained in:
Andrew Gibiansky 2015-05-23 00:09:43 +02:00
commit f002190f67
17 changed files with 19 additions and 19 deletions

View File

@ -59,7 +59,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
here,
classy-prelude >=0.7,
classy-prelude >=0.10.5 && <0.11,
aeson >= 0.7,
aeson-pretty >= 0.7,
chunked-data >=0.1,

View File

@ -62,7 +62,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.6,
classy-prelude >=0.10.5 && <0.11,
ihaskell >= 0.5
-- Directories containing source files.

View File

@ -62,7 +62,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.6,
classy-prelude >=0.10.5 && <0.11,
blaze-html >= 0.6,
blaze-markup >= 0.5,
ihaskell >= 0.5

View File

@ -39,7 +39,7 @@ chartData renderable format = do
mkFile opts filename renderable
-- Convert to base64.
imgData <- readFile filename
imgData <- readFile $ fpFromString filename
return $
case format of
PNG -> png width height $ base64 imgData

View File

@ -59,7 +59,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.10.5,
classy-prelude >=0.10.5 && <0.11,
bytestring,
data-default-class,
directory,

View File

@ -36,7 +36,7 @@ diagramData renderable format = do
renderCairo filename (mkSizeSpec2D (Just imgWidth) (Just imgHeight)) renderable
-- Convert to base64.
imgData <- readFile filename
imgData <- readFile $ fpFromString filename
let value =
case format of
PNG -> png (floor imgWidth) (floor imgHeight) $ base64 imgData

View File

@ -47,7 +47,7 @@ animationData renderable = do
mainRender (diagOpts, gifOpts) frameSet
-- Convert to ascii represented base64 encoding
imgData <- readFile filename
imgData <- readFile $ fpFromString filename
return . unpack . base64 $ imgData
-- Rendering hint.

View File

@ -59,7 +59,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.10.5,
classy-prelude >=0.10.5 && <0.11,
bytestring,
directory,
-- Use diagrams wrapper package to ensure all same versions of subpackages

View File

@ -60,7 +60,7 @@ displayImageAsJpg renderable = do
-- Write the image
saveJpgImage 95 filename renderable
-- Convert to base64.
imgData <- readFile filename
imgData <- readFile $ fpFromString filename
return $ Display [jpg (imWidth renderable) (imHeight renderable) $ base64 imgData]
-- The type DynamicImage does not have a function to extract width and height

View File

@ -63,7 +63,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.10.5,
classy-prelude >=0.10.5 && <0.11,
bytestring,
directory,
JuicyPixels >= 3.1.3,

View File

@ -62,7 +62,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >=0.6,
classy-prelude >=0.10.5 && <0.11,
magic >= 1.0.8,
text,
bytestring,

View File

@ -61,7 +61,7 @@ library
build-depends: base >=4.6 && <4.9,
aeson >=0.7 && <0.9,
unordered-containers,
classy-prelude,
classy-prelude >=0.10.5 && <0.11,
random >= 1,
parsec,
here,

View File

@ -31,7 +31,7 @@ figureData figure format = do
writeFigure format fname (w, h) figure
-- Read back, and convert to base64.
imgData <- readFile fname
imgData <- readFile $ fpFromString fname
let value =
case format of
PNG -> png w h $ base64 imgData

View File

@ -59,7 +59,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
classy-prelude >= 0.10.5,
classy-prelude >= 0.10.5 && <0.11,
plot,
bytestring,
ihaskell >= 0.6.2

View File

@ -60,7 +60,7 @@ library
-- Other library packages from which modules are imported.
build-depends: base >=4.6 && <4.9,
aeson >=0.7 && <0.9,
classy-prelude,
classy-prelude >=0.10.5 && <0.11,
here,
ihaskell >= 0.4

View File

@ -403,7 +403,7 @@ evalCommand _ (Module contents) state = wrapExecution state $ do
filename = last namePieces ++ ".hs"
liftIO $ do
createDirectoryIfMissing True directory
writeFile (directory ++ filename) contents
writeFile (fpFromString $ directory ++ filename) contents
-- Clear old modules of this name
let modName = intercalate "." namePieces
@ -565,7 +565,7 @@ evalCommand _ (Directive LoadFile names) state = wrapExecution state $ do
let filename = if endswith ".hs" name
then name
else name ++ ".hs"
contents <- readFile filename
contents <- readFile $ fpFromString filename
modName <- intercalate "." <$> getModuleName contents
doLoadModule filename modName
return (ManyDisplay displays)

View File

@ -101,7 +101,7 @@ runKernel kernelOpts profileSrc = do
libdir = kernelSpecGhcLibdir kernelOpts
-- Parse the profile file.
Just profile <- liftM decode . readFile $ profileSrc
Just profile <- liftM decode . readFile . fpFromText $ profileSrc
-- Necessary for `getLine` and their ilk to work.
dir <- getIHaskellDir
@ -131,7 +131,7 @@ runKernel kernelOpts profileSrc = do
confFile <- liftIO $ kernelSpecConfFile kernelOpts
case confFile of
Just filename -> liftIO (readFile filename) >>= evaluator
Just filename -> liftIO (readFile $ fpFromString filename) >>= evaluator
Nothing -> return ()
forever $ do