The error message is misleading. The script command only allows you to use packages that exist in a snapshot. If you want to include additional packages, reverting to the runghc command is the right approach.

On Mon, Apr 3, 2017 at 7:32 PM, Alexey Egorov <electreg@list.ru> wrote:
So what is preferred way to use packages together with script command?
I'm added all this packages to stack arguments, and now it prints:
> Local packages are not allowed when using the script command


Понедельник, 3 апреля 2017, 21:09 +05:00 от Michael Snoyman <michael@snoyman.com>:


The new script command was explicitly designed to ignore local configuration files to allow for complete reproducibility, which has historically been quite difficult with `runghc`. If instead you _do_ want to respect local config, you should use the previous `runghc` command approach.

On Mon, Apr 3, 2017 at 7:04 PM, Adam Bergmark <adam@bergmark.nl> wrote:
I assumed that would work, but you can also specify the packages on your `-- stack [..]` line in imap.hs

I may be overrlooking something.

HTH,
Adam


On Mon, 3 Apr 2017 at 16:17 Alexey Egorov via Haskell-Cafe <haskell-cafe@haskell.org> wrote:
Hello haskellers,

I'm trying to use stack scripting capabilities, but it gives me an error (and suggestion to fix it by adding some lines to extra-deps in config.yaml).
However, adding this lines to config.yaml doesn't change anything. My script and config are here - https://pastebin.com/PyRMQtqw 

Any help would be appreciated.
_______________________________________________
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.

_______________________________________________
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.