[GHC] #9846: GHC --make should also look for .hi, not only for .hs
GHC
ghc-devs at haskell.org
Fri Nov 28 17:49:38 UTC 2014
#9846: GHC --make should also look for .hi, not only for .hs
-------------------------------------+-------------------------------------
Reporter: larsrh | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler | Version:
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
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`
{{{#!hs
module A where
import B
import Library
}}}
`B.hs`
{{{#!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 [https://www.haskell.org/pipermail/glasgow-haskell-
users/2014-November/025476.html glasgow-haskell-users], Simon proposed
relaxing this constraint; namely: In `--make` mode, when encountering an
import `X`, GHC will try the following in order:
1. resolve the import from a package
2. search the include path for `X.hs` or `X.lhs`
3. search the include path for `X.hi`
It already does 1 and 2, and this proposal would add 3.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9846>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list