diff options
Diffstat (limited to 'UI.hs')
-rw-r--r-- | UI.hs | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +{- Copyright 2016 Joey Hess <id@joeyh.name> + - + - Licensed under the GNU AGPL version 3 or higher. + -} + +module UI where + +import Types + +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 |