diff --git a/hie-compat.cabal b/hie-compat.cabal
--- a/hie-compat.cabal
+++ b/hie-compat.cabal
@@ -1,6 +1,6 @@
 cabal-version:       1.22
 name:                hie-compat
-version:             0.1.0.0
+version:             0.2.0.0
 synopsis:            HIE files for GHC 8.6 and other HIE file backports
 license:             Apache-2.0
 description:
@@ -23,11 +23,13 @@
 library
   default-language:    Haskell2010
   build-depends:
-     base < 4.15, array, bytestring, containers, directory, filepath, transformers
+     base < 4.16, array, bytestring, containers, directory, filepath, transformers
   if flag(ghc-lib)
     build-depends: ghc-lib
   else
     build-depends: ghc, ghc-boot
+  if (impl(ghc >= 9.0) && impl(ghc < 9.1))
+    ghc-options: -Wall -Wno-name-shadowing
 
   exposed-modules:
     Compat.HieAst
@@ -38,8 +40,10 @@
 
   if (impl(ghc > 8.5) && impl(ghc < 8.7) && !flag(ghc-lib))
     hs-source-dirs: src-ghc86
-  if ((impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib))
+  if (impl(ghc > 8.7) && impl(ghc < 8.10))
     hs-source-dirs: src-ghc88 src-reexport
   if (impl(ghc > 8.9) && impl(ghc < 8.11))
     hs-source-dirs: src-ghc810 src-reexport
+  if (impl(ghc >= 9.0) && impl(ghc < 9.1) || flag(ghc-lib))
+    hs-source-dirs: src-ghc901
 
diff --git a/src-ghc86/Compat/HieBin.hs b/src-ghc86/Compat/HieBin.hs
--- a/src-ghc86/Compat/HieBin.hs
+++ b/src-ghc86/Compat/HieBin.hs
@@ -97,7 +97,7 @@
   -- hieVersion and the GHC version used to generate this file
   mapM_ (putByte bh0) hieMagic
   putBinLine bh0 $ BSC.pack $ show hieVersion
-  putBinLine bh0 $ ghcVersion
+  putBinLine bh0 ghcVersion
 
   -- remember where the dictionary pointer will go
   dict_p_p <- tellBin bh0
@@ -297,7 +297,7 @@
 getSymTabName :: SymbolTable -> BinHandle -> IO Name
 getSymTabName st bh = do
   i :: Word32 <- get bh
-  return $ st A.! (fromIntegral i)
+  return $ st A.! fromIntegral i
 
 putName :: HieSymbolTable -> BinHandle -> Name -> IO ()
 putName (HieSymbolTable next ref) bh name = do
diff --git a/src-ghc86/Compat/HieDebug.hs b/src-ghc86/Compat/HieDebug.hs
--- a/src-ghc86/Compat/HieDebug.hs
+++ b/src-ghc86/Compat/HieDebug.hs
@@ -22,10 +22,10 @@
 import Data.List        ( sortOn )
 import Data.Foldable    ( toList )
 
-ppHies :: Outputable a => (HieASTs a) -> SDoc
+ppHies :: Outputable a => HieASTs a -> SDoc
 ppHies (HieASTs asts) = M.foldrWithKey go "" asts
   where
-    go k a rest = vcat $
+    go k a rest = vcat
       [ "File: " <> ppr k
       , ppHie a
       , rest
@@ -112,9 +112,9 @@
           ]
     checkContainment [] = return ()
     checkContainment (x:xs)
-      | span `containsSpan` (nodeSpan x) = checkContainment xs
+      | span `containsSpan` nodeSpan x = checkContainment xs
       | otherwise = Left $ hsep
