diff --git a/json-spec-elm-servant.cabal b/json-spec-elm-servant.cabal
--- a/json-spec-elm-servant.cabal
+++ b/json-spec-elm-servant.cabal
@@ -1,6 +1,6 @@
 cabal-version:       3.0
 name:                json-spec-elm-servant
-version:             0.4.4.1
+version:             0.4.4.3
 synopsis:            Generated elm code for servant APIs.
 description:         Generate Elm encoders, decoders, and API requests
                      for an Servant API, where the shape of the data
@@ -30,7 +30,7 @@
     , elm-syntax           >= 0.3.3.0   && < 0.4
     , filepath             >= 1.4.200.1 && < 1.6
     , http-types           >= 0.12.3    && < 0.13
-    , json-spec            >= 0.3.0.0   && < 1.2
+    , json-spec            >= 0.3.0.0   && < 1.3
     , json-spec-elm        >= 0.4.0.0   && < 0.5
     , mtl                  >= 2.3.1     && < 2.4
     , prettyprinter        >= 1.7.1     && < 1.8
diff --git a/src/Data/JsonSpec/Elm/Servant.hs b/src/Data/JsonSpec/Elm/Servant.hs
--- a/src/Data/JsonSpec/Elm/Servant.hs
+++ b/src/Data/JsonSpec/Elm/Servant.hs
@@ -40,7 +40,7 @@
 
 import Bound (Var(B, F), Scope, abstract1, closed, toScope)
 import Control.Monad.Writer (MonadTrans(lift), MonadWriter(tell), execWriter)
-import Data.Foldable (Foldable(fold), traverse_)
+import Data.Foldable (Foldable(fold), foldl', traverse_)
 import Data.HashMap.Strict (HashMap)
 import Data.JsonSpec
   ( HasJsonDecodingSpec(DecodingSpec), HasJsonEncodingSpec(EncodingSpec)
@@ -61,7 +61,7 @@
 import Network.HTTP.Types (Method)
 import Prelude
   ( Applicative(pure), Bool(False, True), Eq((==))
-  , Foldable(foldl', foldr, length), Functor(fmap), Maybe(Just, Nothing)
+  , Foldable(foldr, length), Functor(fmap), Maybe(Just, Nothing)
   , Monad((>>=)), Monoid(mconcat, mempty), Semigroup((<>)), Show(show)
   , Traversable(sequence, traverse), ($), (.), (<$>), IO, Int, String, drop
   , error, init, putStrLn, reverse, unlines
