diff --git a/src/Text/XmlHtml/Common.hs b/src/Text/XmlHtml/Common.hs
--- a/src/Text/XmlHtml/Common.hs
+++ b/src/Text/XmlHtml/Common.hs
@@ -11,6 +11,7 @@
 import           Data.Char (isAscii, isLatin1)
 import qualified Data.HashMap.Strict as M
 import qualified Data.HashSet as S
+import qualified Data.Map.Strict as Map
 import           Data.Maybe
 
 import           Data.Text (Text)
@@ -272,7 +273,7 @@
     -- Otherwise its unicode index is printed to decimal and "&#" is appended
     toAsciiChar c = maybe
         (uniEscape c) (\esc -> T.concat ["&", esc, ";"])
-        (M.lookup (T.singleton c) reversePredefinedRefs)
+        (Map.lookup (T.singleton c) reversePredefinedRefs)
 
     uniEscape = T.append "&#" . flip T.snoc ';' . T.pack .
                 (show :: Int -> String) . fromEnum
diff --git a/src/Text/XmlHtml/HTML/Meta.hs b/src/Text/XmlHtml/HTML/Meta.hs
--- a/src/Text/XmlHtml/HTML/Meta.hs
+++ b/src/Text/XmlHtml/HTML/Meta.hs
@@ -20,6 +20,8 @@
 import qualified Data.HashMap.Strict as M
 import           Data.HashSet (HashSet)
 import qualified Data.HashSet as S
+import           Data.Map.Strict (Map)
+import qualified Data.Map.Strict as Map
 import           Data.Text (Text)
 
 ------------------------------------------------------------------------------
@@ -127,8 +129,8 @@
 ------------------------------------------------------------------------------
 -- | Predefined character entity references as defined by the HTML5 spec.
 {-# NOINLINE predefinedRefs #-}
-predefinedRefs :: HashMap Text Text
-predefinedRefs = mconcat $ map M.fromList [
+predefinedRefs :: Map Text Text
+predefinedRefs = mconcat $ map Map.fromList [
       reftab1
     , reftab2
     , reftab3
@@ -2549,7 +2551,7 @@
 
 ------------------------------------------------------------------------------
 -- Reverse lookup of Html entities
-reversePredefinedRefs :: HashMap Text Text
-reversePredefinedRefs = M.fromList . map (\(x,y) -> (y,x)) $
-                        M.toList predefinedRefs
+reversePredefinedRefs :: Map Text Text
+reversePredefinedRefs = Map.fromList . map (\(x,y) -> (y,x)) $
+                        Map.toList predefinedRefs
 
diff --git a/src/Text/XmlHtml/HTML/Parse.hs b/src/Text/XmlHtml/HTML/Parse.hs
--- a/src/Text/XmlHtml/HTML/Parse.hs
+++ b/src/Text/XmlHtml/HTML/Parse.hs
@@ -17,6 +17,7 @@
 
 import qualified Data.HashSet as S
 import qualified Data.HashMap.Strict as M
+import qualified Data.Map.Strict as Map
 
 import           Data.Text (Text)
 import qualified Data.Text as T
@@ -331,7 +332,7 @@
             when (not (isValidChar c)) $ fail $
                 "Reference is not a valid character"
             return (T.singleton c)
-        Right nm -> case M.lookup nm predefinedRefs of
+        Right nm -> case Map.lookup nm predefinedRefs of
             Nothing -> fail $ "Unknown entity reference: " ++ T.unpack nm
             Just t  -> return t
 
diff --git a/test/src/Text/XmlHtml/TestCommon.hs b/test/src/Text/XmlHtml/TestCommon.hs
--- a/test/src/Text/XmlHtml/TestCommon.hs
+++ b/test/src/Text/XmlHtml/TestCommon.hs
@@ -13,6 +13,12 @@
 testIt name b = it name $ assertBool name b
 
 ------------------------------------------------------------------------------
+-- | Tests with assertEqual which gives more useful information to the user on
+-- failure.  We should probably stop using testIt.  :/
+testEqual :: (Eq a, Show a) => String -> a -> a -> Spec
+testEqual name expected actual = it name $ assertEqual name expected actual
+
+------------------------------------------------------------------------------
 -- Code adapted from ChasingBottoms.
 --
 -- Adding an actual dependency isn't possible because Cabal refuses to build
diff --git a/test/src/Text/XmlHtml/Tests.hs b/test/src/Text/XmlHtml/Tests.hs
--- a/test/src/Text/XmlHtml/Tests.hs
+++ b/test/src/Text/XmlHtml/Tests.hs
@@ -539,7 +539,7 @@
     testIt "bothQuotesInAttr       " bothQuotesInAttr
     testIt "ndashEscapesInLatin    " ndashEscapesInLatin
     testIt "smileyEscapesInLatin   " smileyEscapesInLatin
-    testIt "numericalEscapes       " numericalEscapes
+    numericalEscapes
 
 renderByteOrderMark :: Bool
 renderByteOrderMark =
@@ -635,11 +635,11 @@
         ]))
     == "Hello &#9786;"
 
-numericalEscapes :: Bool
-numericalEscapes =
-    fmap (toByteString . renderXmlFragment ISO_8859_1 . docContent)
-    (parseXML "test" "Hello &#174;")
-    == Right "Hello &REG;"
+numericalEscapes :: Spec
+numericalEscapes = testEqual "numericalEscapes" (Right "Hello &reg;") actual
+  where
+    actual = toByteString . renderXmlFragment ISO_8859_1 . docContent
+               <$> parseXML "test" "Hello &#174;"
 
 
 ------------------------------------------------------------------------------
diff --git a/xmlhtml.cabal b/xmlhtml.cabal
--- a/xmlhtml.cabal
+++ b/xmlhtml.cabal
@@ -1,5 +1,5 @@
 Name:                xmlhtml
-Version:             0.2.5
+Version:             0.2.5.1
 Synopsis:            XML parser and renderer with HTML 5 quirks mode
 Description:         Contains renderers and parsers for both XML and HTML 5
                      document fragments, which share data structures so that
@@ -28,7 +28,8 @@
 Category:            Text, XML
 Build-type:          Simple
 Cabal-version:       >=1.8.0.4
-Tested-With:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+Tested-With:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3,
+                     GHC == 8.0.1, GHC == 8.2.1
 
 Extra-source-files:
              .ghci,
@@ -855,6 +856,7 @@
     blaze-markup,
     bytestring,
     bytestring-builder,
+    containers,
     directory                  >= 1.0      && <1.4,
     hspec                      >= 2.4      && <2.5,
     text,
