Revision 9faf1c01

b/src/Ganeti/JSON.hs
62 62
import Control.DeepSeq
63 63
import Control.Monad (liftM)
64 64
import Control.Monad.Error.Class
65
import qualified Data.Foldable as F
66
import qualified Data.Traversable as F
65 67
import Data.Maybe (fromMaybe, catMaybes)
66 68
import qualified Data.Map as Map
67 69
import System.Time (ClockTime(..))
......
299 301
instance (NFData a, NFData b) => NFData (GenericContainer a b) where
300 302
  rnf = rnf . Map.toList . fromContainer
301 303

  
304
instance Functor (GenericContainer a) where
305
  fmap f = GenericContainer . fmap f . fromContainer
306

  
307
instance F.Foldable (GenericContainer a) where
308
  foldMap f = F.foldMap f . fromContainer
309

  
310
instance F.Traversable (GenericContainer a) where
311
  traverse f = fmap GenericContainer . F.traverse f . fromContainer
312

  
302 313
-- | Type alias for string keys.
303 314
type Container = GenericContainer String
304 315

  
b/src/Ganeti/Query/Query.hs
209 209
      live' = live && needsLiveData fgetters
210 210
  objects <- toError $ case wanted of
211 211
             [] -> Ok . niceSortKey nameFn .
212
                   Map.elems . fromContainer $ configFn cfg
212
                   Foldable.toList $ configFn cfg
213 213
             _  -> mapM (getFn cfg) wanted
214 214
  -- Run the first pass of the filter, without a runtime context; this will
215 215
  -- limit the objects that we'll contact for exports

Also available in: Unified diff