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

definition:
uniqueC :: (Read t, Show t, Eq a, Show a) =>
           String -> (Key -> t -> Dynamic) -> (Key -> t -> en)
        -> (en -> a) -> en -> Transaction ()
uniqueC ename entrypred info2entry selector obj =
  getDB (allDBKeyInfos entrypred) |>>= \kis ->
  let entries = filter (\e -> selector obj == selector e)
                       (map (uncurry info2entry) kis)
   in if length entries <= 1
      then doneT
      else errorT (TError UniqueError
                     (ename++" unique attribute "
                      ++show (selector obj)++" is not unique"))
demand:
no demanded arguments
deterministic:
deterministic operation
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,_,_,_,_,_) |-> _}
name:
uniqueC
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 -> c) -> 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