ihaskell-magic 0.1.0.0 → 0.2.0.0
raw patch · 2 files changed
+8/−6 lines, 2 filesdep +ipython-kerneldep ~basedep ~ihaskell
Dependencies added: ipython-kernel
Dependency ranges changed: base, ihaskell
Files
- IHaskell/Display/Magic.hs +4/−3
- ihaskell-magic.cabal +4/−3
IHaskell/Display/Magic.hs view
@@ -14,6 +14,7 @@ import qualified Data.Text as T import qualified Data.Text.Encoding as T+import IHaskell.IPython.Types (MimeType(MimeSvg)) import Data.ByteString.UTF8 instance IHaskellDisplay T.Text where@@ -30,9 +31,9 @@ b64 = Char.unpack . Base64.encode withClass :: MagicClass -> B.ByteString -> DisplayData-withClass SVG = svg . B.toString-withClass (PNG w h) = png w h . Base64.encode-withClass JPG = jpg 400 300 . Base64.encode+withClass SVG = DisplayData MimeSvg . T.decodeUtf8+withClass (PNG w h) = png w h . T.decodeUtf8 . Base64.encode+withClass JPG = jpg 400 300 . T.decodeUtf8 . Base64.encode withClass HTML = html . B.toString withClass LaTeX = latex . B.toString withClass _ = plain . B.toString
ihaskell-magic.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.0.0+version: 0.2.0.0 -- A short (one-line) description of the package. synopsis: IHaskell display instances for bytestrings@@ -61,14 +61,15 @@ OverloadedStrings -- Other library packages from which modules are imported.- build-depends: base ==4.6.*,+ build-depends: base ==4.6.* || ==4.7.*, classy-prelude >=0.6, magic >= 1.0.8, text, bytestring, utf8-string, base64-bytestring,- ihaskell >= 0.3+ ipython-kernel,+ ihaskell >= 0.5 -- Directories containing source files. -- hs-source-dirs: