This document describes my setup for working with Haskell on Windows. Notice I don't know much of the intricacies of Windows but it seems I was able to make it work.
It will contain also personal recommendations.
get-haskell-pkg-version() { | |
pkg=$1; version=$2; | |
printf "\e[0;32mIn CHaP\e[0m\n" | |
if [[ $(curl -s -I "https://chap.intersectmbo.org/package/$pkg-$version/" | head -n 1|cut -d$' ' -f2) == "404" ]]; then | |
printf "\t\e[0;31mNot found\e[0m\n" | |
else | |
chap=$(curl -s "https://chap.intersectmbo.org/package/$pkg-$version/") | |
repo=$(echo "$chap" | grep -A4 "Source" | tail -n1 | tr -d ' ' | sed 's_.*">__g' | sed 's_</a>__g') | |
sha=$(echo "$chap" | grep -A1 "Commit hash" | tail -n1 | tr -d ' ' | sed 's_<dd>__g' | sed 's_</dd>__g') | |
printf "\tGit repo: \e[0;32m%s\e[0m\n" "$repo" |
#!/usr/bin/env sh | |
# This script requires difftastic and toml-cli, which can be installed by `cargo install` | |
pkg=$2 | |
version=$3 | |
what_to_do=$1 | |
if [ ! -d _sources/$pkg/$version ]; then | |
echo "Package $pkg and/or version $version doesn't exist" |
#!/usr/bin/env bash | |
# Build and then run the tests with a nicer output than `cabal test` | |
# | |
# Usage: `cabal-test $PKG` where $PKG is either | |
# - `all` | |
# - the name of a package | |
# - a sequence of names of packages | |
# | |
# For example: |
# This has to be parametrized by the compiler version, the project path and the Cabal version | |
# that is being used. Also the relevant packages to the project will change. In this case I | |
# just created an empty dummy project to generate the instructions. | |
# Find ghci script | |
> stack exec -- which ghci | |
/usr/local/bin/ghci | |
# Find ghc script |