
I suppose that if --make found Foo.hi, but no Foo.hs, it could simply use the Foo.hi. That would do strictly more than now. I don't know if there would be any disadvantages. Augmenting --make's semantics sounds better to me than inventing a new compilation mode. Maybe a feature request ticket. Then if people like it maybe someone can implement it. Simon | -----Original Message----- | From: Glasgow-haskell-users [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Lars Hupel | Sent: 28 November 2014 16:26 | To: Simon Peyton Jones | Cc: glasgow-haskell-users@haskell.org | Subject: Re: Discovery of source dependencies without --make | | > How does that differ from ghc --make? The only difference I can see | is that | > - Modules that --make might find, but not listed on | > the command line, would not be compiled by --topo-sort | | "--make" always requires a full view on all sources. That is, any | imports which cannot be resolved from the package database are assumed | to exist as source files. Imagine the following situation: | | A.hs | > module A where | > | > import B | > import Library | | B.hs | > module B where | | If I compile these two with "--make", it also needs "Library.hs" as | input. If I compile them without "--make", it just needs the interface | ("Library.hi") as additional input. | | Concretely, assuming that only "path/Library.hi" exists, this fails: | | ghc -c -ipath --make A.hs B.hs | | In contrast to that, I propose that this should work: | | ghc -c -ipath --topo-sort A.hs B.hs | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users