[GHC] #11418: Suggest correct spelling when module is not found because of typo
GHC
ghc-devs at haskell.org
Wed Feb 17 10:09:22 UTC 2016
#11418: Suggest correct spelling when module is not found because of typo
-------------------------------------+-------------------------------------
Reporter: syd | Owner:
Type: feature request | Status: new
Priority: lowest | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by svenpanne):
Replying to [comment:28 syd]:
> For the record: I never meant to walk the entire cwd, only source
directories.
Hmm, what is a "source directory" then? And what is the exact use case for
the feature? I'm a bit lost in this long ticket by now... For anything
non-trivial, most people will probably use cabal or stack, anyway (and
even for trivial stuff it's often quicker to do a "cabal init" or "stack
new" than to fiddle around with epic GHC command lines).
> While I get the general idea of 'never walk directory trees', in the end
that is what you're doing anyway.
Hmmm, unless things have changed, I don't think GHC walks the directory
tree somehow. Trying to open a file in a few(!) directories is a
fundamentally different operation than walking a directory hierarchy. If
you try to open another file a tiny bit later, the OS will probably still
have the relevant parts of the file system in its cache, so somehow your
proposal is moving the caching strategy from the OS to user land,
something which is rarely worthwhile and is tricky to get right and
perform well.
> In directories that only contain the source files, this approach would
only reduce the amount of files opened. [...]
Your proposal actually trades off trying to open several files from
probably OS-cached directories against a single retrieval of a potentially
large directory hierarchy. You probably save a few context switches, but
lose in most other aspects.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11418#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list