-working-dir flag ignored for C files
It seems that the -working-dir
flag does not work correctly when C files are involved (or presumably other non-Haskell source files).
Example:
-- dir/Main.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Main where
foreign import ccall "hello"
hello :: IO ()
main :: IO ()
main = hello
// dir/Aux.c
#include <stdio.h>
void hello() {
printf("hi");
}
> ghc -working-dir dir Main.hs Aux.c
<command line>: does not exist: Aux.c
> cd dir && ghc Main.hs Aux.c
... works fine
Edited by sheaf