aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-11-30 08:32:04 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-11-30 08:32:04 -0800
commit84a447a88bc4161235f3e800340cd537bf463c9d (patch)
treeb6f9ef96ca3e686ff76da73b54653238ec108963
parentfe98c97b1cbc156b1ba7dc43d41a820f55906aab (diff)
downloadpandoc-84a447a88bc4161235f3e800340cd537bf463c9d.tar.gz
Fix warnings in Text.Pandoc.Process.
-rw-r--r--src/Text/Pandoc/Process.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Process.hs b/src/Text/Pandoc/Process.hs
index c22e85ec0..1c53f6065 100644
--- a/src/Text/Pandoc/Process.hs
+++ b/src/Text/Pandoc/Process.hs
@@ -77,8 +77,11 @@ pipeProcess mbenv cmd args input = do
}
withCreateProcess cp_opts $
\mbInh mbOuth _ pid -> do
- let Just inh = mbInh
- Just outh = mbOuth
+ let (inh, outh) =
+ case (mbInh, mbOuth) of
+ (Just i, Just o) -> (i, o)
+ (Nothing, _) -> error "withCreateProcess no inh"
+ (_, Nothing) -> error "withCreateProcess no outh"
out <- BL.hGetContents outh