在这里,我试图让步的推论表明职能类型。 虽然该法典汇编成册,但它在时间上还是失败。
Ambiguous type variables `b0 , `m0 in the constraint:
(PersistBackend b0 m0) arising from a use of `isFree
Probable fix: add a type signature that fixes these type variable(s)
In the expression: isFree testDay
In an equation for `it : it = isFree testDay
:t isFree
isfree * PersistBackend b m => C.Day -> b m Bool
>isFree day = do
match <- selectList [TestStartDate ==. day,
TestStatus !=. Passed,
TestStatus !=. Failed] []
if (L.null match) then (liftIO $ return True) else (liftIO $ return False)