diff options
| author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-07-27 09:47:06 +0100 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-27 08:39:09 -0400 |
| commit | 09511ad244b3afc456453d297a0b50119dd5b845 (patch) | |
| tree | 4c72f3b7ec8f121cc99955434b41a98e894a4a95 /src | |
| parent | f88a1a8e6c25dd8029ada0400cfe6f05ca3343d7 (diff) | |
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 <slyfox@gentoo.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Types/Info.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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. -- |
