diff --git a/Data/Map/Base.hs b/Data/Map/Base.hs
--- a/Data/Map/Base.hs
+++ b/Data/Map/Base.hs
@@ -327,6 +327,10 @@
 
 type Size     = Int
 
+#if __GLASGOW_HASKELL__ >= 708
+type role Map nominal representational
+#endif
+
 instance (Ord k) => Monoid (Map k v) where
     mempty  = empty
     mappend = union
diff --git a/Data/Set/Base.hs b/Data/Set/Base.hs
--- a/Data/Set/Base.hs
+++ b/Data/Set/Base.hs
@@ -229,6 +229,10 @@
 
 type Size     = Int
 
+#if __GLASGOW_HASKELL >= 708
+type role Set nominal
+#endif
+
 instance Ord a => Monoid (Set a) where
     mempty  = empty
     mappend = union
diff --git a/containers.cabal b/containers.cabal
--- a/containers.cabal
+++ b/containers.cabal
@@ -1,5 +1,5 @@
 name: containers
-version: 0.5.4.0
+version: 0.5.5.0
 license: BSD3
 license-file: LICENSE
 maintainer: fox@ucw.cz
@@ -63,6 +63,8 @@
 
     if impl(ghc<7.0)
         extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
+    if impl(ghc >= 7.8)
+        extensions: RoleAnnotations
 
 -------------------
 -- T E S T I N G --
