diff options
Diffstat (limited to 'src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs')
-rw-r--r-- | src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs b/src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs index ae825c4..ecc85e0 100644 --- a/src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs +++ b/src/Text/Pandoc/Filter/Plot/Renderers/Prelude.hs @@ -15,36 +15,18 @@ module Text.Pandoc.Filter.Plot.Renderers.Prelude Text, st, unpack, - commandSuccess, - existsOnPath, + findExecutable, appendCapture, toRPath, ) where -import Data.Functor ((<&>)) -import Data.Maybe (isJust) import Data.Text (Text, unpack) import System.Directory (findExecutable) -import System.Exit (ExitCode (..)) import System.FilePath (isPathSeparator) import Text.Pandoc.Filter.Plot.Monad import Text.Shakespeare.Text (st) --- | Check that the supplied command results in --- an exit code of 0 (i.e. no errors) -commandSuccess :: - FilePath -> -- Directory from which to run the command - Text -> -- Command to run, including the executable - PlotM Bool -commandSuccess fp s = do - (ec, _) <- runCommand fp s - return $ ec == ExitSuccess - --- | Checks that an executable is available on path, at all. -existsOnPath :: FilePath -> IO Bool -existsOnPath fp = findExecutable fp <&> isJust - -- | A shortcut to append capture script fragments to scripts appendCapture :: (FigureSpec -> FilePath -> Script) -> |