diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-04 19:04:07 +0000 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-04 19:04:07 +0000 |
| commit | a7e923cba4dea3d5e0aaf03081d8d3266681c8d5 (patch) | |
| tree | 37469b3c3001f044e535c56fc9781905d59f1139 | |
| parent | 02b70a1c7ee923b85a44febf99e31476272fcf41 (diff) | |
| download | thermoprint-a7e923cba4dea3d5e0aaf03081d8d3266681c8d5.tar thermoprint-a7e923cba4dea3d5e0aaf03081d8d3266681c8d5.tar.gz thermoprint-a7e923cba4dea3d5e0aaf03081d8d3266681c8d5.tar.bz2 thermoprint-a7e923cba4dea3d5e0aaf03081d8d3266681c8d5.tar.xz thermoprint-a7e923cba4dea3d5e0aaf03081d8d3266681c8d5.zip | |
Fixed type ambiguity
| -rw-r--r-- | server/src/Thermoprint/Server/API.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/Thermoprint/Server/API.hs b/server/src/Thermoprint/Server/API.hs index 2433c8e..247fb89 100644 --- a/server/src/Thermoprint/Server/API.hs +++ b/server/src/Thermoprint/Server/API.hs | |||
| @@ -146,11 +146,11 @@ listJobs :: Maybe PrinterId | |||
| 146 | listJobs Nothing minId maxId minTime maxTime = fmap mconcat . mapM (\pId -> listJobs (Just pId) minId maxId minTime maxTime) =<< asks (Map.keys . printers) | 146 | listJobs Nothing minId maxId minTime maxTime = fmap mconcat . mapM (\pId -> listJobs (Just pId) minId maxId minTime maxTime) =<< asks (Map.keys . printers) |
| 147 | listJobs pId minId maxId minTime maxTime = fmap (filterJobs . extractJobs) . (\(a, b) -> (,) a <$> queue' b) =<< lookupPrinter pId | 147 | listJobs pId minId maxId minTime maxTime = fmap (filterJobs . extractJobs) . (\(a, b) -> (,) a <$> queue' b) =<< lookupPrinter pId |
| 148 | where | 148 | where |
| 149 | filterJobs = Seq.filter (\(id, time, _) -> and [ maybe True (<= id ) minId | 149 | filterJobs = Seq.filter (\(id, time, _) -> and ([ maybe True (<= id ) minId |
| 150 | , maybe True (>= id ) maxId | 150 | , maybe True (>= id ) maxId |
| 151 | , maybe True (<= time) minTime | 151 | , maybe True (<= time) minTime |
| 152 | , maybe True (>= time) maxTime | 152 | , maybe True (>= time) maxTime |
| 153 | ] | 153 | ] :: [Bool]) |
| 154 | ) | 154 | ) |
| 155 | 155 | ||
| 156 | getJob :: API.JobId -> Handler Printout | 156 | getJob :: API.JobId -> Handler Printout |
