diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Revision history for auto-export
 
+## 0.1.0.1 -- 2025-11-11
+
+* Fix a crash involving nameless exports (modules)
+
 ## 0.1.0.0 -- YYYY-mm-dd
 
 * First version. Released on an unsuspecting world.
diff --git a/auto-export.cabal b/auto-export.cabal
--- a/auto-export.cabal
+++ b/auto-export.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               auto-export
-version:            0.1.0.0
+version:            0.1.0.1
 synopsis:           Automatically add things to module export list
 description:        Automatically add things to module export list using a GHC plugin
 license:            BSD-3-Clause
diff --git a/src/AutoExport.hs b/src/AutoExport.hs
--- a/src/AutoExport.hs
+++ b/src/AutoExport.hs
@@ -144,7 +144,8 @@
 addExports [] lies = lies
 addExports newIEs lies = liesWithComma ++ newIEsWithCommas
   where
-    existingNames = Set.fromList $ Ghc.ieName . Ghc.unLoc <$> lies
+    existingNames = Set.fromList $
+      (listToMaybe . Ghc.ieNames . Ghc.unLoc) `mapMaybe` lies
     iesToAdd = filter ((`Set.notMember` existingNames) . Ghc.ieName) newIEs
     addComma (Ghc.L l ie) = Ghc.L (EP.addComma l) ie
     liesWithComma = case reverse lies of
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -27,6 +27,7 @@
   , testCase "Var3" $ runTest "Var3.hs"
   , testCase "Var4" $ runTest "Var4.hs"
   , testCase "Var5" $ runTest "Var5.hs"
+  , testCase "Var6" $ runTest "Var6.hs"
   ]
 
 testModulePath :: String -> FilePath
