Permalink
Browse files

Temporary workaround for loop when export list contains the module it…

…self.
  • Loading branch information...
1 parent 1a2fa29 commit 9e6e790741e7eb7dc5d7f46bf86a1ca99f01433b @Oblosys Oblosys committed Jul 18, 2012
View
6 ...haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/editors/haskell/imports/AnImport.java
@@ -270,7 +270,11 @@ private void addDeclaration(final HashMap<String, FileDocumented> r, final Strin
outlineToBrowser( def,null,file,decls );
}
for (ExportDef ed:or.getExportDefs()){
- if (ed.getType().equals( ImportExportType.IEModule )){
+ if (ed.getType().equals( ImportExportType.IEModule )
+ && !file.getName().equals(ed.getName()+".hs") // Hacky workaround for bug that causes a loop when the export list contains the module itself.
+ // This hack can probably still fail in case of hi-boot import cycles,
+ // so it's better to keep track of visited modules.
+ ){
decls.addAll( getDeclarationsFromFile( ed.getName(), file.getProject() ) );
}
}

0 comments on commit 9e6e790

Please sign in to comment.