summaryrefslogtreecommitdiffhomepage
path: root/UI.hs
diff options
context:
space:
mode:
Diffstat (limited to 'UI.hs')
-rw-r--r--UI.hs18
1 files changed, 6 insertions, 12 deletions
diff --git a/UI.hs b/UI.hs
index 7e583cf..0ce87db 100644
--- a/UI.hs
+++ b/UI.hs
@@ -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]