Commit 388a5a44 authored by Klaus Aehlig's avatar Klaus Aehlig

Add a value for the empty Container

...so that we can use it as a default for Container
parameters.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 7731134b
......@@ -70,6 +70,7 @@ module Ganeti.JSON
, ArrayObject(..)
, HasStringRepr(..)
, GenericContainer(..)
, emptyContainer
, Container
, MaybeForJSON(..)
, TimeAsDoubleJSON(..)
......@@ -331,6 +332,10 @@ newtype GenericContainer a b =
instance (NFData a, NFData b) => NFData (GenericContainer a b) where
rnf = rnf . Map.toList . fromContainer
-- | The empty container.
emptyContainer :: GenericContainer a b
emptyContainer = GenericContainer Map.empty
-- | Type alias for string keys.
type Container = GenericContainer String
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment