From 84a447a88bc4161235f3e800340cd537bf463c9d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 30 Nov 2018 08:32:04 -0800 Subject: [PATCH] Fix warnings in Text.Pandoc.Process. --- src/Text/Pandoc/Process.hs | 7 +++++-- 1 file 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