CurryInfo: ertools-3.0.0 / Database.ERD.Generic.maxTestUpdate

definition:
maxTestUpdate :: (Read t, Show t, Eq a, Show a) =>
                 String -> (Key -> t -> Dynamic) -> (Key -> t -> en)
              -> (en -> Key) -> (en -> a) -> Int -> en -> Transaction ()
maxTestUpdate ename entrypred info2entry keyf selector max obj =
  getDB (getAllEntities entrypred info2entry) |>>= \es ->
  let entries = filter (\e -> selector obj == selector e) es in 
  getEntry entrypred info2entry (keyf obj) |>>= \old ->
  if (length entries < max
        || (length entries == max && selector old == selector obj))
   then doneT
   else errorT (TError MaxError ("max reached for attribute "
                                 ++show (selector obj)++" in entity "++ename))
demand:
no demanded arguments
deterministic:
deterministic operation
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,_,_,_,_,_,_,_) |-> _}
name:
maxTestUpdate
precedence:
no precedence defined
result-values:
_
signature:
(Prelude.Read a, Prelude.Show a, Prelude.Eq c, Prelude.Show c) => String
-> (Prelude.Int -> a -> Database.KeyDatabaseSQLite.Dynamic) -> (Prelude.Int -> a
-> b) -> (b -> Prelude.Int) -> (b -> c) -> Prelude.Int -> b
-> Database.KeyDatabaseSQLite.Transaction ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term