aboutsummaryrefslogtreecommitdiff
path: root/tprint/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tprint/src/Main.hs')
-rw-r--r--tprint/src/Main.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tprint/src/Main.hs b/tprint/src/Main.hs
index 7c60d0d..f78349e 100644
--- a/tprint/src/Main.hs
+++ b/tprint/src/Main.hs
@@ -102,7 +102,7 @@ tprint TPrint{ operation = Job{..}, ..} Client{..} out = job jobId >>= format
102 | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty p 102 | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty p
103 | otherwise <- output = T.hPutStrLn out =<< either throwM return (cobbcode p) 103 | otherwise <- output = T.hPutStrLn out =<< either throwM return (cobbcode p)
104 104
105tprint TPrint{ operation = JobCreate{..}, ..} client@Client{..} out = withInput input $ \inH -> do 105tprint TPrint{ operation = JobCreate{..}, ..} client@Client{..} _ = withInput input $ \inH -> do
106 let 106 let
107 p' 107 p'
108 | (BBCode, _) <- input = either throwM return . bbcode =<< T.hGetContents inH 108 | (BBCode, _) <- input = either throwM return . bbcode =<< T.hGetContents inH
@@ -110,7 +110,10 @@ tprint TPrint{ operation = JobCreate{..}, ..} client@Client{..} out = withInput
110 block' 110 block'
111 | block = blockLoop client 111 | block = blockLoop client
112 | otherwise = const $ return () 112 | otherwise = const $ return ()
113 block' =<< jobCreate printer . force =<< p' 113 p <- force <$> p'
114 unless dryRun $ block' =<< jobCreate printer p
115
116tprint TPrint{ operation = JobDelete{..}, ..} Client{..} _ = unless dryRun $ jobDelete jobId
114 117
115 118
116tprint _ _ _ = undefined 119tprint _ _ _ = undefined