better menu formattimg

This commit is contained in:
Jonathan Lamothe 2018-12-09 11:23:50 -05:00
parent def809c8fb
commit b27faf2948

View File

@ -74,8 +74,12 @@ changeMasterPass = do
quit :: S.StateT Status IO ()
quit = return ()
menu :: String -> [(String, S.StateT Status IO a)] -> S.StateT Status IO a
menu title = reqState . R.prompt title . R.reqMenu . map menuItem
menu
:: String
-> [(String, S.StateT Status IO a)]
-> S.StateT Status IO a
menu title = reqState . R.prompt ("\n*** " ++ title ++ " ***") .
R.reqMenu . map menuItem
menuItem :: (String, a) -> (String, R.Request a)
menuItem (str, x) = (str, return x)