H: ghci: createProcess: runInteractiveProcess: exec: does not exist trying to run examples
skeydan opened this issue · comments
Hi,
could you please help with the following problem?
When calling
H -- -ghci-script nls.H
I get the above error.
I'm on Fedora, so I've used nix for installation, as per the recommendation in the FAQs.
I've installed H locally to ~/.local/bin.
Thank you very much in advance!
Cheers
Sigrid
Thanks for heads up!
I've tried to run setup in the similar environment and that I've found so far:
- In order to run the script the simplest way is to run everything using
stack
.
You need the following command:
~/tmp/HaskellR/examples/nls$ stack --nix \
--stack-yaml ../../stack-ghc-8.0.yaml exec \
H -- -- -ghci-script ../../H/H.ghci -ghci-script nls.H
The options explanation:
-
you need to run it from the examples directory otherwise example will not be able to load library scripts
-
stack --nix
- use nix backed for stack -
--stack-yaml ../../stack-ghc-8.0.yaml
you need this option only if you want to use ghc-8, omit it if default one suite your needs -
exec H
-- executeH
executable from the stack directories -
First
--
- split stack options fromH
options -
Second
--
- splitH
options from ghci options -
-ghci-script ../../H/H.ghci
- load H defaults, really this is included inH
itself, but for some reason
ghci reorders options in a way thatnls.H
is loaded before theH.ghci
so default import doesn't work.
This can be solved rather by loadingH
and then call:load
to load example. I'll try to investigate the issue but I'm not sure that I'll find nice workaround easily -
-ghci-script nls.H
-- run script itself. -
Also script was rather rotted and used pre inline-r-0.8 API, so I've updated the script in #288.
I hope that will be able to unblock you on this task.
Thank you very much, this helps a lot!
In fact it even explains that when, before, I tried with stack exec H (I've added nix: enable to stack.yaml) I got a different error:
[key@key HaskellR]$ stack exec H -- -ghci-script examples/nls/nls.H
Unknown flag: -g
... so this was because I didn't have the -- --, as you explain above.
thx again!