aboutsummaryrefslogtreecommitdiff
path: root/client/src/Thermoprint/Client.hs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/Thermoprint/Client.hs')
-rw-r--r--client/src/Thermoprint/Client.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/src/Thermoprint/Client.hs b/client/src/Thermoprint/Client.hs
index 80045dd..2b99e7e 100644
--- a/client/src/Thermoprint/Client.hs
+++ b/client/src/Thermoprint/Client.hs
@@ -45,10 +45,8 @@ data Client m = Client
45 { printers :: EitherT ServantError m (Map PrinterId PrinterStatus) 45 { printers :: EitherT ServantError m (Map PrinterId PrinterStatus)
46 -- ^ List all printers 46 -- ^ List all printers
47 , jobs :: Maybe PrinterId 47 , jobs :: Maybe PrinterId
48 -> Maybe JobId 48 -> Maybe (Range (JobId))
49 -> Maybe JobId 49 -> Maybe (Range (UTCTime))
50 -> Maybe UTCTime
51 -> Maybe UTCTime
52 -> EitherT ServantError m (Seq (JobId, UTCTime, JobStatus)) 50 -> EitherT ServantError m (Seq (JobId, UTCTime, JobStatus))
53 -- ^ @jobs p minId maxId minTime maxTime@ lists a selection of jobs 51 -- ^ @jobs p minId maxId minTime maxTime@ lists a selection of jobs
54 , jobCreate :: Maybe PrinterId -> Printout -> EitherT ServantError m JobId 52 , jobCreate :: Maybe PrinterId -> Printout -> EitherT ServantError m JobId
@@ -79,6 +77,7 @@ data Client m = Client
79 } 77 }
80 78
81withArgs :: (x -> a :<|> b) -> ((x -> a) :<|> (x -> b)) 79withArgs :: (x -> a :<|> b) -> ((x -> a) :<|> (x -> b))
80-- ^ Undo factoring of APIs
82withArgs subAPI = (\(a :<|> _) -> a) . subAPI :<|> (\(_ :<|> b) -> b) . subAPI 81withArgs subAPI = (\(a :<|> _) -> a) . subAPI :<|> (\(_ :<|> b) -> b) . subAPI
83 82
84mkClient :: (IO :~> m) -- ^ A monad functor ('Nat') used to make the api functions work in any monad which can be constructed from 'IO' 83mkClient :: (IO :~> m) -- ^ A monad functor ('Nat') used to make the api functions work in any monad which can be constructed from 'IO'