commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

stack-mode-info wants to display the package name but is showing the key #74

Closed rjmac closed 8 years ago

rjmac commented 8 years ago

With current GHCs, the package keys are a short prefix of the package name plus a hash, which isn't a very useful thing to show to a human, and it's clear from the code the name is intended.

Later on it compared the packageName value against with "main" to decide whether the package should be shown as "(this one)". That works too because both the key and name are returned from ide-backend as "main", but I've changed it to use the key because I think it won't break if someone ever creates a package called "main".

chrisdone commented 8 years ago

Good reasoning. Merging!