Commit d1c125e4 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>

Cherry-picked-from: 388a5a44Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 635e04aa
......@@ -68,6 +68,7 @@ module Ganeti.JSON
, ArrayObject(..)
, HasStringRepr(..)
, GenericContainer(..)
, emptyContainer
, Container
, MaybeForJSON(..)
, TimeAsDoubleJSON(..)
......@@ -327,6 +328,10 @@ instance F.Foldable (GenericContainer a) where
instance F.Traversable (GenericContainer a) where
traverse f = fmap GenericContainer . F.traverse f . 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