diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -161,3 +161,8 @@
 * Added `INPUT` to 8.6+ backend for `Defunc`.
 * Added a `poke` method to `QueueLike`.
 * Added a `charPred` converter to `Defunc`.
+
+## 2.1.0.1 -- 2022-06-01
+
+* Added normalisation rule for lets in `Lam`.
+* Added GHC 9.2 support
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
diff --git a/benchmarks/BenchmarkUtils.hs b/benchmarks/BenchmarkUtils.hs
--- a/benchmarks/BenchmarkUtils.hs
+++ b/benchmarks/BenchmarkUtils.hs
diff --git a/benchmarks/RangeSetBench.hs b/benchmarks/RangeSetBench.hs
--- a/benchmarks/RangeSetBench.hs
+++ b/benchmarks/RangeSetBench.hs
diff --git a/parsley-core.cabal b/parsley-core.cabal
--- a/parsley-core.cabal
+++ b/parsley-core.cabal
@@ -5,7 +5,7 @@
 --                   | +------- breaking internal API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             2.1.0.0
+version:             2.1.0.1
 synopsis:            A fast parser combinator library backed by Typed Template Haskell
 description:         This package contains the internals of the @parsley@ package.
                      .
@@ -29,7 +29,8 @@
 tested-with:         GHC == 8.6.1,  GHC == 8.6.2,  GHC == 8.6.3,  GHC == 8.6.4,  GHC == 8.6.5,
                      GHC == 8.8.1,  GHC == 8.8.2,  GHC == 8.8.3,  GHC == 8.8.4,
                      GHC == 8.10.4, GHC == 8.10.5, GHC == 8.10.7,
-                     GHC == 9.0.1
+                     GHC == 9.0.1, GHC == 9.0.2,
+                     GHC == 9.2.3
 
 flag full-width-positions
   description: Make line and column numbers 64-bit (on 64-bit platforms): normally they are 32-bits each for line and column.
@@ -129,7 +130,7 @@
                        NoStarIsType
 
 --                     ghc                  >= 8.6     && < 9.2,
-  build-depends:       base                 >= 4.10    && < 4.16,
+  build-depends:       base                 >= 4.10    && < 4.17,
                        mtl                  >= 2.2.1   && < 2.3,
                        hashable             >= 1.2.7.0 && < 1.4,
                        unordered-containers >= 0.2.13  && < 0.3,
@@ -168,6 +169,9 @@
     ghc-options:       -Wno-missing-safe-haskell-mode
                        -Wno-prepositive-qualified-module
                        -Wno-unused-packages
