diff --git a/CHANGES.markdown b/CHANGES.markdown
--- a/CHANGES.markdown
+++ b/CHANGES.markdown
@@ -1,3 +1,9 @@
+0.5.1.2 (18 Jan 2020)
+---------------------
+
+- Better error message when total probability sum is negative in
+  fromListMay, weightedMay, weighted
+
 0.5.1.1 (21 May 2018)
 ---------------------
 
diff --git a/Control/Monad/Random/Class.hs b/Control/Monad/Random/Class.hs
--- a/Control/Monad/Random/Class.hs
+++ b/Control/Monad/Random/Class.hs
@@ -365,7 +365,7 @@
 weighted t = do
   ma <- weightedMay t
   case ma of
-    Nothing -> error "Control.Monad.Random.Class.weighted: empty collection, or total weight = 0"
+    Nothing -> error "Control.Monad.Random.Class.weighted: empty collection, or total weight <= 0"
     Just a  -> return a
 
 -- | Sample a random value from a weighted collection of elements.
@@ -384,14 +384,14 @@
     Just a  -> return a
 
 -- | Sample a random value from a weighted list.  Return @Nothing@ if
---   the list is empty or the total weight is zero.
+--   the list is empty or the total weight is nonpositive.
 fromListMay :: (MonadRandom m) => [(a, Rational)] -> m (Maybe a)
 fromListMay xs = do
   let s    = fromRational (sum (map snd xs)) :: Double
       cums = scanl1 (\ ~(_,q) ~(y,s') -> (y, s'+q)) xs
-  case s of
-    0 -> return Nothing
-    _ -> do
+  case s <= 0 of
+    True -> return Nothing
+    _    -> do
       p <- liftM toRational $ getRandomR (0, s)
       return . Just . fst . head . dropWhile ((< p) . snd) $ cums
 
diff --git a/MonadRandom.cabal b/MonadRandom.cabal
--- a/MonadRandom.cabal
+++ b/MonadRandom.cabal
@@ -1,5 +1,5 @@
 name:                MonadRandom
-version:             0.5.1.1
+version:             0.5.1.2
 synopsis:            Random-number generation monad.
 description:         Support for computations which consume random values.
 license:             BSD3
@@ -11,14 +11,7 @@
 build-type:          Simple
 cabal-version:       >=1.10
 extra-source-files:  CHANGES.markdown
-tested-with:
-  GHC==7.4.2,
-  GHC==7.6.3,
-  GHC==7.8.4,
-  GHC==7.10.3,
-  GHC==8.0.2,
-  GHC==8.2.2,
-  GHC==8.4.1
+tested-with:         GHC ==7.4.2 || ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1
 
 source-repository head
   type:     git
@@ -38,8 +31,8 @@
     transformers        >=0.3 && <0.6,
     transformers-compat >=0.4 && <0.7,
     mtl                 >=2.1 && <2.3,
-    primitive           >=0.6 && <0.7,
-    random
+    primitive           >=0.6 && <0.8,
+    random              >=1.0 && <1.2
   ghc-options:         -Wall
   default-language:    Haskell2010
 
