stack-fix: Console program used to fix Stack build errors automatically

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Stack fix works by running `stack build` and by parsing and interpreting the build errors/suggestions it applies any build fixes required to the stack.yaml, .cabal, etc. These fixes usually involve specifying build dependencies versions or adding new build dependencies.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.12.0.0 && <4.13), options (==1.2.1.1), text (==1.2.3.1), turtle (==1.5.14) [details]
License AGPL-3.0-only
Author Răzvan Flavius Panda
Maintainer razvan.panda@gmail.com
Category Development
Home page https://github.com/razvan-panda/haskell-stack-fix
Source repo head: git clone https://github.com/razvan-panda/haskell-stack-fix.git
Uploaded by freeman42x at 2019-08-27T13:59:09Z

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for stack-fix-0.1.0.0

[back to package description]

Haskell Stack Fix

Console program used to fix Stack build errors automatically

How it works

Stack fix works by running stack build and by parsing and interpreting the build errors/suggestions it applies any build fixes required to the stack.yaml, .cabal, etc. These fixes usually involve specifying build dependencies versions or adding new build dependencies.

To use stack-fix:

Contributing

To contribute:

Project roadmap kanban board: https://github.com/razvan-panda/haskell-stack-fix/projects/1

Setting up operating system

Windows

We do not support building the project on Windows since many Haskell packages have issues building on Windows.

If you are a Windows user the recommended method is to use WSL or a Linux VMWare virtual machine for your development. The virtual machine option is preffered over WSL since WSL is currently much slower when building stuff than a virtual machine.

Linux or MacOS

The project should build fine on these operating systems.

Setting up build tools

The recommended way to install cabal-install is by using the Nix package manager.

To install Nix run:

    curl https://nixos.org/nix/install | sh

To install GHC, cabal-install and stack, create the file ~/.nixpkgs/config.nix.

Copy paste this into the file:

let
  config = {
    allowUnfree = true;

    packageOverrides = pkgs: with pkgs;
      let jdk = openjdk11; in rec {
      unstable = import <nixpkgs> { inherit config; };

      all = pkgs.buildEnv {
        name = "all";

        paths = [
          haskell.compiler.ghc864
          haskellPackages.cabal-install
          unstable.haskellPackages.stack
          binutils.bintools # required on WSL
        ];
      };
    };
  };
in config

And run following command to install the packages:

nix-env -i all

Run this to update the cabal pacakges:

cabal v1-update

Setting up your development tools

The recommended editors are Atom and VSCode together with the Haskell IDE Enginer extension.

To install the HIE executable required by the editor extensions via ~/.nixpkgs/config.nix make changes reflected in the following:

let
  all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
  config = {
    allowUnfree = true;

    packageOverrides = pkgs: with pkgs;
      let jdk = openjdk11; in rec {
      unstable = import <nixpkgs> { inherit config; };

      all = pkgs.buildEnv {
        name = "all";

        paths = [
          haskell.compiler.ghc864
          haskellPackages.cabal-install
          unstable.haskellPackages.stack
          binutils.bintools # required on WSL
          (all-hies.selection { selector = p: { inherit (p) ghc864; }; })
        ];
      };
    };
  };
in config

Then install the HIE extension inside Atom or VSCode.

Building the project