Nikolay Yakimov
Nikolay Yakimov
mkRevDirMapFunc should be obsoleted by this change, since I'm relying on this to be handled downstream (e. g. by ghc). Also it's a bit of a mystery to me why...
WRT tests, I should probably tweak test code so it fails early, but here's an actual problem: ``` >>>> Cabal errors begin Warning: /home/travis/build/DanielG/ghc-mod/ghc-mod.cabal: Ignoring unknown section type: custom-setup cabal:...
Okay, 7.10 fixed. 7.8 is still failing, in part due to test files not compiling under 7.8 (f.ex. `ImportedFrom03.hs` has some instance-related fails), and in part I honestly don't know...
Um... `type Id = Var`, `instance NamedThing Var`, so you can basically `hsBindToName (LHsBind id) = getName id`, right?
So... let me get this straight. Sorry if I'm off the mark entirely. Most code here is just dealing with getting module and package name of a named thing, yes?...
You're right, `nameModule` will get an originating module, not an immediate module from which symbol was imported. Can't think of a way to rectify that from the top of my...
Okay, here's another idea. We can limit ourselves to working with `RenamedSource`, which has list of used (located) `Name`s and list of imports (almost verbatim from ParsedModule) separately. Then we...
P.S. `findModule` instead of `findImportedModule` would probably be better in this case, since we're pretty sure that it wouldn't throw, and result doesn't need unwrapping.
Here's an extremely rough sketch of what I was thinking: 3f282a8 Of course, it's not good code, there are a few irrefutable patterns that might be refuted, it doesn't do...
I think at this point this is "good enough". I could probably refine this ad infinum given the chance, but I think I have to stop at some point, and...