On 2002.02.18 00:43:48 +0000 Sigbjorn Finne wrote:
> Strange, the following compiles just fine with
> 5.02.1 on a Win2k box:
>
> module Foo where { import Pretty ; x y = y Pretty.$+$ y }
Yep, your quite right. I discovered my problem was to do with search paths.
I had a "Pretty.hs" from the CTK, a version that comes with hugs and the ghc
text package one. I was including the CTK directory and that version was being
used in preference to the text package one.
This I presume is the intended behaviour.
The other thing that bit me was that I wanted to use another version (the one
that comes with hugs), so I put the
"-i../lib/hugs" before the "-i../lib/ctkl"
with the expectation that the version in the hugs directory would be used in
preference to the ctkl version. In fact the order did not matter, and ghc/ghci
always picked the ctkl version, presumably because it was an .hs whereas the
hugs version was an .lhs
So my feature request is to search by directory before by .hs/.lhs
The other thing I came accross which seems to me to be a clear-cut bug is the
dependency generation on this same issue.
Here's the relevent parts from the invocation and results:
dir/file layout:
./src/PrettyPrinter.hs
./lib/hugs/Pretty.lhs
./lib/ctkl/Pretty.hs
command line:
ghc -M -optdep-f -optdep.depend -package text -i../src:../lib/hugs:../lib/ctkl
../lib/hugs/Pretty.lhs ../src/PrettyPrinter.hs {and whole bunch of other files
- but not "../lib/ctkl/Pretty.hs"}
interesting parts of .depend:
../lib/hugs/Pretty.o : ../lib/hugs/Pretty.lhs --as expected
../src/PrettyPrinter.o : ../src/PrettyPrinter.hs
../src/PrettyPrinter.o : ../lib/ctkl/Pretty.hi --huh?
Maybe this is just a result of the same 'sort order' preference, but it seems
(to me at least) to be more glaring here.
Duncan
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs