diff --git a/.mergify.yml b/.github/.mergify.yml similarity index 100% rename from .mergify.yml rename to .github/.mergify.yml diff --git a/.restyled.yaml b/.github/.restyled.yaml similarity index 100% rename from .restyled.yaml rename to .github/.restyled.yaml diff --git a/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from pull_request_template.md rename to .github/pull_request_template.md diff --git a/cabal.haskell-ci b/.github/workflows/cabal.haskell-ci similarity index 100% rename from cabal.haskell-ci rename to .github/workflows/cabal.haskell-ci diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2a1409cd..9d18baae 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -9,7 +9,7 @@ # # This GitHub workflow config has been generated by a script via # -# haskell-ci 'github' '--config=cabal.haskell-ci' '--copy-fields=all' 'swarm.cabal' +# haskell-ci 'github' '--config=.github/workflows/cabal.haskell-ci' '--copy-fields=all' 'swarm.cabal' # # To regenerate the script (for example after adjusting tested-with) run # @@ -17,9 +17,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20240501 +# version: 0.19.20240708 # -# REGENDATA ("0.19.20240501",["github","--config=cabal.haskell-ci","--copy-fields=all","swarm.cabal"]) +# REGENDATA ("0.19.20240708",["github","--config=.github/workflows/cabal.haskell-ci","--copy-fields=all","swarm.cabal"]) # name: Haskell-CI on: @@ -84,11 +84,10 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -106,7 +105,7 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -165,8 +164,8 @@ jobs: - name: install cabal-docspec run: | mkdir -p $HOME/.cabal/bin - curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz - echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c - + curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz + echo '48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76 cabal-docspec.xz' | sha256sum -c - xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec rm -f cabal-docspec.xz chmod a+x $HOME/.cabal/bin/cabal-docspec @@ -201,7 +200,7 @@ jobs: cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(swarm)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan diff --git a/.gitignore b/.gitignore index 26b34335..fac9463e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ dist-newstyle/ TAGS .vscode/ +!.vscode/cspell.json cabal.project.local hie.yaml diff --git a/cspell.json b/.vscode/cspell.json similarity index 100% rename from cspell.json rename to .vscode/cspell.json diff --git a/scripts/gen/autopopulate-spellchecker.sh b/scripts/gen/autopopulate-spellchecker.sh index d2777db7..b0db5375 100755 --- a/scripts/gen/autopopulate-spellchecker.sh +++ b/scripts/gen/autopopulate-spellchecker.sh @@ -1,15 +1,15 @@ #!/bin/bash -e -cd $(git rev-parse --show-toplevel) +cd "$(git rev-parse --show-toplevel)" DBNAME=hie.sqlite -scripts/gen/hiedb.sh $DBNAME +scripts/gen/hiedb.sh "$DBNAME" WORDS_TMPFILE_UNSORTED=$(mktemp --suffix .words) # First, get all variable names that originate from external packages. # Exclude names that contain symbols other than underscore or apostrophe or do not contain any letters. -sqlite3 $DBNAME "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)) ORDER BY sym" | grep -v "[^[:alnum:]_']" | grep "[[:alpha:]]" > $WORDS_TMPFILE_UNSORTED +sqlite3 "$DBNAME" "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)) ORDER BY sym" | grep -v "[^[:alnum:]_']" | grep "[[:alpha:]]" >"$WORDS_TMPFILE_UNSORTED" # Next, append the individual "conids" extracted from all "modids" that originate from external packages. # See definition of "conid" and "monid" here: @@ -26,19 +26,19 @@ sqlite3 $DBNAME "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM ref # Control # Data # Text -sqlite3 $DBNAME "SELECT DISTINCT mod FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)" | tr '.' '\n' >> $WORDS_TMPFILE_UNSORTED +sqlite3 "$DBNAME" "SELECT DISTINCT mod FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)" | tr '.' '\n' >>"$WORDS_TMPFILE_UNSORTED" WORDS_TMPFILE=$(mktemp --suffix .words) -sort -u $WORDS_TMPFILE_UNSORTED > $WORDS_TMPFILE -rm $WORDS_TMPFILE_UNSORTED +sort -u "$WORDS_TMPFILE_UNSORTED" >"$WORDS_TMPFILE" +rm "$WORDS_TMPFILE_UNSORTED" CSPELL_TMPFILE=$(mktemp --suffix .cspell) -CSPELL_FILEPATH=cspell.json +CSPELL_FILEPATH=.vscode/cspell.json # Now, stuff the sorted list of names into the cspell JSON file word list. -jq '.words = $newWords' --slurpfile newWords <(jq --raw-input --null-input 'inputs' $WORDS_TMPFILE) $CSPELL_FILEPATH > $CSPELL_TMPFILE +jq '.words = $newWords' --slurpfile newWords <(jq --raw-input --null-input 'inputs' "$WORDS_TMPFILE") "$CSPELL_FILEPATH" >"$CSPELL_TMPFILE" # Overwrite the original with the modified version. -mv $CSPELL_TMPFILE $CSPELL_FILEPATH +mv "$CSPELL_TMPFILE" "$CSPELL_FILEPATH" -rm $WORDS_TMPFILE +rm "$WORDS_TMPFILE"