GHC --make should also look for .hi, not only for .hs
Currently, ghc --make will only consider .hs source files from the include path.
Example (assuming Library can't be resolved from the package database):
A.hs
module A where
import B
import Library
B.hs
module B where
Compiling these files with ghc --make -Idir A.hs B.hs will succeed only if GHC finds a Library.hs file.
In a thread on glasgow-haskell-users, Simon proposed relaxing this constraint; namely: In --make mode, when encountering an import X, GHC will try the following in order:
- resolve the import from a package
- search the include path for
X.hsorX.lhs - search the include path for
X.hi
It already does 1 and 2, and this proposal would add 3.
Trac metadata
| Trac field | Value |
|---|---|
| Version | |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |