CurryInfo: global-3.2.0 / Data.Global.safeReadGlobalP

definition: Info
 
safeReadGlobalP :: (Read a, Show a) => GlobalP a -> a -> IO a
safeReadGlobalP g dflt =
  catch (readGlobalP g)
        (\err -> do hPutStrLn stderr $ "Error caught in 'safeReadGlobalP':\n" ++
                                       show err
                    writeGlobalP g dflt >> return dflt )
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Safely reads the current value of a global.
If `readGlobalP` fails (e.g., due to a corrupted persistent storage),
the global is re-initialized with the default value given as
the second argument.
failfree: Info
 (_, _, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_,_) |-> _}
name: Info
 safeReadGlobalP
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 (Prelude.Read a, Prelude.Show a) => GlobalP a -> a -> Prelude.IO a
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 reducible on all ground data terms