It should find all the .hi files, not load any of them (or perhaps do so lazy), and then assign heuristics to each one by how likely it is to represent a given module. The current logic is complex and incomplete, so heuristics are much more likely to get somewhere. Concretely:
temp/Foo/Bar.hi-dump should be guessed at being Foo.Bar, but with an outside possibility of Temp.Foo.Bar (you might be on a case insensitive file system) or Bar (Foo might be the name of the exe). Using these techniques hopefully the hacks for lexer files will go away, and Paths_foo can be dealt with properly rather than never being found. Also case insensitivity is a property of file system, not OS, as I currently pretend in #42 .
It should find all the
.hi
files, not load any of them (or perhaps do so lazy), and then assign heuristics to each one by how likely it is to represent a given module. The current logic is complex and incomplete, so heuristics are much more likely to get somewhere. Concretely:temp/Foo/Bar.hi-dump
should be guessed at beingFoo.Bar
, but with an outside possibility ofTemp.Foo.Bar
(you might be on a case insensitive file system) orBar
(Foo
might be the name of the exe). Using these techniques hopefully the hacks for lexer files will go away, and Paths_foo can be dealt with properly rather than never being found. Also case insensitivity is a property of file system, not OS, as I currently pretend in #42 .