Skip to content

Commit

Permalink
[ fix agda#338 ] Only filter out imports of current module, not other…
Browse files Browse the repository at this point in the history
… modules with current module as prefix
  • Loading branch information
jespercockx committed Jul 11, 2024
1 parent 1dea964 commit 3478a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Agda2Hs/Compile/Imports.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3478a21

Please sign in to comment.