propellor/Propellor/Types.hs

23 lines
555 B
Haskell
Raw Normal View History

2014-03-31 03:37:54 +00:00
module Propellor.Types where
2014-03-30 23:10:32 +00:00
type HostName = String
type UserName = String
data Property = Property
{ propertyDesc :: Desc
2014-03-31 03:37:54 +00:00
-- | must be idempotent; may run repeatedly
2014-03-30 23:10:32 +00:00
, propertySatisfy :: IO Result
}
type Desc = String
data Result = NoChange | MadeChange | FailedChange
deriving (Show, Eq)
combineResult :: Result -> Result -> Result
combineResult FailedChange _ = FailedChange
combineResult _ FailedChange = FailedChange
combineResult MadeChange _ = MadeChange
combineResult _ MadeChange = MadeChange
combineResult NoChange NoChange = NoChange