...so that we can use it as a default for Container parameters. Signed-off-by: Klaus Aehlig <[email protected]> Reviewed-by: Petr Pudlak <[email protected]>
Cherry-picked-from: 388a5a44 Signed-off-by: Klaus Aehlig <[email protected]> --- src/Ganeti/JSON.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ganeti/JSON.hs b/src/Ganeti/JSON.hs index f12ef42..b12dfc9 100644 --- a/src/Ganeti/JSON.hs +++ b/src/Ganeti/JSON.hs @@ -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 -- 2.2.0.rc0.207.ga3a616c
