fix(build): remove redundant constraints
This commit is contained in:
parent
54a956dc36
commit
ea82d75a09
@ -9,9 +9,9 @@ module Foundation.Yesod.ErrorHandler
|
|||||||
import Import.NoFoundation hiding (errorHandler)
|
import Import.NoFoundation hiding (errorHandler)
|
||||||
|
|
||||||
import Foundation.Type
|
import Foundation.Type
|
||||||
import Foundation.I18n
|
-- import Foundation.I18n
|
||||||
import Foundation.Authorization
|
import Foundation.Authorization
|
||||||
import Foundation.SiteLayout
|
-- import Foundation.SiteLayout
|
||||||
import Foundation.Routes
|
import Foundation.Routes
|
||||||
import Foundation.DB
|
import Foundation.DB
|
||||||
|
|
||||||
@ -20,15 +20,15 @@ import qualified Data.Text as Text
|
|||||||
|
|
||||||
import qualified Network.Wai as W
|
import qualified Network.Wai as W
|
||||||
|
|
||||||
import System.Exit -- DEBUG: just for testing
|
-- import System.Exit -- DEBUG: just for testing
|
||||||
import System.Posix.Process -- DEBUG: just for testing
|
-- import System.Posix.Process -- DEBUG: just for testing
|
||||||
|
|
||||||
errorHandler :: ( MonadSecretBox (HandlerFor UniWorX)
|
errorHandler :: ( MonadSecretBox (HandlerFor UniWorX)
|
||||||
, MonadSecretBox (WidgetFor UniWorX)
|
-- , MonadSecretBox (WidgetFor UniWorX)
|
||||||
, MonadSecretBox (ExceptT EncodedSecretBoxException (HandlerFor UniWorX))
|
, MonadSecretBox (ExceptT EncodedSecretBoxException (HandlerFor UniWorX))
|
||||||
, MonadAuth (HandlerFor UniWorX)
|
, MonadAuth (HandlerFor UniWorX)
|
||||||
, BearerAuthSite UniWorX
|
, BearerAuthSite UniWorX
|
||||||
, YesodPersistBackend UniWorX ~ SqlBackend
|
-- , YesodPersistBackend UniWorX ~ SqlBackend
|
||||||
)
|
)
|
||||||
=> ErrorResponse -> HandlerFor UniWorX TypedContent
|
=> ErrorResponse -> HandlerFor UniWorX TypedContent
|
||||||
errorHandler err = do
|
errorHandler err = do
|
||||||
|
|||||||
@ -32,10 +32,10 @@ type AVSGetRampLicences = "RampDrivingLicenceInfo" :> ReqBody '[JSON] AvsQueryG
|
|||||||
type AVSSetRampLicences = "RampDrivingLicence" :> ReqBody '[JSON] AvsQuerySetLicences :> Post '[JSON] AvsResponseSetLicences
|
type AVSSetRampLicences = "RampDrivingLicence" :> ReqBody '[JSON] AvsQuerySetLicences :> Post '[JSON] AvsResponseSetLicences
|
||||||
|
|
||||||
avsMaxSetLicenceAtOnce :: Int
|
avsMaxSetLicenceAtOnce :: Int
|
||||||
avsMaxSetLicenceAtOnce = 99 -- maximum input set size for avsQuerySetLicences as enforced by AVS
|
avsMaxSetLicenceAtOnce = 90 -- maximum input set size for avsQuerySetLicences as enforced by AVS
|
||||||
|
|
||||||
avsMaxGetStatusAtOnce :: Int
|
avsMaxGetStatusAtOnce :: Int
|
||||||
avsMaxGetStatusAtOnce = 990 -- maximum input set size for avsQueryStatus as enforced by AVS
|
avsMaxGetStatusAtOnce = 900 -- maximum input set size for avsQueryStatus as enforced by AVS
|
||||||
|
|
||||||
|
|
||||||
avsApi :: Proxy AVS
|
avsApi :: Proxy AVS
|
||||||
@ -105,6 +105,16 @@ mkAvsQuery baseUrl basicAuth cliEnv = AvsQuery
|
|||||||
res1 <- rawQueryStatus (AvsQueryStatus avid_1)
|
res1 <- rawQueryStatus (AvsQueryStatus avid_1)
|
||||||
res2 <- splitQueryStatus (AvsQueryStatus avid_2)
|
res2 <- splitQueryStatus (AvsQueryStatus avid_2)
|
||||||
return $ res1 <> res2
|
return $ res1 <> res2
|
||||||
|
|
||||||
|
-- splitQuery :: (a -> Set b) -> (Set b -> a) -> (a -> ClientM c) -> a -> ClientM c
|
||||||
|
-- splitQuery toSet fromSet rawQuery q
|
||||||
|
-- | Set.size (toSet q) <= avsMaxGetStatusAtOnce = rawQueryStatus q
|
||||||
|
-- | otherwise = do
|
||||||
|
-- let (fromSet -> avid_1,fromSet -> avid_2) = Set.splitAt avsMaxGetStatusAtOnce (toSet q)
|
||||||
|
-- res1 <- rawQuery avid_1
|
||||||
|
-- res2 <- splitQuery toSet fromSet rawQuery avid_2
|
||||||
|
-- return $ fromSet (toSet res1 <> toSet res2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user