Initializing a new GHCJS project using the Haskell toolkit

What do I need to do to initialize a GHCJS project using Haskell Stack?

Following the glass documentation , I am trying to initialize a GHCJS project so that I can compile Haskell code for JavaScript.

After execution, stack templatesI see that there is a GHCJS template

ghcjs - Haskell to JavaScript compiler, based on GHC

When I try to use a new command with this template, for example:

stack new ghcjsSetup ghcjs

I get this error message:

Downloading template "ghcjs" to create project "ghcjsSetup" in ghcjsSetup/ ...

The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username
You can provide them in /home/u/.stack/config.yaml, like this:
templates:
  params:
    author-email: value
    author-name: value
    category: value
    copyright: value
    github-username: value
Or you can pass each one as parameters like this:
stack new ghcjsSetup ghcjs -p "author-email:value" -p "author-name:value" -p "category:value" -p "copyright:value" -p "github-username:value"

Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ghcjsSetup/ghcjsSetup.cabal

Selecting the best among 11 snapshots...

* Partially matches lts-9.11
    ghcjs-base not found
        - ghcjsSetup requires -any

Downloaded nightly-2017-11-01 build plan.    
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing
+4
source share
1 answer

. , stack. >= 1.5.1. - Cabal ver. 2.0, .

+3

Source: https://habr.com/ru/post/1688627/


All Articles