CurryInfo: cpm-3.3.0 / CPM.ErrorLogger.logAt

definition:
logAt :: LogLevel -> String -> ErrorLogger ()
logAt lvl msg = ErrorLogger $ \l wst ->
  if wst
    then do
      runtime <- getProcessInfos >>= return . maybe 0 id . lookup ElapsedTime
      return ((l, wst), ([LogEntry lvl (showTime runtime ++ 's':' ':msg)], Right ()))
    else
      return ((l, wst), ([LogEntry lvl msg], Right ()))
 where
  showTime t = show (t `div` 1000) ++ "." ++ show2 ((t `mod` 1000) `div` 10)
  show2 i = if i < 10 then '0' : show i else show i
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
--- Logs a message at a user-defined level.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_) |-> _}
name:
logAt
precedence:
no precedence defined
result-values:
_
signature:
LogLevel -> String -> ErrorLogger ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term