diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,6 @@
+# 0.3.0.1
+- Fix compiling with GHC 8.6.1
+
 # 0.3.0.0
 - Include timezone and accuracy in location results
 
diff --git a/Data/GeoIP2.hs b/Data/GeoIP2.hs
--- a/Data/GeoIP2.hs
+++ b/Data/GeoIP2.hs
@@ -134,7 +134,7 @@
   -> IP      -- ^ IP address to search
   -> Either String GeoResult -- ^ Result, if something is found
 findGeoData geodb lang ip = do
-  (DataMap res) <- rawGeoData geodb ip
+  res <- rawGeoData geodb ip >>= asMap
   let subdivmap = res .:? "subdivisions" :: Maybe [Map.Map GeoField GeoField]
       subdivs = mapMaybe (\s -> (,) <$> s .:? "iso_code" <*> s .:? "names" ..? lang) <$> subdivmap
 
@@ -149,3 +149,6 @@
                      (res .:? "city" ..? "names" ..? lang)
                      (res .:? "postal" ..? "code")
                      (fromMaybe [] subdivs)
+  where
+    asMap (DataMap res) = return res
+    asMap _             = Left "rawGeoData returned something else than DataMap"
diff --git a/Data/GeoIP2/Fields.hs b/Data/GeoIP2/Fields.hs
--- a/Data/GeoIP2/Fields.hs
+++ b/Data/GeoIP2/Fields.hs
@@ -84,7 +84,7 @@
   return $ BS.foldl' (\acc new -> fromIntegral new + 256 * acc) 0 bytes
 
 instance Serialize GeoField where
-  put = undefined
+  put = error "Serialization not implemented"
   get = do
     control <- getWord8
     ftype <-  if | control .&. 0xe0 == 0 -> (+7) <$> getWord8
@@ -104,6 +104,7 @@
             | _fsize == 29 -> (29+) <$> parseNumber 1
             | _fsize == 30 -> (285+) <$> parseNumber 2
             | _fsize == 31 ->  (65821+) <$> parseNumber 3
+            | otherwise -> error "Shouldn't happen, limited to 5 bits"
 
     case ftype of
         1 -> return $ DataPointer fsize
diff --git a/geoip2.cabal b/geoip2.cabal
--- a/geoip2.cabal
+++ b/geoip2.cabal
@@ -1,5 +1,5 @@
 name:                geoip2
-version:             0.3.1.0
+version:             0.3.1.1
 synopsis:            Pure haskell interface to MaxMind GeoIP database
 description:
   GeoIP2 is a haskell binding to the MaxMind GeoIP2 database.
