Currently, it seems that local definitions are never offered as completion candidates. Is this an issue that needs to be tackled downstream in ghc-mod? I'd be happy to try to tackle this if someone could give me some high level guidance about what needs to be done.
Completion is handled completely by hie now, ghc-mod has nothing to do with it.
To figure out what local definitions are in scope at a cursor location, I suspect you would have to traverse the AST yourself, collecting everything that is in scope until you reach the cursor.
This is a feature we definitely want in HIE, and your contributions are very welcome. You can drop by on #haskell-ide-engine on freenode and ask us anything.
Most helpful comment
Completion is handled completely by hie now, ghc-mod has nothing to do with it.
To figure out what local definitions are in scope at a cursor location, I suspect you would have to traverse the AST yourself, collecting everything that is in scope until you reach the cursor.
This is a feature we definitely want in HIE, and your contributions are very welcome. You can drop by on #haskell-ide-engine on freenode and ask us anything.