summaryrefslogtreecommitdiff
path: root/Property.hs
diff options
context:
space:
mode:
authorJoey Hess2014-03-30 19:10:32 -0400
committerJoey Hess2014-03-30 19:10:32 -0400
commit61d8214d9d8cea6ba047d1a26f9edc1ea180234b (patch)
tree1e9f0184af88eed1dd5974bf2f47b0765c23b321 /Property.hs
parent4e442f4bcf04a68f638393d180ac7664ddd0fe4b (diff)
propellor spin
Diffstat (limited to 'Property.hs')
-rw-r--r--Property.hs19
1 files changed, 1 insertions, 18 deletions
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