diff --git a/hw-ip.cabal b/hw-ip.cabal
--- a/hw-ip.cabal
+++ b/hw-ip.cabal
@@ -1,7 +1,7 @@
-cabal-version: 1.12
+cabal-version: 2.2
 name: hw-ip
-version: 2.3.0.0
-license: BSD3
+version: 2.3.1.0
+license: BSD-3-Clause
 license-file: LICENSE
 copyright: 2018 John Ky, David Turnbull, Jian Wan
 maintainer: newhoggy@gmail.com
@@ -34,7 +34,6 @@
       HaskellWorks.Data.Network.Ip.Word128
     hs-source-dirs: src
     other-modules:
-        Paths_hw_ip
     default-language: Haskell2010
     ghc-options:
       -Wall
@@ -64,7 +63,6 @@
         HaskellWorks.Data.Network.Ipv6Spec
         HaskellWorks.Data.Network.RangeSpec
         HaskellWorks.Data.Network.Word128Spec
-        Paths_hw_ip
     default-language: Haskell2010
     ghc-options:
       -Wall
diff --git a/src/HaskellWorks/Data/Network/Ip/Ipv4.hs b/src/HaskellWorks/Data/Network/Ip/Ipv4.hs
--- a/src/HaskellWorks/Data/Network/Ip/Ipv4.hs
+++ b/src/HaskellWorks/Data/Network/Ip/Ipv4.hs
@@ -59,14 +59,18 @@
 
 newtype IpNetMask = IpNetMask
   { word8 :: Word8
-  } deriving (Enum, Bounded, Eq, Ord, Show, Generic)
+  } deriving (Enum, Eq, Ord, Show, Generic)
 
+instance Bounded IpNetMask where
+  minBound = IpNetMask 0
+  maxBound = IpNetMask 32
+
 -- | An IP block.  The type parameter determines whether or not the value of the type is
 -- canonical.
 data IpBlock v = IpBlock
   { base :: !IpAddress
   , mask :: !IpNetMask
-  } deriving (Eq, Ord, Generic)
+  } deriving (Eq, Ord, Generic, Bounded)
 
 instance Show (IpBlock v) where
   showsPrec _ = showsIpBlock
diff --git a/src/HaskellWorks/Data/Network/Ip/Ipv6.hs b/src/HaskellWorks/Data/Network/Ip/Ipv6.hs
--- a/src/HaskellWorks/Data/Network/Ip/Ipv6.hs
+++ b/src/HaskellWorks/Data/Network/Ip/Ipv6.hs
@@ -48,7 +48,7 @@
 import qualified HaskellWorks.Data.Network.Ip.Ipv4     as V4
 import qualified HaskellWorks.Data.Network.Ip.Word128  as W
 
-newtype IpAddress = IpAddress W.Word128 deriving (Enum, Eq, Ord, Generic, SafeEnum)
+newtype IpAddress = IpAddress W.Word128 deriving (Enum, Eq, Ord, Bounded, Generic, SafeEnum)
 
 instance Show IpAddress where
   showsPrec _ (IpAddress w) = shows (D.fromHostAddress6 w)
@@ -64,6 +64,10 @@
   { word :: Word8
   } deriving (Enum, Eq, Ord, Show, Generic)
 
+instance Bounded IpNetMask where
+  minBound = IpNetMask 0
+  maxBound = IpNetMask 128
+
 instance Read IpNetMask where
   readsPrec _ s =
     case IpNetMask <$> m of
@@ -75,7 +79,7 @@
 data IpBlock v = IpBlock
   { base :: !IpAddress
   , mask :: !IpNetMask
-  } deriving (Eq, Ord, Generic)
+  } deriving (Eq, Ord, Bounded, Generic)
 
 instance Read (IpBlock Unaligned) where
   readsPrec _ s =
