From bfcc5a7666f817fbfe9c149480ca0359e3e744ec Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Oct 2015 12:57:08 -0400 Subject: simplify using type safe cast --- src/Propellor/Types/Info.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Types') 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. -- -- cgit v1.2.3