diff --git a/Data/Conduit/Misc.hs b/Data/Conduit/Misc.hs
--- a/Data/Conduit/Misc.hs
+++ b/Data/Conduit/Misc.hs
@@ -30,9 +30,9 @@
 
 -- | A generalized version of 'simpleConcatFlush' where some value is
 -- summed and the 'Flush' is sent when it reaches a threshold.
-concatFlushSum :: Monad m
-               => (a -> Integer) -- ^ Convert your input value into an Integer, usually a size
-               -> Integer -- ^ The threshold value
+concatFlushSum :: (Num n, Ord n, Monad m)
+               => (a -> n) -- ^ Convert your input value into an Integer, usually a size
+               -> n -- ^ The threshold value
                -> Conduit [a] m (Flush a)
 concatFlushSum tolength maxlength = concatFlush 0 foldfunc
     where
diff --git a/hslogstash.cabal b/hslogstash.cabal
--- a/hslogstash.cabal
+++ b/hslogstash.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                hslogstash
-version:             0.3.0
+version:             0.3.1
 synopsis:            A library to work with, or as, a logstash server
 description:         This library contains a few modules that let you work with Logstash messages, read them from a Redis list, store them in or get them from Elasticsearch, and more.
 license:             BSD3
