diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-03-01 10:20:24 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-03-01 10:20:24 +0100 |
| commit | 1095c5fb127e5db2313ef2edddee0626c72ce648 (patch) | |
| tree | c0f4a2fbab8d749c84f23bb7f4f53d0a25bcf47d | |
| parent | 0ae7acc6217b1a06c8a1628c7a6dc2487ab55736 (diff) | |
| download | thermoprint-1095c5fb127e5db2313ef2edddee0626c72ce648.tar thermoprint-1095c5fb127e5db2313ef2edddee0626c72ce648.tar.gz thermoprint-1095c5fb127e5db2313ef2edddee0626c72ce648.tar.bz2 thermoprint-1095c5fb127e5db2313ef2edddee0626c72ce648.tar.xz thermoprint-1095c5fb127e5db2313ef2edddee0626c72ce648.zip | |
minor cleanup
| -rw-r--r-- | tprint/src/Main.hs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/tprint/src/Main.hs b/tprint/src/Main.hs index dcdeb4f..ce4df20 100644 --- a/tprint/src/Main.hs +++ b/tprint/src/Main.hs | |||
| @@ -54,11 +54,6 @@ tprint TPrint{ operation = Jobs{..}, ..} Client{..} out = jobs printer jobRange | |||
| 54 | | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty js | 54 | | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty js |
| 55 | | otherwise = hPutStrLn out . dumpStr $ toList js | 55 | | otherwise = hPutStrLn out . dumpStr $ toList js |
| 56 | jSort (id, time, status) (id', time', status') = queueSort status status' <> compare time' time <> compare id id' | 56 | jSort (id, time, status) (id', time', status') = queueSort status status' <> compare time' time <> compare id id' |
| 57 | where | ||
| 58 | compare' :: Ord a => a -> a -> Ordering | ||
| 59 | compare' | ||
| 60 | | (Queued _) <- status = compare | ||
| 61 | | otherwise = flip compare | ||
| 62 | humanStatus (Queued (PrinterId n)) Nothing = "queued at printer #" ++ show n | 57 | humanStatus (Queued (PrinterId n)) Nothing = "queued at printer #" ++ show n |
| 63 | humanStatus (Queued _) _ = "queued" | 58 | humanStatus (Queued _) _ = "queued" |
| 64 | humanStatus (Printing (PrinterId n)) Nothing = "printing on printer #" ++ show n | 59 | humanStatus (Printing (PrinterId n)) Nothing = "printing on printer #" ++ show n |
