Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hie-bios command #199

Closed
wants to merge 3 commits into from
Closed

add hie-bios command #199

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2020

This adds support for hie-bios.
Since hie-bios can't call a program with arguments (haskell/hie-bios#158), the following files are needed in the project:

hie.yaml:

cradle: {bios: {program: ".hie-bios"}}

.hie-bios:

#! /bin/sh
snack hie-bios $@

Closes #178.

@ghost ghost force-pushed the hie-bios branch 2 times, most recently from f11dc93 to dc390ce Compare May 7, 2020 18:21
@ghost
Copy link
Author

ghost commented May 7, 2020

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.

@ghost
Copy link
Author

ghost commented May 9, 2020

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.

@ghost
Copy link
Author

ghost commented May 22, 2020

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.

@ghost ghost force-pushed the hie-bios branch from dc390ce to c3fcbd7 Compare May 30, 2020 02:56
@ghost ghost force-pushed the hie-bios branch from c3fcbd7 to 2044962 Compare May 30, 2020 02:57
@ghost ghost closed this by deleting the head repository Jan 19, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support hie-bios
0 participants