diff options
Diffstat (limited to 'UI.hs')
-rw-r--r-- | UI.hs | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -5,16 +5,10 @@ module UI where -import Types +import Types.UI +import Control.Monad +import UI.Zenity +import UI.Readline -data UI = UI - { isAvailable :: IO Bool - , promptName :: Title -> Desc -> (Name -> Maybe Problem) -> IO (Maybe Name) - , promptPassword :: Title -> Desc -> (Password -> Maybe Problem) -> IO (Maybe Password) - , withProgress :: Title -> Desc -> ((Percent -> IO ()) -> IO ()) -> IO () - } - -type Title = String -type Desc = String -type Percent = Int -type Problem = String +availableUI :: IO [UI] +availableUI = filterM isAvailable [zenityUI, readlineUI] |