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

definition: Info
 
readDatabaseKey :: String -> (Key -> enkey) -> String -> Maybe enkey
readDatabaseKey en toenkey s =
  let (ens,ks) = splitAt (length en) s
   in if ens==en && all isDigit ks then Just (toenkey (read ks))
                                   else Nothing
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Transforms a string into a key for an entity name.
Nothing is returned if the string does not represent a reasonable key.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_) |-> {Just,Nothing}}
name: Info
 readDatabaseKey
precedence: Info
 no precedence defined
result-values: Info
 {Just,Nothing}
signature: Info
 String -> (Prelude.Int -> a) -> String -> Prelude.Maybe a
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term