Open evan0greenup opened 7 months ago
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.
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
I build ghc via
stack build
.stack
use its ownghc
other than systemghc
.As a result, the
ghc
buildclash
will not locate inPATH
environment variable whenclash
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)?