packages feed

hpygments 0.1.0 → 0.1.1

raw patch · 2 files changed

+6/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hpygments.cabal view
@@ -1,9 +1,10 @@ Name:               hpygments-Version:            0.1.0+Version:            0.1.1 Synopsis:           Highlight source code using Pygments Description:     Highlight source code using Pygments <http://pygments.org>. This package     depends on Pygments and its accompanying @pygmentize@ script.+Homepage:           https://github.com/davidlazar/hpygments License:            MIT License-file:       LICENSE Author:             David Lazar
src/Text/Highlighting/Pygments/JSON.hs view
@@ -18,10 +18,12 @@ getPygmentsJSON :: FromJSON a => String -> IO a getPygmentsJSON what = do     jsonDumper <- getJSONDumper-    (exitCode, stdout, _) <- readProcessWithExitCode jsonDumper [what] ""+    (exitCode, stdout, _) <- runPython jsonDumper [what] ""     when (exitCode /= ExitSuccess) $         fail $ jsonDumper ++ " failed: " ++ show exitCode     case decode stdout of         Nothing -> fail $ "failed to decode " ++ what         Just ls -> return ls-+  where+    runPython script args input = do+        readProcessWithExitCode "python" (script : args) input