-          [ ppr $ span
+          [ ppr span
           , "does not contain"
           , ppr $ nodeSpan x
           ]
@@ -139,7 +139,7 @@
               [] -> []
               _ -> if any (`scopeContainsSpan` sp) scopes
                    then []
-                   else return $ hsep $
+                   else return $ hsep
                      [ "Name", ppr n, "at position", ppr sp
                      , "doesn't occur in calculated scope", ppr scopes]
           | otherwise = []
diff --git a/src-ghc86/Compat/HieTypes.hs b/src-ghc86/Compat/HieTypes.hs
--- a/src-ghc86/Compat/HieTypes.hs
+++ b/src-ghc86/Compat/HieTypes.hs
@@ -168,7 +168,7 @@
 type HieTypeFlat = HieType TypeIndex
 
 -- | Roughly isomorphic to the original core 'Type'.
-newtype HieTypeFix = Roll (HieType (HieTypeFix))
+newtype HieTypeFix = Roll (HieType HieTypeFix)
 
 instance Binary (HieType TypeIndex) where
   put_ bh (HTyVarTy n) = do
@@ -200,7 +200,7 @@
   put_ bh (HCastTy a) = do
     putByte bh 7
     put_ bh a
-  put_ bh (HCoercionTy) = putByte bh 8
+  put_ bh HCoercionTy = putByte bh 8
 
   get bh = do
     (t :: Word8) <- get bh
@@ -228,7 +228,7 @@
 
 -- | Mapping from filepaths (represented using 'FastString') to the
 -- corresponding AST
-newtype HieASTs a = HieASTs { getAsts :: (M.Map FastString (HieAST a)) }
+newtype HieASTs a = HieASTs { getAsts :: M.Map FastString (HieAST a) }
   deriving (Functor, Foldable, Traversable)
 
 instance Binary (HieASTs TypeIndex) where
@@ -276,9 +276,9 @@
     put_ bh $ nodeType ni
     put_ bh $ M.toList $ nodeIdentifiers ni
   get bh = NodeInfo
-    <$> fmap (S.fromDistinctAscList) (get bh)
+    <$> fmap S.fromDistinctAscList (get bh)
     <*> get bh
-    <*> fmap (M.fromList) (get bh)
+    <*> fmap M.fromList (get bh)
 
 type Identifier = Either ModuleName Name
 
@@ -309,7 +309,7 @@
     put_ bh $ S.toAscList $ identInfo dets
   get bh =  IdentifierDetails
     <$> get bh
-    <*> fmap (S.fromDistinctAscList) (get bh)
+    <*> fmap S.fromDistinctAscList (get bh)
 
 
 -- | Different contexts under which identifiers exist
@@ -419,7 +419,7 @@
 
 instance Binary IEType where
   put_ bh b = putByte bh (fromIntegral (fromEnum b))
-  get bh = do x <- getByte bh; pure $! (toEnum (fromIntegral x))
+  get bh = do x <- getByte bh; pure $! toEnum (fromIntegral x)
 
 
 data RecFieldContext
@@ -431,7 +431,7 @@
 
 instance Binary RecFieldContext where
   put_ bh b = putByte bh (fromIntegral (fromEnum b))
-  get bh = do x <- getByte bh; pure $! (toEnum (fromIntegral x))
+  get bh = do x <- getByte bh; pure $! toEnum (fromIntegral x)
 
 
 data BindType
@@ -441,7 +441,7 @@
 
 instance Binary BindType where
   put_ bh b = putByte bh (fromIntegral (fromEnum b))
-  get bh = do x <- getByte bh; pure $! (toEnum (fromIntegral x))
+  get bh = do x <- getByte bh; pure $! toEnum (fromIntegral x)
 
 
 data DeclType
@@ -456,7 +456,7 @@
 
 instance Binary DeclType where
   put_ bh b = putByte bh (fromIntegral (fromEnum b))
-  get bh = do x <- getByte bh; pure $! (toEnum (fromIntegral x))
+  get bh = do x <- getByte bh; pure $! toEnum (fromIntegral x)
 
 
 data Scope
diff --git a/src-ghc86/Compat/HieUtils.hs b/src-ghc86/Compat/HieUtils.hs
--- a/src-ghc86/Compat/HieUtils.hs
+++ b/src-ghc86/Compat/HieUtils.hs
@@ -62,11 +62,11 @@
         ts' = go (extendTvSubst env tv t) res ts
 
     go env (FunTy _ res) (t:ts) -- No type-class args in tycon apps
-      = (True,t) : (go env res ts)
+      = (True,t) : go env res ts
 
     go env (TyVarTy tv) ts
       | Just ki <- lookupTyVar env tv = go env ki ts
-    go env kind (t:ts) = (True, t) : (go env kind ts) -- Ill-kinded
+    go env kind (t:ts) = (True, t) : go env kind ts -- Ill-kinded
 
 foldType :: (HieType a -> a) -> HieTypeFix -> a
 foldType f (Roll t) = f $ fmap (foldType f) t
@@ -114,7 +114,7 @@
   -> (HieASTs TypeIndex, A.Array TypeIndex HieTypeFlat)
 compressTypes asts = (a, arr)
   where
-    (a, (HTS _ m i)) = flip runState initialHTS $
+    (a, HTS _ m i) = flip runState initialHTS $
       for asts $ \typ -> do
         i <- getTypeIndex typ
         return i
diff --git a/src-ghc901/Compat/HieAst.hs b/src-ghc901/Compat/HieAst.hs
new file mode 100644
--- /dev/null
+++ b/src-ghc901/Compat/HieAst.hs
@@ -0,0 +1,35 @@
+{-
+Forked from GHC v9.0.1 to work around the readFile side effect in mkHiefile
+
+Main functions for .hie file generation
+-}
+{- HLINT ignore -}
+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
+
+module Compat.HieAst ( mkHieFile, enrichHie ) where
+
+import           GHC.Data.Maybe      (expectJust)
+import           GHC.Driver.Types
+import           GHC.Hs
+import           GHC.Tc.Types        (TcGblEnv)
+import           GHC.Types.Avail     (Avails)
+import           GHC.Unit.Module     (ml_hs_file)
+
+import           GHC.Iface.Ext.Ast   (enrichHie, mkHieFileWithSource)
+import           GHC.Iface.Ext.Types
+
+import qualified Data.ByteString     as BS
+
+
+type RenamedSource     = ( HsGroup GhcRn, [LImportDecl GhcRn]
+                         , Maybe [(LIE GhcRn, Avails)]
+                         , Maybe LHsDocString )
+
+-- | Construct an 'HieFile' from the outputs of the typechecker.
+mkHieFile :: ModSummary
+          -> TcGblEnv
+          -> RenamedSource
+          -> BS.ByteString -> Hsc HieFile
+mkHieFile ms ts rs src = do
+  let src_file = expectJust "mkHieFile" (ml_hs_file $ ms_location ms)
+  mkHieFileWithSource src_file src ms ts rs
diff --git a/src-ghc901/Compat/HieBin.hs b/src-ghc901/Compat/HieBin.hs
new file mode 100644
--- /dev/null
+++ b/src-ghc901/Compat/HieBin.hs
@@ -0,0 +1,8 @@
+{-
+Binary serialization for .hie files.
+-}
+
+module Compat.HieBin ( module GHC.Iface.Ext.Binary)
+where
+
+import GHC.Iface.Ext.Binary
diff --git a/src-ghc901/Compat/HieDebug.hs b/src-ghc901/Compat/HieDebug.hs
new file mode 100644
--- /dev/null
+++ b/src-ghc901/Compat/HieDebug.hs
@@ -0,0 +1,10 @@
+module Compat.HieDebug
+  ( module GHC.Iface.Ext.Debug
+  , ppHie ) where
+import GHC.Iface.Ext.Debug
+
+import GHC.Iface.Ext.Types (HieAST)
+import GHC.Utils.Outputable (Outputable(ppr), SDoc)
+
+ppHie :: Outputable a => HieAST a -> SDoc
+ppHie = ppr
diff --git a/src-ghc901/Compat/HieTypes.hs b/src-ghc901/Compat/HieTypes.hs
new file mode 100644
--- /dev/null
+++ b/src-ghc901/Compat/HieTypes.hs
@@ -0,0 +1,3 @@
+module Compat.HieTypes
+  ( module GHC.Iface.Ext.Types ) where
+import GHC.Iface.Ext.Types
diff --git a/src-ghc901/Compat/HieUtils.hs b/src-ghc901/Compat/HieUtils.hs
new file mode 100644
--- /dev/null
+++ b/src-ghc901/Compat/HieUtils.hs
@@ -0,0 +1,3 @@
+module Compat.HieUtils
+  ( module GHC.Iface.Ext.Utils ) where
+import GHC.Iface.Ext.Utils
