diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## [0.2.0.2] - 2023-01-19
+
+### Changed
+
+* Compatibility with `mtl-2.3.1`
+
 ## [0.2.0.1] - 2022-10-06
 
 ### Added
diff --git a/autodocodec.cabal b/autodocodec.cabal
--- a/autodocodec.cabal
+++ b/autodocodec.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           autodocodec
-version:        0.2.0.1
+version:        0.2.0.2
 synopsis:       Self-documenting encoder and decoder
 homepage:       https://github.com/NorfairKing/autodocodec#readme
 bug-reports:    https://github.com/NorfairKing/autodocodec/issues
diff --git a/src/Autodocodec/Aeson/Decode.hs b/src/Autodocodec/Aeson/Decode.hs
--- a/src/Autodocodec/Aeson/Decode.hs
+++ b/src/Autodocodec/Aeson/Decode.hs
@@ -90,8 +90,8 @@
           Left err -> fail err
           Right new -> pure new
       EitherCodec u c1 c2 ->
-        let leftParser = (\v -> Left <$> go v c1)
-            rightParser = (\v -> Right <$> go v c2)
+        let leftParser v = Left <$> go v c1
+            rightParser v = Right <$> go v c2
          in case u of
               PossiblyJointUnion ->
                 case parseEither leftParser value of
diff --git a/src/Autodocodec/Codec.hs b/src/Autodocodec/Codec.hs
--- a/src/Autodocodec/Codec.hs
+++ b/src/Autodocodec/Codec.hs
@@ -13,6 +13,7 @@
 
 module Autodocodec.Codec where
 
+import Control.Monad
 import Control.Monad.State
 import Data.Aeson (FromJSON, FromJSONKey, ToJSON, ToJSONKey)
 import qualified Data.Aeson as JSON
