stack new hello-world fails with
Could not parse '/home/m/.stack/config.yaml':
AesonException "failed to parse field 'params': when expecting a Text, encountered Number instead"
See http://docs.haskellstack.org/en/stable/yaml_configuration.html.
When my config.yaml looks like
templates:
params:
author-email: 415fox@gmail.com
author-name: michael fox
category: Application
copyright: copytright michael fox 2016
github-username: gitfoxi
year: 2016
Works fine if I change the year line to:
I think it's pretty clear what's going on here, but the documentation at http://docs.haskellstack.org/en/stable/yaml_configuration/ doesn't mention the year parameter. I learn about from when I run stack new with a blank config.yaml. It says:
Downloading template "new-template" to create project "hello-world" in hello-world/ ...
The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username, year
You can provide them in /home/m/.stack/config.yaml, like this:
templates:
params:
author-email: value
author-name: value
category: value
copyright: value
github-username: value
year: value
I think it could be fixed by requiring that year be a string instead of a value or by coercing whatever value happens to be to a string using Aeson's encode function.
stack new hello-worldfails withWhen my
config.yamllooks likeWorks fine if I change the year line to:
I think it's pretty clear what's going on here, but the documentation at http://docs.haskellstack.org/en/stable/yaml_configuration/ doesn't mention the
yearparameter. I learn about from when I runstack newwith a blankconfig.yaml. It says:I think it could be fixed by requiring that
yearbe astringinstead of avalueor by coercing whatevervaluehappens to be to a string using Aeson's encode function.