From 3478a21b2f0861f1f3af47563621ba891d20f165 Mon Sep 17 00:00:00 2001 From: Jesper Cockx Date: Thu, 11 Jul 2024 18:00:25 +0200 Subject: [PATCH] [ fix #338 ] Only filter out imports of current module, not other modules with current module as prefix --- src/Agda2Hs/Compile/Imports.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agda2Hs/Compile/Imports.hs b/src/Agda2Hs/Compile/Imports.hs index 251fbb27..d8aef387 100644 --- a/src/Agda2Hs/Compile/Imports.hs +++ b/src/Agda2Hs/Compile/Imports.hs @@ -25,7 +25,7 @@ type ImportDeclMap = Map (Hs.ModuleName (), Qualifier) ImportSpecMap compileImports :: String -> Imports -> TCM [Hs.ImportDecl ()] compileImports top is0 = do - let is = filter (not . (top `isPrefixOf`) . Hs.prettyPrint . importModule) is0 + let is = filter (not . (top ==) . Hs.prettyPrint . importModule) is0 checkClashingImports is let imps = Map.toList $ groupModules is return $ map (uncurry $ uncurry makeImportDecl) imps