-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nice-to-have: typo recommendations for UnknownPackageIdentifiers #158
Comments
Hi! I'd be interested in working on that feature if it hasn't been taken care of yet :) Do I have to expose some kind of design here first, or just submitting code + tests is enough? |
Submitting code should be sufficient. If you have any questions, let us On Sun, Sep 27, 2015, 6:59 PM Thomas Papillon notifications@github.com
|
Is there any progress on this? In case this is not being worked on, a couple of questions here:
|
How about
When there are multiple close results, like for
I think Levenshtein distance is a good choice. Also, a larger threshold than 1 is better, and then just have a limit on the number of results.
Certainly! I prefer to keep large refactorings in separate commits, but small ones can go along with the changes. |
One more question. Why do you have constraints like: resolvePackagesAllowMissing
:: (MonadIO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadLogger m, MonadThrow m, MonadBaseControl IO m, MonadCatch m)
=> … Is it just desire to keep the code as general as possible or do you need to use |
This commit introduces typo recommendations and minor refactorings in ‘Stack.Fetch’ module. Currently the recommendations follow very conservative scheme only reporting package names for which Damerau-Levenshtein distance between given package and package name in caches is equal to 1. This should catch all common typos. If desirable, the threshold can be made greater in future, although do it care because it will quickly start to give false positives.
There are indeed circumstances where some functions are used with different reader environments. However, I think it is true that many are always called with the same monad. I've opened #1297 I've merged the commit, but I'm going to leave this open for now to track this :
|
@mgsloan, To give the suggestions at the end of output, they should be included in exception and then printed as part of exception. Am I correct? |
Yep, exactly! |
See commercialhaskell#158 for more information.
Good work! |
UnknownPackageIdentifiers (fromList ["stackage-metdata-0.3.0.0"])
It would be nice if it could notice that I was only off by one character from
stackage-metadata
.The text was updated successfully, but these errors were encountered: