summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Result.hs
diff options
context:
space:
mode:
authorJoey Hess2017-07-29 15:43:57 -0400
committerJoey Hess2017-07-29 15:43:57 -0400
commitef7f2bb7fd6a79ee3e9d0abbaf6f002c146f3fbc (patch)
tree8f3c9310e2a7d6af206704b77b0e4c40cec31d6e /src/Propellor/Types/Result.hs
parent0946286c8afa9ed140b5636f87fdf5d9530fb954 (diff)
Added PROPELLOR_TRACE environment variable
which can be set to 1 to make propellor output serialized Propellor.Message.Trace values, for consumption by another program. This commit was sponsored by Ewen McNeill.
Diffstat (limited to 'src/Propellor/Types/Result.hs')
-rw-r--r--src/Propellor/Types/Result.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Propellor/Types/Result.hs b/src/Propellor/Types/Result.hs
index e8510abf..5209094b 100644
--- a/src/Propellor/Types/Result.hs
+++ b/src/Propellor/Types/Result.hs
@@ -24,6 +24,9 @@ instance ToResult Bool where
toResult False = FailedChange
toResult True = MadeChange
+instance ToResult Result where
+ toResult = id
+
-- | Results of actions, with color.
class ActionResult a where
getActionResult :: a -> (String, ColorIntensity, Color)