definition: |
readGlobalP :: Read a => GlobalP a -> IO a readGlobalP (GlobalP f) = exclusiveIO (f ++ ".LOCK") $ do cnt <- openFile f ReadMode >>= hGetContents case reads cnt of [(x,_)] -> return x _ -> error $ "Cannot read persistent global entity in file: " ++ f ++ "\nFile contents:\n" ++ cnt |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
Reads the current value of a persistent global entity. |
failfree: |
(_, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{GlobalP}) |-> _} |
name: |
readGlobalP |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
Prelude.Read a => GlobalP a -> Prelude.IO a |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
reducible on all ground data terms |