From 380c1b0fd6c25dec3c924b82f1d721aa91a001da Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 23:37:54 -0400 Subject: prepare for hackage --- Propellor/Types.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Propellor/Types.hs (limited to 'Propellor/Types.hs') diff --git a/Propellor/Types.hs b/Propellor/Types.hs new file mode 100644 index 00000000..70ad8f9b --- /dev/null +++ b/Propellor/Types.hs @@ -0,0 +1,22 @@ +module Propellor.Types where + +type HostName = String +type UserName = String + +data Property = Property + { propertyDesc :: Desc + -- | must be idempotent; may run repeatedly + , 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 -- cgit v1.2.3