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 ability to use a different ghc version other than the ghc build clash #2675

Open
evan0greenup opened this issue Feb 21, 2024 · 2 comments

Comments

@evan0greenup
Copy link

I build ghc via stack build. stack use its own ghc other than system ghc.

As a result, the ghc build clash will not locate in PATH environment variable when clash runs.

Is there any way to overcome this issue? (build flag or other option, which configure the build procedures of clash without alter my system environment)?

@rowanG077
Copy link
Member

rowanG077 commented Feb 21, 2024

I'm not 100% sure if I get what you want to do. In general I think the easiest setup is using the clash-starters or something close to it which I expect should sidestep this issue since it uses the same GHC version for everything.

@DigitalBrains1
Copy link
Member

I agree with Rowan, I think you should generally house your Clash design in a starter project. I am also not 100% sure if this is your question.

That said, for quick one-off tests, I do have this:

$ cat ~/.local/bin/clash-1.8
#!/bin/sh

unset DIR
DIR="$(pwd)"
cd ~/src/clash/clash-one-eight
stack run --cwd "$DIR" clash -- "$@"
$ cat ~/.local/bin/clashi-1.8 
#!/bin/sh

unset DIR
DIR="$(pwd)"
cd ~/src/clash/clash-one-eight
stack run --cwd "$DIR" clashi -- "$@"

It helps me to run a freestanding .hs file with a Clash design. The dir clash-one-eight is just an empty starter project, made with

$ stack new clash-one-eight clash-lang/simple
$ cd clash-one-eight
$ stack build

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

No branches or pull requests

3 participants