diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+0.3.1.1: [2019.01.12]
+---------------------
+* Fix build error caused by disabling building with containers.
+
 0.3.1.0: [2019.01.12]
 ---------------------
 * Add Data.Semiring.Tropical
diff --git a/Data/Semiring.hs b/Data/Semiring.hs
--- a/Data/Semiring.hs
+++ b/Data/Semiring.hs
@@ -38,7 +38,7 @@
   , Add(..)
   , Mul(..)
   , WrappedNum(..)
-#if MIN_VERSION_base(4,7,0) 
+#if defined(VERSION_containers) && MIN_VERSION_base(4,7,0) 
   , IntSetOf(..)
   , IntMapOf(..)
 #endif
diff --git a/semirings.cabal b/semirings.cabal
--- a/semirings.cabal
+++ b/semirings.cabal
@@ -1,6 +1,6 @@
 name:          semirings
 category:      Algebra, Data, Data Structures, Math, Maths, Mathematics
-version:       0.3.1.0
+version:       0.3.1.1
 license:       BSD3
 cabal-version: >= 1.10
 license-file:  LICENSE
