diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,12 @@
 Changes
 =======
 
+0.3.2.1
+-------
+
+* Use strict left fold in decimal/hexadecimal
+* Include a missing test module in the sdist tarball
+
 0.3.2
 -----
 
diff --git a/Text/Regex/Applicative/Common.hs b/Text/Regex/Applicative/Common.hs
--- a/Text/Regex/Applicative/Common.hs
+++ b/Text/Regex/Applicative/Common.hs
@@ -11,6 +11,7 @@
   ) where
 
 import Data.Char
+import Data.List (foldl')
 import Text.Regex.Applicative
 
 
@@ -33,8 +34,8 @@
 
 -- | Parse decimal number without sign.
 decimal :: Num a => RE Char a
-decimal = foldl (\d i -> d*10 + i) 0 <$> some digit
+decimal = foldl' (\d i -> d*10 + i) 0 <$> some digit
 
 -- | Parse decimal number without sign.
 hexadecimal :: Num a => RE Char a
-hexadecimal = foldl (\d i -> d*16 + i) 0 <$> some hexDigit
+hexadecimal = foldl' (\d i -> d*16 + i) 0 <$> some hexDigit
diff --git a/regex-applicative.cabal b/regex-applicative.cabal
--- a/regex-applicative.cabal
+++ b/regex-applicative.cabal
@@ -1,5 +1,5 @@
 Name:                regex-applicative
-Version:             0.3.2
+Version:             0.3.2.1
 Synopsis:            Regex-based parsing with applicative interface
 Description:         
     regex-applicative is a Haskell library for parsing using regular expressions.
@@ -43,6 +43,8 @@
     tests
   main-is:
     test.hs
+  other-modules:
+    StateQueue
   GHC-Options: -threaded
   Default-language:    Haskell2010
   Build-depends:       base < 5,
diff --git a/tests/StateQueue.hs b/tests/StateQueue.hs
new file mode 100644
--- /dev/null
+++ b/tests/StateQueue.hs
@@ -0,0 +1,48 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, ScopedTypeVariables #-}
+module StateQueue where
+
+import Test.Tasty
+import Test.Tasty.SmallCheck
+import Test.SmallCheck.Series
+import Control.Applicative
+import Text.Regex.Applicative.StateQueue as SQ
+
+fromElems :: [(a, Maybe Int)] -> StateQueue a
+fromElems = foldl f SQ.empty
+  where
+    f sq (x, mbKey) = maybe insert insertUnique mbKey x sq
+
+size :: StateQueue a -> Int
+size = length . getElements
+
+instance (Monad m, Serial m a) => Serial m (StateQueue a) where
+  series = fromElems <$> series
+
+stateQueueTests = testGroup "StateQueue"
+  [ testProperty "Insertion increments the # of elements" $
+      \sq (i :: Int) -> size (insert i sq) == size sq + 1
+  , testProperty "insertUnique increments the # of elements by 0 or 1" $
+      \sq (i :: Int) ->
+        let d = size (insertUnique i i sq) - size sq
+        in d == 0 || d == 1
+  , testProperty "insertUnique is idempotent" $
+      \sq (i :: Int) ->
+        let f = insertUnique i i
+        in f sq == (f . f) sq
+  , testProperty "insert doesn't affect insertUnique" $
+      \(i :: Int) -> exists $ \sq ->
+        let sq' = insert i sq
+        in insertUnique i i sq' /= sq'
+  , testProperty "insertUnique only cares about keys, not values" $
+      \sq i j ->
+        let sq' = insertUnique i i sq
+        in insertUnique i j sq' == sq'
+  , testProperty "insert puts in the back" $
+      \sq (i :: Int) ->
+        let sq' = insert i sq
+        in last (getElements sq') == i
+  , testProperty "insertUnique puts in the back" $
+      \sq i ->
+        let sq' = insertUnique i i sq
+        in sq' /= sq ==> last (getElements sq') == i
+  ]
