blob: 561aa65f89d8307a84f449450741961b7f3b577b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{- Copyright 2016 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
module Types.UI where
import Types
data UI = UI
{ isAvailable :: IO Bool
, showError :: Desc -> IO ()
, promptName :: Title -> Desc -> Name -> (Name -> Maybe Problem) -> IO (Maybe Name)
, promptPassword :: Title -> Desc -> (Password -> Maybe Problem) -> IO (Maybe Password)
, promptKeyId :: Title -> Desc -> [(Name, KeyId)] -> IO (Maybe KeyId)
, withProgress :: Title -> Desc -> ((Percent -> IO ()) -> IO ()) -> IO ()
}
type Title = String
type Desc = String
type Percent = Int
type Problem = String
|