summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Installer/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/Installer/Types.hs')
-rw-r--r--src/Propellor/Property/Installer/Types.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Propellor/Property/Installer/Types.hs b/src/Propellor/Property/Installer/Types.hs
new file mode 100644
index 00000000..648cf3b3
--- /dev/null
+++ b/src/Propellor/Property/Installer/Types.hs
@@ -0,0 +1,16 @@
+module Propellor.Property.Installer.Types where
+
+-- | The disk device to install to.
+newtype TargetDiskDevice = TargetDiskDevice FilePath
+ deriving (Read, Show)
+
+data DiskEraseConfirmed = DiskEraseConfirmed
+ deriving (Read, Show)
+
+-- | Class of user input that an installer might prompt for.
+class UserInput i where
+ -- | Get the disk device the user selected to install to.
+ targetDiskDevice :: i -> Maybe TargetDiskDevice
+ -- | Check if the user has confirmed they want to erase the target
+ -- disk device.
+ diskEraseConfirmed :: i -> Maybe DiskEraseConfirmed