From 61d8214d9d8cea6ba047d1a26f9edc1ea180234b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 19:10:32 -0400 Subject: propellor spin --- Property.hs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'Property.hs') diff --git a/Property.hs b/Property.hs index 95a225c9..e83c75de 100644 --- a/Property.hs +++ b/Property.hs @@ -6,27 +6,10 @@ import System.Console.ANSI import System.Exit import System.IO +import Types import Utility.Monad import Utility.Exception -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 - makeChange :: IO () -> IO Result makeChange a = a >> return MadeChange -- cgit v1.2.3