From 09511ad244b3afc456453d297a0b50119dd5b845 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 27 Jul 2017 09:47:06 +0100 Subject: Propellor.Types.Info: add missing import for 'cast' The change fixes the following build failure on ghc-8.2.1: [ 6 of 160] Compiling Propellor.Types.Info ( src/Propellor/Types/Info.hs, dist/dist-sandbox-2ceaa3c0/build/Propellor/Types/Info.o ) src/Propellor/Types/Info.hs:38:34: error: • Variable not in scope: cast :: v1 -> Maybe v • Perhaps you meant one of these: data constructor ‘Last’ (imported from Data.Monoid), ‘last’ (imported from Prelude) | 38 | extractInfoEntry (InfoEntry v) = cast v | ^^^^ Signed-off-by: Sergei Trofimovich --- src/Propellor/Types/Info.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs index 06212780..6716c403 100644 --- a/src/Propellor/Types/Info.hs +++ b/src/Propellor/Types/Info.hs @@ -17,6 +17,7 @@ module Propellor.Types.Info ( import Data.Dynamic import Data.Maybe import Data.Monoid +import qualified Data.Typeable as T import Prelude -- | Information about a Host, which can be provided by its properties. @@ -35,7 +36,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) = cast v +extractInfoEntry (InfoEntry v) = T.cast v -- | Values stored in Info must be members of this class. -- -- cgit v1.2.3