[Haskell-cafe] GHCi: how to load another file than .ghci ?

Artem Pelenitsyn a.pelenitsyn at gmail.com
Wed Jun 20 14:33:07 UTC 2018

It worked for me on a dummy project, but I may miss something. Maybe, it is
`stack ghci` you want to use, not `stack exec ghci`. But I wasn't able to
convince stack to catch `-ghci-script` for some reason. My best bet was:

stack ghci --ghci-options="-ghci-script ~/my-ghci"

PS You probably want to reply not just to me but to the whole mailing-list,
so that people know that your problem hasn't been resolved.

Best, Artem

On Wed, 20 Jun 2018 at 16:08 PY <aquagnu at gmail.com> wrote:

> strange, because result is different (I got a lot of errors about not
> found modules, etc).
> 20.06.2018 16:21, Artem Pelenitsyn пишет:
> Hello Paul,
> You can supply arguments for commands run by stack like this: stack exec
> In your case the argument you're interested in is -ghci-script. So the
> answer is
> stack exec ghci -- -ghci-script path/to/somefile.txt
> --
> Best wishes, Artem
> On Wed, 20 Jun 2018 at 14:44 PY <aquagnu at gmail.com> wrote:
>> Hello, Cafe! If I have typical .ghci file, but it's called somefile.txt,
>> how to call "stack exec ghci" to load and exec this "somefile.txt" (as
>> it does with ".ghci" usual)?
>> ===
>> Best regards, Paul
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180620/9e838cb0/attachment.html>

More information about the Haskell-Cafe mailing list