summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Installer/Types.hs
blob: 648cf3b381ba7d833391e5e79142f6c26843d211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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