Revision 7dbe4c72 src/Ganeti/Utils.hs
b/src/Ganeti/Utils.hs | ||
---|---|---|
49 | 49 |
, getCurrentTimeUSec |
50 | 50 |
, clockTimeToString |
51 | 51 |
, chompPrefix |
52 |
, warn |
|
52 | 53 |
, wrap |
53 | 54 |
, trim |
54 | 55 |
, defaultHead |
... | ... | |
247 | 248 |
exitUnless :: Bool -> String -> IO () |
248 | 249 |
exitUnless cond = exitWhen (not cond) |
249 | 250 |
|
251 |
-- | Print a warning, but do not exit. |
|
252 |
warn :: String -> IO () |
|
253 |
warn = hPutStrLn stderr . (++) "Warning: " |
|
254 |
|
|
250 | 255 |
-- | Helper for 'niceSort'. Computes the key element for a given string. |
251 | 256 |
extractKey :: [Either Integer String] -- ^ Current (partial) key, reversed |
252 | 257 |
-> String -- ^ Remaining string |
Also available in: Unified diff