summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Info.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-19 12:57:08 -0400
committerJoey Hess2015-10-19 12:57:08 -0400
commitbfcc5a7666f817fbfe9c149480ca0359e3e744ec (patch)
tree4cd346978dce141ae7365278346a1334d87d0d60 /src/Propellor/Types/Info.hs
parentace352cc0aa732d00900122e0ab8552c870f3901 (diff)
simplify using type safe cast
Diffstat (limited to 'src/Propellor/Types/Info.hs')
-rw-r--r--src/Propellor/Types/Info.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs
index 59cc13e0..2c95b6fc 100644
--- a/src/Propellor/Types/Info.hs
+++ b/src/Propellor/Types/Info.hs
@@ -29,7 +29,7 @@ instance Show InfoEntry where
-- Extracts the value from an InfoEntry but only when
-- it's of the requested type.
extractInfoEntry :: Typeable v => InfoEntry -> Maybe v
-extractInfoEntry (InfoEntry v) = fromDynamic (toDyn v)
+extractInfoEntry (InfoEntry v) = cast v
-- | Values stored in Info must be members of this class.
--