This commit is contained in:
Joey Hess 2012-04-21 23:32:33 -04:00
parent bee420bd2d
commit ed79596b75
27 changed files with 56 additions and 52 deletions

View file

@ -108,12 +108,11 @@ nojson :: StatState String -> String -> StatState String
nojson a _ = a
showStat :: Stat -> StatState ()
showStat s = calc =<< s
showStat s = maybe noop calc =<< s
where
calc (Just (desc, a)) = do
calc (desc, a) = do
(lift . showHeader) desc
lift . showRaw =<< a
calc Nothing = return ()
supported_backends :: Stat
supported_backends = stat "supported backends" $ json unwords $