Promotion: adding NPM deployment for GHC and Cabal
Motivation
To increase the community it would be nice to have ergonomic integration into existing package systems of supported backends. NPM is a natural choice to make happen WASM and JavaScript backends get installed by newcomers from nodejs ecosystem.
npm install -g ghc cabal
could earn us better integration with targeted platforms.
Proposal
While we are spending efforts on alternative backends for GHC like WASM and JavaScript it would be nice to make a pipeline for distribution precompiled versions of WASM and JavaScript backends at NPM.
We could it like Google Closure compiler does: prepare builds for different platforms where Nodejs exists: Linux, Windows, MacOS, others and select right distribution to install into NPM at the packages installation stage of NPM packages.
To make it happen we need do the following:
- Register a namespace at NPM. Something like
@ghc
. - Create
package.json
for Cabal and GHC to make them distributable in NPM. - Setup building pipelines for WASM and JavaScript backends to supported platforms by NPM.
- Create javascript wrappers for the compiler and package manager (Cabal) to make them accessible for other published NPM tools like Webpack.