diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-19 12:57:08 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-19 12:57:08 -0400 |
| commit | bfcc5a7666f817fbfe9c149480ca0359e3e744ec (patch) | |
| tree | 4cd346978dce141ae7365278346a1334d87d0d60 /src/Propellor | |
| parent | ace352cc0aa732d00900122e0ab8552c870f3901 (diff) | |
simplify using type safe cast
Diffstat (limited to 'src/Propellor')
| -rw-r--r-- | src/Propellor/Types/Info.hs | 2 |
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. -- |
