aboutsummaryrefslogtreecommitdiff
path: root/Interact.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-10 22:26:39 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:41 +0100
commitffb0b7c6ce9d92254a743d45373d2c0ec9049cc5 (patch)
tree58ac68186d5331787ca14553d13fbf2b82f75fbb /Interact.hs
parente7a22c8544c36c0d3e26ce56ea488a606e3e7558 (diff)
downloadpandoc-ffb0b7c6ce9d92254a743d45373d2c0ec9049cc5.tar.gz
Removed Interact.hs, not needed any more with modern tools.
Diffstat (limited to 'Interact.hs')
-rw-r--r--Interact.hs34
1 files changed, 0 insertions, 34 deletions
diff --git a/Interact.hs b/Interact.hs
deleted file mode 100644
index 4d24904c5..000000000
--- a/Interact.hs
+++ /dev/null
@@ -1,34 +0,0 @@
--- Get an interactive shell with the right packages to load
--- pandoc modules.
-
--- To use:
--- runghc Interact.hs
--- then,
--- :l Text/Pandoc.hs
--- (or whichever package you like)
-
--- You must have first done a 'cabal configure' or 'cabal install'
-
--- Note: Interact.hs doesn't work with Cabal >= 1.18. I recommend
--- using cabal sandboxes and the new 'cabal repl' command if you are
--- using a recent version.
-
-import System.Process
-import Distribution.Simple.LocalBuildInfo
-import Distribution.Package
-import Distribution.Version
-import Data.List (intercalate)
-
-main = do
- setupConfig' <- readFile "dist/setup-config"
- let setupConfig = read $ unlines $ drop 1 $ lines setupConfig'
- let (Just (ComponentLocalBuildInfo { componentPackageDeps = deps })) = libraryConfig setupConfig
- let packageSpecs = map (toPackageSpec . snd) deps
- let args = ["-optP-include", "-optP../dist/build/autogen/cabal_macros.h","-cpp","-I../dist/build/autogen","-i../dist/build/autogen"] ++ concatMap (\p -> ["-package",p]) packageSpecs
- print args
- ph <- runProcess "ghci" args (Just "src") Nothing Nothing Nothing Nothing
- waitForProcess ph
-
-toPackageSpec pkg = pkgN ++ "-" ++ pkgV
- where (PackageName pkgN) = pkgName pkg
- pkgV = intercalate "." $ map show $ versionBranch $ pkgVersion pkg