Open hyperfekt opened 4 years ago
Currently extra-directories are not yet implemented since I could not find a corresponding flag for GHC, and trying to use it with Digital Asset's ghcide will fail due to https://github.com/digital-asset/ghcide/issues/551.
I've thought about this and while I could add flags to add extra-directories as all kinds of different flags GHC offers for specifying search paths for different kinds of files, this would still not cover all uses (for example Template Haskell as used in Snack itself). The real solution would be to have hie-bios ask on behalf of its dependents for directories to add to the PATH for a session, or for GHC to add a flag to add directories to the PATH (which would also need to be reflected in its API). A workaround would be to add all those directories to the PATH of hie-bios dependents like it is done for GHCi by Snack right now, which of course has the problem of collisions between files in extra-directories in different packages. Another option would be to allow extra-directories only in the root project (or even get rid of it entirely, in which case TH would have to call out to Nix I guess?) so that collisions are not a possibility.
I implemented shell commands for hie-bios so maybe this command should not be hie-bios specific, and output the flags to stdout instead, and the shell command can be used to pipe that into the file required by hie-bios.
This adds support for hie-bios. Since hie-bios can't call a program with arguments (https://github.com/mpickering/hie-bios/issues/158), the following files are needed in the project:
hie.yaml
:.hie-bios
:Closes #178.