@@ -423,7 +423,7 @@ instance FromJSON NetworkOptions where
423423data Network = Network NetworkMode NetworkOptions
424424 deriving (Eq, Show)
425425
426−instance FromJSON [Network] where
426+instance {-# OVERLAPPING #-} FromJSON [Network] where
427427 parseJSON (JSON.Object o) = HM.foldlWithKey' f (return []) o
428428 where
429429 f accM k' v' = do
@@ -537,13 +537,13 @@ data Label = Label Name Value deriving (Eq, Show)
537537
538538-- If there are multiple lables with the same Name in the list
539539-- then the last one wins.
540−instance ToJSON [Label] where
540+instance {-# OVERLAPPING #-} ToJSON [Label] where
541541 toJSON [] = emptyJsonObject
542542 toJSON (l:ls) = toJsonKeyVal (l:ls) key val
543543 where key (Label k _) = T.unpack k
544544 val (Label _ v) = v
545545
546−instance FromJSON [Label] where
546+instance {-# OVERLAPPING #-} FromJSON [Label] where
547547 parseJSON (JSON.Object o) = HM.foldlWithKey' f (return []) o
548548 where f accM k v = do
549549 acc <- accM
@@ -758,12 +758,12 @@ instance FromJSON VolumePermission where
758758-- @
759759newtype Volume = Volume FilePath deriving (Eq, Show)
760760
761−instance ToJSON [Volume] where
761+instance {-# OVERLAPPING #-} ToJSON [Volume] where
762762 toJSON [] = emptyJsonObject
763763 toJSON (v:vs) = toJsonKey (v:vs) getKey
764764 where getKey (Volume v) = v
765765
766−instance FromJSON [Volume] where
766+instance {-# OVERLAPPING #-} FromJSON [Volume] where
767767 parseJSON (JSON.Object o) = return $ map (Volume . T.unpack) $ HM.keys o
768768 parseJSON (JSON.Null) = return []
769769 parseJSON _ = fail "Volume is not an object"
@@ -860,13 +860,13 @@ instance ToJSON LogDriverType where
860860
861861data LogDriverOption = LogDriverOption Name Value deriving (Eq, Show)
862862
863−instance ToJSON [LogDriverOption] where
863+instance {-# OVERLAPPING #-} ToJSON [LogDriverOption] where
864864 toJSON [] = emptyJsonObject
865865 toJSON (o:os) = toJsonKeyVal (o:os) key val
866866 where key (LogDriverOption n _) = T.unpack n
867867 val (LogDriverOption _ v) = v
868868
869−instance FromJSON [LogDriverOption] where
869+instance {-# OVERLAPPING #-} FromJSON [LogDriverOption] where
870870 parseJSON (JSON.Object o) = HM.foldlWithKey' f (return []) o
871871 where f accM k v = do
872872 acc <- accM
@@ -998,7 +998,7 @@ addExposedPort ep c = c{containerConfig=cc{exposedPorts=oldeps <> [ep]}}
998998 oldeps = exposedPorts cc
999999
10001000
1001−instance FromJSON [PortBinding] where
1001+instance {-# OVERLAPPING #-} FromJSON [PortBinding] where
10021002 parseJSON (JSON.Object o) = HM.foldlWithKey' f (return []) o
10031003 where
10041004 f accM k v = case T.split (== '/') k of
@@ -1012,7 +1012,7 @@ instance FromJSON [PortBinding] where
10121012 parseJSON (JSON.Null) = return []
10131013 parseJSON _ = fail "PortBindings is not an object"
10141014
1015−instance ToJSON [PortBinding] where
1015+instance {-# OVERLAPPING #-} ToJSON [PortBinding] where
10161016 toJSON [] = emptyJsonObject
10171017 toJSON (p:ps) = toJsonKeyVal (p:ps) key val
10181018 where key p = T.unpack $ portAndType2Text (containerPort p) (portType p)
@@ -1323,7 +1323,7 @@ instance ToJSON EnvVar where
13231323-- @
13241324data ExposedPort = ExposedPort Port PortType deriving (Eq, Show)
13251325
1326−instance FromJSON [ExposedPort] where
1326+instance {-# OVERLAPPING #-} FromJSON [ExposedPort] where
13271327 parseJSON (JSON.Object o) = HM.foldlWithKey' f (return []) o
13281328 where
13291329 f accM k _ = case T.split (== '/') k of
@@ -1336,7 +1336,7 @@ instance FromJSON [ExposedPort] where
13361336 parseJSON (JSON.Null) = return []
13371337 parseJSON _ = fail "ExposedPorts is not an object"
13381338
1339−instance ToJSON [ExposedPort] where
1339+instance {-# OVERLAPPING #-} ToJSON [ExposedPort] where
13401340 toJSON [] = emptyJsonObject
13411341 toJSON (p:ps) = toJsonKey (p:ps) key
13421342 where key (ExposedPort p t) = show p <> slash <> show t