diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-15 15:19:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-15 15:19:14 -0400 |
commit | 6c4d1501b1067e47cbf8579eb206a30d9c3a7a1c (patch) | |
tree | ac1aba5aad46edfb8e0a51b58d3930bcbe0e5b91 /Types | |
parent | 2cea48cb7ccaeb4a4f8125f6d2c5e1fd195c0d8d (diff) | |
download | keysafe-6c4d1501b1067e47cbf8579eb206a30d9c3a7a1c.tar.gz |
forgot to add
Diffstat (limited to 'Types')
-rw-r--r-- | Types/UI.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Types/UI.hs b/Types/UI.hs new file mode 100644 index 0000000..bba3d38 --- /dev/null +++ b/Types/UI.hs @@ -0,0 +1,20 @@ +{- 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 + , promptName :: Title -> Desc -> Name -> (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 |