filepath

Claus Reinke claus.reinke at talk21.com
Sun Dec 9 13:11:13 EST 2007


> The first is this:
>    Prelude System.FilePath> "." </> "foo"
>    "./foo"
> which means we get things like
>    [2 of 2] Compiling GHC.Foo          ( ./GHC/Foo.hs, ./GHC/Foo.o )
> rather than
>    [2 of 2] Compiling GHC.Foo          ( GHC/Foo.hs, GHC/Foo.o )
> Is there a reason the result shouldn't be "foo"?

./foo and foo are not interchangeable:

$ cat >s
#!/bin/sh
echo "hi"
$ s
bash: s: command not found
$ ./s
bash: ./s: Permission denied
$ chmod +x s
$ s
bash: s: command not found
$ ./s
hi

claus





More information about the Libraries mailing list