[Haskell-cafe] problems with stack, config.yaml
hyarion at iinet.net.au
Fri May 26 23:46:15 UTC 2017
On 27 May 2017 9:27:29 am AEST, Dennis Raddle <dennis.raddle at gmail.com> wrote:
>A year ago I tried to install stack on my MacBook. Just recently I
>again, and it asked me if I wanted to upgrade rather than install. I
>so, but got an error (some message from GHC saying 'the thing that
>never happen, happened' or something like that). So I thought, okay let
>try uninstalling stack first, then installing it, and going from there.
>So I did that, and I'm working the stack tutorial, and upon doing
>setup" I got a parse error in config.yaml.
> "Error in $.params: failed to parse field 'params', expected Map k a,
>As far as the question of where I got my config.yaml from, I edited
>something that was there to add some specific information, but I am not
>sure if I changed anything else. Here is the config.yaml that produces
># This file contains default non-project-specific settings for 'stack',
># in all projects. For more information about stack's configuration,
># The following parameters are used by "stack new" to automatically
># in the cabal config. We recommend uncommenting them and filling them
># you intend to use 'stack new'.
> author-email:dennisraddle at gmail.com
The problem is just that the structure of your YAML config file is off, so it doesn't say what you think it says.
Where you have things like "author-name:Dennis" you need a space after the colon for YAML to interpret it as a key value pair in a map. With what you have currently, the whole contents of your "params" section is just one string split over several lines, rather than a map (which is more or less what the error message is reporting).
You can see how YAML interprets your file here: https://yaml-online-parser.appspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe