atsky / haskell-idea-plugin

IntelliJ IDEA plugin for Haskell
Apache License 2.0
201 stars 21 forks source link

Fix #59 #104

Closed ariskou closed 9 years ago

ariskou commented 9 years ago

I have the same problem using GHC 7.10 and ghc-mod master (at least as of commit 9cefeff17f). More specifically, I experience it in two cases: one when I ask for the type of let bound identifiers, and secondly when I ask for the type of top level identifiers.

Examining the output of ghc-modi it appears that the type of the identifier at the cursor position is always reported first AND at least for let bound and top level identifiers the reported end line and column is the end of the whole definition, NOT the end of the identifier. The code in searches for a result with both the start and end of the identier, while ghc-modi reports the start of the identifier, buth the end of the whole definition, and the search thus fails.