|
definition: |
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: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
Transforms a string into a key for an entity name. Nothing is returned if the string does not represent a reasonable key. |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_) |-> {Just,Nothing}}
|
|
name: |
readDatabaseKey |
|
precedence: |
no precedence defined |
|
result-values: |
{Just,Nothing}
|
|
signature: |
String -> (Prelude.Int -> a) -> String -> Prelude.Maybe a |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |