wren ng thornton wrote:
Max Bolingbroke wrote:
Agreed: I've implemented this too. I've also added fuzzy matching to
package search:

"""
$ stage2/ghc-inplace --make ../Test1.hs

../Test1.hs:3:7:
    Could not find module `Data.Lost':
      Use -v to see a list of the files searched for.
      Maybe you meant `Data.List'

$ stage2/ghc-inplace --make ../Test2.hs
[1 of 1] Compiling Main             ( ../Test2.hs, ../Test2.o )

../Test2.hs:7:14:
    Not in scope: `isSpace'
    Maybe you meant `Char.isSpace'
"""

In terms of making error messages more helpful, I don't find general typos are much of an issue, but this part would be really nice! I've always been annoyed that GHC just says "no" rather than offering suggestions (-v is rarely helpful), especially since it knows about what modules are installed et al.

It sounds like it only searches for modules you've imported (after all they might've been brought into scope with an as-clause, and ghc has no business poking in un-imported modules), but perhaps since in GHCi all modules are in scope (under their original names -- in addition to any imports in an interpreted file), it (ghci) searches all modules then?

If I want a "perhaps you meant to import" message, I want it to be a *complete* listing of modules available that export that symbol, both local ones and library ones, ideally :-) (certainly don't want a recommendation to import e.g. List without at least an equal recommendation of Data.List...)

-Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to