diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
commit | 56dce7c4feada1d4ca93a312e48813fb1918b93b (patch) | |
tree | 0b49a6b2c9adefa0d3d6f989a84bfd654f9d1578 /State.hs | |
parent | 4728bb04b2f5daff7a2ed8c30dd0fd8a8ee9539b (diff) |
advancing in the monads transformers implementation
Diffstat (limited to 'State.hs')
-rw-r--r-- | State.hs | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -89,6 +89,12 @@ initialColorStyle = ColorStyle { , statusBarColorID = defaultColorID } +scrColsAsInteger st = toInteger $ screenColumns st +scrRowsAsInteger st = toInteger $ screenRows st +curRowAsInteger st = toInteger $ currentRow st +colPadAsInteger st = toInteger $ columnPadding st + + {- data MState = MState { selectedRowMD :: Integer -- Selected row in MaildirMode @@ -146,11 +152,9 @@ decSelectedRow st | (selectedRow st) > 0 = case (mode st) of MaildirMode -> st { selectedRowMD = (selectedRowMD st) - 1 } IndexMode -> st { selectedRowIn = (selectedRowIn st) - 1 } | otherwise = st - +-} + selectedRow st = case (mode st) of - MaildirMode -> selectedRowMD st - IndexMode -> selectedRowIn st + MaildirMode -> selectedRowMD . maildirState $ st + IndexMode -> selectedRowIn . indexState $ st -scrColsAsInt st = fromIntegral $ scrColumns st -scrRowsAsInt st = fromIntegral $ scrRows st --}
\ No newline at end of file |