dmgolubovsky / yhc

Automatically exported from code.google.com/p/yhc
0 stars 0 forks source link

yhi is missing a searchpath option #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
The following session illustrates the problem:
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ find .
.
./searchpath1.txt
./sub
./sub/sub
./sub/T2.hs
./T1.hs
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ cat T1.hs
-- T1.hs: Yhc test program
module Main where
  import T2
  g = f . f
  main = putStr ( "Hello Yhc: g 7 = " ++ show ( g 7 ) ++ "\n" )
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ cat sub/T2.hs
-- T2.hs: Another Yhc test program
module T2 where
  f x = x + 1
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ yhc -i sub T1
Compiling T2               ( sub/T2.hs )
Compiling Main             ( T1.hs )
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ find .
.
./Main.hbc
./searchpath1.txt
./sub
./sub/Main.hi
./sub/sub
./sub/sub/T2.hi
./sub/T2.hbc
./sub/T2.hs
./T1.hs
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ yhi Main
ERROR: couldn't find module named 'T2'
tried:
        T2.hbc
        /Users/thorkilnaur/tn/buildbot/Yhc/macosxppc3/macosxppc3/build/inst/lib/yhc/
packages/yhc-base/1.0/T2.hbc
Thorkil-Naurs-Computer:~/tn/test/Yhc/searchpath thorkilnaur$ 

What is the expected output? What do you see instead?
I would expect to be able to specify a searchpath (list of directories) for yhi 
to use to look for my 
compiled modules. There are, of course, a number of easy work-arounds for this 
problem, but I 
still believe that yhi should have a searchpath option to match the yhc "-I 
-includes str" option.

Original issue reported on code.google.com by thorkiln...@gmail.com on 24 Feb 2007 at 9:50