+  if impl(ghc >= 9.2)
+    ghc-options:       -Wno-missing-kind-signatures
+                       -Wno-implicit-lift
   if flag(full-width-positions)
     cpp-options:       -DFULL_WIDTH_POSITIONS
 
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/BindingOps.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/BindingOps.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/BindingOps.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/BindingOps.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Defunc.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Defunc.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Defunc.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Defunc.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Eval.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Eval.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Eval.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Eval.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputOps.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputOps.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputOps.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputOps.hs
@@ -1,5 +1,6 @@
 {-# OPTIONS_HADDOCK show-extensions #-}
-{-# LANGUAGE ImplicitParams,
+{-# LANGUAGE CPP,
+             ImplicitParams,
              MagicHash,
              TypeApplications,
              UnboxedTuples #-}
@@ -18,6 +19,9 @@
 module Parsley.Internal.Backend.Machine.InputOps (
     InputPrep(..), PositionOps(..), LogOps(..),
     InputOps(..), more, next,
+#if __GLASGOW_HASKELL__ <= 900
+    word8ToWord#, word16ToWord#,
+#endif
     InputDependant
   ) where
 
@@ -29,6 +33,11 @@
 import GHC.Exts                                    (Int(..), Char(..), TYPE, Int#)
 import GHC.ForeignPtr                              (ForeignPtr(..))
 import GHC.Prim                                    (indexWideCharArray#, indexWord16Array#, readWord8OffAddr#, word2Int#, chr#, touch#, realWorld#, plusAddr#, (+#), (-#))
+#if __GLASGOW_HASKELL__ > 900
+import GHC.Prim                                    (word16ToWord#, word8ToWord#)
+#else
+import GHC.Prim                                    (Word#)
+#endif
 import Parsley.Internal.Backend.Machine.InputRep   (Stream(..), CharList(..), Text16(..), Rep, UnpackedLazyByteString,
                                                     offWith, emptyUnpackedLazyByteString, intSame, intLess,
                                                     offsetText, offWithSame, offWithShiftRight, dropStream,
@@ -39,6 +48,17 @@
 import qualified Data.ByteString.Lazy.Internal as Lazy (ByteString(..))
 --import qualified Data.Text                     as Text (length, index)
 
+
+#if __GLASGOW_HASKELL__ <= 900
+{-# INLINE word8ToWord# #-}
+word8ToWord# :: Word# -> Word#
+word8ToWord# x = x
+
+{-# INLINE word16ToWord# #-}
+word16ToWord# :: Word# -> Word#
+word16ToWord# x = x
+#endif
+
 {- Auxillary Representation -}
 {-|
 Given some associated representation type, defines the operations
@@ -166,7 +186,7 @@
   prepare qinput = [||
       let Text16 (Text arr (I# off#) (I# size#)) = $$qinput
           arr# = aBA arr
-          next i# = (# C# (chr# (word2Int# (indexWord16Array# arr# i#))), i# +# 1# #)
+          next i# = (# C# (chr# (word2Int# (word16ToWord# (indexWord16Array# arr# i#)))), i# +# 1# #)
       in (# next, \qi -> $$(intLess [||qi||] [||size#||]), off# #)
     ||]
 
@@ -176,7 +196,7 @@
           next i# =
             case readWord8OffAddr# (addr# `plusAddr#` i#) 0# realWorld# of
               (# s', x #) -> case touch# final s' of
-                _ -> (# C# (chr# (word2Int# x)), i# +# 1# #)
+                _ -> (# C# (chr# (word2Int# (word8ToWord# x))), i# +# 1# #)
       in  (# next, \qi -> $$(intLess [||qi||] [||size#||]), off# #)
     ||]
 
@@ -193,7 +213,7 @@
 
 instance InputPrep Text where
   prepare qinput = [||
-      let next t@(Text arr off unconsumed) = let !(Iter c d) = iter t 0 in (# c, Text arr (off+d) (unconsumed-d) #)
+      let next t@(Text arr off unconsumed) = let !(Iter c d) = iter t 0 in (# c, Text arr (off + d) (unconsumed - d) #)
           more (Text _ _ unconsumed) = unconsumed > 0
       in (# next, more, $$qinput #)
     ||]
@@ -203,7 +223,7 @@
       let next (# i#, addr#, final, off#, size#, cs #) =
             case readWord8OffAddr# addr# off# realWorld# of
               (# s', x #) -> case touch# final s' of
-                _ -> (# C# (chr# (word2Int# x)),
+                _ -> (# C# (chr# (word2Int# (word8ToWord# x))),
                     if I# size# /= 1 then (# i# +# 1#, addr#, final, off# +# 1#, size# -# 1#, cs #)
                     else case cs of
                       Lazy.Chunk (PS (ForeignPtr addr'# final') (I# off'#) (I# size'#)) cs' ->
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputRep.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputRep.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputRep.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/InputRep.hs
@@ -1,5 +1,6 @@
 {-# OPTIONS_HADDOCK show-extensions #-}
-{-# LANGUAGE MagicHash,
+{-# LANGUAGE CPP,
+             MagicHash,
              TypeFamilies,
              UnboxedTuples,
              StandaloneKindSignatures #-}
@@ -49,6 +50,9 @@
 import Data.Text.Internal                (Text(..))
 import Data.Text.Unsafe                  (iter_, reverseIter_)
 import GHC.Exts                          (Int(..), TYPE, RuntimeRep(..), (==#), (<#), (+#), (-#), isTrue#)
+#if __GLASGOW_HASKELL__ > 900
+import GHC.Exts                          (LiftedRep)
+#endif
 import GHC.ForeignPtr                    (ForeignPtr(..), ForeignPtrContents)
 import GHC.Prim                          (Int#, Addr#, nullAddr#)
 import Parsley.Internal.Common.Utils     (Code)
@@ -218,7 +222,7 @@
     go 0 off' unconsumed' = Text arr off' unconsumed'
     go n off' unconsumed'
       | unconsumed' > 0 = let !d = iter_ (Text arr off' unconsumed') 0
-                          in go (n-1) (off'+d) (unconsumed'-d)
+                          in go (n - 1) (off' + d) (unconsumed' - d)
       | otherwise = Text arr off' unconsumed'
 
 {-|
@@ -231,7 +235,7 @@
   where
     go 0 off' unconsumed' = Text arr off' unconsumed'
     go n off' unconsumed'
-      | off' > 0 = let !d = reverseIter_ (Text arr off' unconsumed') 0 in go (n-1) (off'+d) (unconsumed'-d)
+      | off' > 0 = let !d = reverseIter_ (Text arr off' unconsumed') 0 in go (n - 1) (off' + d) (unconsumed' - d)
       | otherwise = Text arr off' unconsumed'
 
 {-# INLINE emptyUnpackedLazyByteString' #-}
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Ops.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Ops.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Ops.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Ops.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/PosOps.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/PosOps.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/PosOps.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/PosOps.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Base.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Base.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Base.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Base.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Context.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Context.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Context.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Context.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Offset.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Offset.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Offset.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Offset.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Pos.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Pos.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Pos.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Input/Pos.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/State.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/State.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/State.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/State.hs
diff --git a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Statics.hs b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Statics.hs
--- a/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Statics.hs
+++ b/src/ghc-8.10+/Parsley/Internal/Backend/Machine/Types/Statics.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Defunc.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Defunc.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Defunc.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Defunc.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Eval.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Eval.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Eval.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Eval.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputOps.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputOps.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputOps.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputOps.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputRep.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputRep.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputRep.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/InputRep.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Ops.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Ops.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Ops.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Ops.hs
diff --git a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Types/State.hs b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Types/State.hs
--- a/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Types/State.hs
+++ b/src/ghc-8.6+/Parsley/Internal/Backend/Machine/Types/State.hs
diff --git a/src/ghc/Parsley/Internal.hs b/src/ghc/Parsley/Internal.hs
--- a/src/ghc/Parsley/Internal.hs
+++ b/src/ghc/Parsley/Internal.hs
diff --git a/src/ghc/Parsley/Internal/Backend.hs b/src/ghc/Parsley/Internal/Backend.hs
--- a/src/ghc/Parsley/Internal/Backend.hs
+++ b/src/ghc/Parsley/Internal/Backend.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Analysis.hs b/src/ghc/Parsley/Internal/Backend/Analysis.hs
--- a/src/ghc/Parsley/Internal/Backend/Analysis.hs
+++ b/src/ghc/Parsley/Internal/Backend/Analysis.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Analysis/Coins.hs b/src/ghc/Parsley/Internal/Backend/Analysis/Coins.hs
--- a/src/ghc/Parsley/Internal/Backend/Analysis/Coins.hs
+++ b/src/ghc/Parsley/Internal/Backend/Analysis/Coins.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Analysis/Inliner.hs b/src/ghc/Parsley/Internal/Backend/Analysis/Inliner.hs
--- a/src/ghc/Parsley/Internal/Backend/Analysis/Inliner.hs
+++ b/src/ghc/Parsley/Internal/Backend/Analysis/Inliner.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/Identifiers.hs b/src/ghc/Parsley/Internal/Backend/Machine/Identifiers.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/Identifiers.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/Identifiers.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/LetBindings.hs b/src/ghc/Parsley/Internal/Backend/Machine/LetBindings.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/LetBindings.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/LetBindings.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/LetRecBuilder.hs b/src/ghc/Parsley/Internal/Backend/Machine/LetRecBuilder.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/LetRecBuilder.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/LetRecBuilder.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/THUtils.hs b/src/ghc/Parsley/Internal/Backend/Machine/THUtils.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/THUtils.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/THUtils.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/Types/Coins.hs b/src/ghc/Parsley/Internal/Backend/Machine/Types/Coins.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/Types/Coins.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/Types/Coins.hs
diff --git a/src/ghc/Parsley/Internal/Backend/Machine/Types/InputCharacteristic.hs b/src/ghc/Parsley/Internal/Backend/Machine/Types/InputCharacteristic.hs
--- a/src/ghc/Parsley/Internal/Backend/Machine/Types/InputCharacteristic.hs
+++ b/src/ghc/Parsley/Internal/Backend/Machine/Types/InputCharacteristic.hs
diff --git a/src/ghc/Parsley/Internal/Common.hs b/src/ghc/Parsley/Internal/Common.hs
--- a/src/ghc/Parsley/Internal/Common.hs
+++ b/src/ghc/Parsley/Internal/Common.hs
diff --git a/src/ghc/Parsley/Internal/Common/Fresh.hs b/src/ghc/Parsley/Internal/Common/Fresh.hs
--- a/src/ghc/Parsley/Internal/Common/Fresh.hs
+++ b/src/ghc/Parsley/Internal/Common/Fresh.hs
diff --git a/src/ghc/Parsley/Internal/Common/Queue/Impl.hs b/src/ghc/Parsley/Internal/Common/Queue/Impl.hs
--- a/src/ghc/Parsley/Internal/Common/Queue/Impl.hs
+++ b/src/ghc/Parsley/Internal/Common/Queue/Impl.hs
diff --git a/src/ghc/Parsley/Internal/Common/QueueLike.hs b/src/ghc/Parsley/Internal/Common/QueueLike.hs
--- a/src/ghc/Parsley/Internal/Common/QueueLike.hs
+++ b/src/ghc/Parsley/Internal/Common/QueueLike.hs
diff --git a/src/ghc/Parsley/Internal/Common/RangeSet.hs b/src/ghc/Parsley/Internal/Common/RangeSet.hs
--- a/src/ghc/Parsley/Internal/Common/RangeSet.hs
+++ b/src/ghc/Parsley/Internal/Common/RangeSet.hs
@@ -348,7 +348,7 @@
 {-# NOINLINE balanceL #-}
 balanceL :: Size -> a -> a -> RangeSet a -> RangeSet a -> RangeSet a
 -- PRE: left grew or right shrank, difference in height at most 2 biasing to the left
-balanceL !sz !l1 !u1 lt@(Fork !hlt !szl !l2 !u2 !llt !rlt) !rt
+balanceL !sz !l1 !u1 lt@(Fork hlt szl l2 u2 llt rlt) !rt
   -- both sides are equal height or off by one
   | dltrt <= 1 = forkSz sz l1 u1 lt rt
   -- The bias is 2 (dltrt == 2)
@@ -365,7 +365,7 @@
 {-# NOINLINE balanceR #-}
 balanceR :: Size -> a -> a -> RangeSet a -> RangeSet a -> RangeSet a
 -- PRE: left shrank or right grew, difference in height at most 2 biasing to the right
-balanceR !sz !l1 !u1 !lt rt@(Fork !hrt szr l2 u2 lrt rrt)
+balanceR !sz !l1 !u1 !lt rt@(Fork hrt szr l2 u2 lrt rrt)
   -- both sides are equal height or off by one
   | drtlt <= 1 = forkSz sz l1 u1 lt rt
   -- The bias is 2 (drtlt == 2)
diff --git a/src/ghc/Parsley/Internal/Common/RewindQueue/Impl.hs b/src/ghc/Parsley/Internal/Common/RewindQueue/Impl.hs
--- a/src/ghc/Parsley/Internal/Common/RewindQueue/Impl.hs
+++ b/src/ghc/Parsley/Internal/Common/RewindQueue/Impl.hs
diff --git a/src/ghc/Parsley/Internal/Common/State.hs b/src/ghc/Parsley/Internal/Common/State.hs
--- a/src/ghc/Parsley/Internal/Common/State.hs
+++ b/src/ghc/Parsley/Internal/Common/State.hs
diff --git a/src/ghc/Parsley/Internal/Common/Utils.hs b/src/ghc/Parsley/Internal/Common/Utils.hs
--- a/src/ghc/Parsley/Internal/Common/Utils.hs
+++ b/src/ghc/Parsley/Internal/Common/Utils.hs
@@ -6,11 +6,11 @@
 #endif
 module Parsley.Internal.Common.Utils (WQ(..), Code, Quapplicative(..), intercalate, intercalateDiff) where
 
-import Data.List (intersperse)
+import Data.List   (intersperse)
 import Data.String (IsString(..))
 
 #if __GLASGOW_HASKELL__ >= 810
-import Data.Kind    (Type)
+import Data.Kind   (Type)
 import GHC.Exts    (TYPE, RuntimeRep)
 #endif
 
diff --git a/src/ghc/Parsley/Internal/Common/Vec.hs b/src/ghc/Parsley/Internal/Common/Vec.hs
--- a/src/ghc/Parsley/Internal/Common/Vec.hs
+++ b/src/ghc/Parsley/Internal/Common/Vec.hs
diff --git a/src/ghc/Parsley/Internal/Core.hs b/src/ghc/Parsley/Internal/Core.hs
--- a/src/ghc/Parsley/Internal/Core.hs
+++ b/src/ghc/Parsley/Internal/Core.hs
diff --git a/src/ghc/Parsley/Internal/Core/CharPred.hs b/src/ghc/Parsley/Internal/Core/CharPred.hs
--- a/src/ghc/Parsley/Internal/Core/CharPred.hs
+++ b/src/ghc/Parsley/Internal/Core/CharPred.hs
@@ -77,6 +77,7 @@
 This given information can be used to optimise the new predicate the character is fed through.
 
 This works as follows:
+
   * If the given knowledge is a subset of the new predicate, then we /know/ that any character check
     will have passed, because it already passed a stricter check. The predicate can, therefore, be
     optimised to `Item`.
diff --git a/src/ghc/Parsley/Internal/Core/Defunc.hs b/src/ghc/Parsley/Internal/Core/Defunc.hs
--- a/src/ghc/Parsley/Internal/Core/Defunc.hs
+++ b/src/ghc/Parsley/Internal/Core/Defunc.hs
@@ -211,5 +211,5 @@
   show CONST = "const"
   show (IF_S c b e) = concat ["(if ", show c, " then ", show b, " else ", show e, ")"]
   show (LAM_S _) = "f"
-  show p@(RANGES{}) = show (charPred p)
+  show p@RANGES{} = show (charPred p)
   show _ = "x"
diff --git a/src/ghc/Parsley/Internal/Core/Identifiers.hs b/src/ghc/Parsley/Internal/Core/Identifiers.hs
--- a/src/ghc/Parsley/Internal/Core/Identifiers.hs
+++ b/src/ghc/Parsley/Internal/Core/Identifiers.hs
diff --git a/src/ghc/Parsley/Internal/Core/InputTypes.hs b/src/ghc/Parsley/Internal/Core/InputTypes.hs
--- a/src/ghc/Parsley/Internal/Core/InputTypes.hs
+++ b/src/ghc/Parsley/Internal/Core/InputTypes.hs
diff --git a/src/ghc/Parsley/Internal/Core/Lam.hs b/src/ghc/Parsley/Internal/Core/Lam.hs
--- a/src/ghc/Parsley/Internal/Core/Lam.hs
+++ b/src/ghc/Parsley/Internal/Core/Lam.hs
@@ -58,6 +58,10 @@
       T -> x
       F -> y
       c -> If c x y
+    -- Reduction rule found courtesy of David Davies, forever immortalised
+    reduce (Let v@(Var True _) f) = case f v of
+      x | normal x -> x
+      x            -> reduce x
     reduce x = x
 
     normal :: Lam a -> Bool
@@ -66,6 +70,7 @@
     normal (If T _ _) = False
     normal (If F _ _) = False
     normal (If x _ _) = normal x
+    normal (Let (Var True _) _) = False
     normal _ = True
 
 generate :: Lam a -> Code a
diff --git a/src/ghc/Parsley/Internal/Core/Primitives.hs b/src/ghc/Parsley/Internal/Core/Primitives.hs
--- a/src/ghc/Parsley/Internal/Core/Primitives.hs
+++ b/src/ghc/Parsley/Internal/Core/Primitives.hs
diff --git a/src/ghc/Parsley/Internal/Frontend.hs b/src/ghc/Parsley/Internal/Frontend.hs
--- a/src/ghc/Parsley/Internal/Frontend.hs
+++ b/src/ghc/Parsley/Internal/Frontend.hs
diff --git a/src/ghc/Parsley/Internal/Frontend/Analysis.hs b/src/ghc/Parsley/Internal/Frontend/Analysis.hs
--- a/src/ghc/Parsley/Internal/Frontend/Analysis.hs
+++ b/src/ghc/Parsley/Internal/Frontend/Analysis.hs
diff --git a/src/ghc/Parsley/Internal/Frontend/Analysis/Dependencies.hs b/src/ghc/Parsley/Internal/Frontend/Analysis/Dependencies.hs
--- a/src/ghc/Parsley/Internal/Frontend/Analysis/Dependencies.hs
+++ b/src/ghc/Parsley/Internal/Frontend/Analysis/Dependencies.hs
diff --git a/src/ghc/Parsley/Internal/Frontend/Analysis/Flags.hs b/src/ghc/Parsley/Internal/Frontend/Analysis/Flags.hs
--- a/src/ghc/Parsley/Internal/Frontend/Analysis/Flags.hs
+++ b/src/ghc/Parsley/Internal/Frontend/Analysis/Flags.hs
diff --git a/src/ghc/Parsley/Internal/Frontend/Compiler.hs b/src/ghc/Parsley/Internal/Frontend/Compiler.hs
--- a/src/ghc/Parsley/Internal/Frontend/Compiler.hs
+++ b/src/ghc/Parsley/Internal/Frontend/Compiler.hs
diff --git a/src/ghc/Parsley/Internal/Frontend/Optimiser.hs b/src/ghc/Parsley/Internal/Frontend/Optimiser.hs
--- a/src/ghc/Parsley/Internal/Frontend/Optimiser.hs
+++ b/src/ghc/Parsley/Internal/Frontend/Optimiser.hs
diff --git a/src/ghc/Parsley/Internal/Verbose.hs b/src/ghc/Parsley/Internal/Verbose.hs
--- a/src/ghc/Parsley/Internal/Verbose.hs
+++ b/src/ghc/Parsley/Internal/Verbose.hs
diff --git a/test/CommonTest.hs b/test/CommonTest.hs
--- a/test/CommonTest.hs
+++ b/test/CommonTest.hs
diff --git a/test/CommonTest/Queue.hs b/test/CommonTest/Queue.hs
--- a/test/CommonTest/Queue.hs
+++ b/test/CommonTest/Queue.hs
diff --git a/test/CommonTest/RangeSet.hs b/test/CommonTest/RangeSet.hs
--- a/test/CommonTest/RangeSet.hs
+++ b/test/CommonTest/RangeSet.hs
diff --git a/test/Primitive.hs b/test/Primitive.hs
--- a/test/Primitive.hs
+++ b/test/Primitive.hs
diff --git a/test/Primitive/Parsers.hs b/test/Primitive/Parsers.hs
--- a/test/Primitive/Parsers.hs
+++ b/test/Primitive/Parsers.hs
diff --git a/test/Regression/Issue27.hs b/test/Regression/Issue27.hs
--- a/test/Regression/Issue27.hs
+++ b/test/Regression/Issue27.hs
diff --git a/test/RegressionTest.hs b/test/RegressionTest.hs
--- a/test/RegressionTest.hs
+++ b/test/RegressionTest.hs
diff --git a/test/TestUtils.hs b/test/TestUtils.hs
--- a/test/TestUtils.hs
+++ b/test/TestUtils.hs
