From 56af824c911c79c508f51103bc3134f98a2133e0 Mon Sep 17 00:00:00 2001 From: Hécate Moonlight Date: Tue, 21 Jun 2022 17:21:08 +0200 Subject: Update the contribution guide --- CONTRIBUTING.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25b7a002..4435252a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,16 +36,13 @@ cd haddock ### Git Branches -For improvements to the documentation generator, -please base your pull request on the latest GHC version branch -(`ghc-9.2` for instance). +Pull requests are to be opened against the `main` branch, from which are forked +GHC-specific branches (like `ghc-9.2`, `ghc-9.4`, etc). ### Building the packages #### Using `cabal` -Requires cabal `>= 3.4` and GHC `== 9.2`: - First update the package list: ```bash @@ -60,7 +57,7 @@ cabal v2-build all --enable-tests cabal v2-test all ``` -### Updating golden testsuite outputs +### Updating golden test suite outputs If you've changed Haddock's output, you will probably need to accept the new output of Haddock's golden test suites (`html-test`, `latex-test`, @@ -72,6 +69,5 @@ cabal v2-test html-test latex-test hoogle-test hypsrc-test \ --test-option='--accept' ``` - [SSCCE]: http://sscce.org/ [CoC]: ./CODE_OF_CONDUCT.md -- cgit v1.2.3 From 677884577dee1cb51772d9bc21cc69f11f48af34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 23:38:19 +0200 Subject: Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- haddock-api/resources/html/package-lock.json | 64 ++++------------------------ 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/haddock-api/resources/html/package-lock.json b/haddock-api/resources/html/package-lock.json index 638b5dd8..cd63cad8 100644 --- a/haddock-api/resources/html/package-lock.json +++ b/haddock-api/resources/html/package-lock.json @@ -247,12 +247,6 @@ "node": ">=0.10.0" } }, - "node_modules/array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, "node_modules/array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -296,18 +290,6 @@ "node": ">=0.10.0" } }, - "node_modules/array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "node_modules/array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, "node_modules/array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", @@ -4386,16 +4368,10 @@ } }, "node_modules/shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "dependencies": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true }, "node_modules/simple-concat": { "version": "1.0.0", @@ -5810,12 +5786,6 @@ "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -5851,18 +5821,6 @@ } } }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", @@ -9329,16 +9287,10 @@ } }, "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true }, "simple-concat": { "version": "1.0.0", -- cgit v1.2.3 From 06b1f629a9210f9d92dea1cc6111087181c688ff Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sat, 16 Jul 2022 16:54:26 -0400 Subject: Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. --- .github/workflows/hlint-ci.yml | 2 +- .hlint.yaml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/hlint-ci.yml b/.github/workflows/hlint-ci.yml index 692d03e8..7009e739 100644 --- a/.github/workflows/hlint-ci.yml +++ b/.github/workflows/hlint-ci.yml @@ -17,7 +17,7 @@ jobs: - uses: rwe/actions-hlint-setup@v1 name: Set up HLint with: - version: "3.3.6" + version: "3.4.1" - uses: rwe/actions-hlint-run@v2 name: hlint diff --git a/.hlint.yaml b/.hlint.yaml index 5c50629f..ea61bf90 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -20,10 +20,10 @@ - ignore: {name: "Redundant return"} # 1 hint - ignore: {name: "Replace case with fromMaybe"} # 2 hints - ignore: {name: "Replace case with maybe"} # 4 hints -- ignore: {name: "Unused LANGUAGE pragma"} # 10 hints +- ignore: {name: "Unused LANGUAGE pragma"} # 11 hints - ignore: {name: "Use $>"} # 4 hints - ignore: {name: "Use ++"} # 3 hints -- ignore: {name: "Use :"} # 3 hints +- ignore: {name: "Use :"} # 4 hints - ignore: {name: "Use <$>"} # 12 hints - ignore: {name: "Use <&>"} # 1 hint - ignore: {name: "Use <|>"} # 1 hint @@ -34,12 +34,11 @@ - ignore: {name: "Use concatMap"} # 1 hint - ignore: {name: "Use const"} # 4 hints - ignore: {name: "Use fewer LANGUAGE pragmas"} # 1 hint -- ignore: {name: "Use fewer imports"} # 1 hint - ignore: {name: "Use find"} # 1 hint - ignore: {name: "Use fmap"} # 12 hints - ignore: {name: "Use foldr"} # 1 hint - ignore: {name: "Use fromMaybe"} # 2 hints -- ignore: {name: "Use infix"} # 2 hints +- ignore: {name: "Use infix"} # 3 hints - ignore: {name: "Use intercalate"} # 1 hint - ignore: {name: "Use isAsciiLower"} # 1 hint - ignore: {name: "Use isAsciiUpper"} # 1 hint @@ -54,11 +53,11 @@ - ignore: {name: "Use notElem"} # 2 hints - ignore: {name: "Use print"} # 3 hints - ignore: {name: "Use record patterns"} # 5 hints +- ignore: {name: "Use second"} # 3 hints - ignore: {name: "Use sortOn"} # 3 hints -- ignore: {name: "Use tuple-section"} # 2 hints +- ignore: {name: "Use tuple-section"} # 3 hints - ignore: {name: "Use unless"} # 1 hint - ignore: {name: "Use void"} # 1 hint -- ignore: {name: "Use second"} # 3 hints # Module names (not all unique) where CPP can be used - extensions: - name: CPP -- cgit v1.2.3 From 90c38242e54d1a742426e2b1b3c7d71e226811bd Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 19 Jul 2022 03:32:55 -0400 Subject: Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. --- .hlint.yaml | 4 +++- haddock-api/src/Haddock.hs | 1 - hoogle-test/src/Bug806/Bug806.hs | 1 - html-test/src/BundledPatterns2.hs | 3 +-- html-test/src/DefaultAssociatedTypes.hs | 2 +- html-test/src/GadtConstructorArgs.hs | 2 +- html-test/src/Operators.hs | 2 +- html-test/src/QuasiQuote.hs | 2 +- latex-test/src/GadtConstructorArgs/GadtConstructorArgs.hs | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.hlint.yaml b/.hlint.yaml index ea61bf90..4a0c8ddc 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -20,7 +20,6 @@ - ignore: {name: "Redundant return"} # 1 hint - ignore: {name: "Replace case with fromMaybe"} # 2 hints - ignore: {name: "Replace case with maybe"} # 4 hints -- ignore: {name: "Unused LANGUAGE pragma"} # 11 hints - ignore: {name: "Use $>"} # 4 hints - ignore: {name: "Use ++"} # 3 hints - ignore: {name: "Use :"} # 4 hints @@ -58,6 +57,9 @@ - ignore: {name: "Use tuple-section"} # 3 hints - ignore: {name: "Use unless"} # 1 hint - ignore: {name: "Use void"} # 1 hint +# Ignore within modules where following hlint or adding an HLint annotation +# would alter the expected test output. +- ignore: {name: "Unused LANGUAGE pragma", within: [QuasiExpr, TH, Ticket112]} # Module names (not all unique) where CPP can be used - extensions: - name: CPP diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index 664168f1..7eba7b92 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -4,7 +4,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | diff --git a/hoogle-test/src/Bug806/Bug806.hs b/hoogle-test/src/Bug806/Bug806.hs index 6deb98c1..f2a9a099 100644 --- a/hoogle-test/src/Bug806/Bug806.hs +++ b/hoogle-test/src/Bug806/Bug806.hs @@ -1,5 +1,4 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Bug806 where diff --git a/html-test/src/BundledPatterns2.hs b/html-test/src/BundledPatterns2.hs index c4123535..6f1b61f5 100644 --- a/html-test/src/BundledPatterns2.hs +++ b/html-test/src/BundledPatterns2.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE DataKinds, GADTs, KindSignatures, PatternSynonyms, TypeOperators, - ViewPatterns #-} +{-# LANGUAGE DataKinds, GADTs, KindSignatures, PatternSynonyms #-} module BundledPatterns2 (Vec((:>), Empty), RTree(..)) where import GHC.TypeLits diff --git a/html-test/src/DefaultAssociatedTypes.hs b/html-test/src/DefaultAssociatedTypes.hs index 340742d3..68a587ef 100644 --- a/html-test/src/DefaultAssociatedTypes.hs +++ b/html-test/src/DefaultAssociatedTypes.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE DefaultSignatures, TypeFamilies #-} +{-# LANGUAGE TypeFamilies #-} module DefaultAssociatedTypes where diff --git a/html-test/src/GadtConstructorArgs.hs b/html-test/src/GadtConstructorArgs.hs index 6d742bd7..50ff93cc 100644 --- a/html-test/src/GadtConstructorArgs.hs +++ b/html-test/src/GadtConstructorArgs.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE GADTs, PatternSynonyms #-} +{-# LANGUAGE GADTs #-} module GadtConstructorArgs (Boo(..)) where diff --git a/html-test/src/Operators.hs b/html-test/src/Operators.hs index c303c8bd..1d938ba6 100644 --- a/html-test/src/Operators.hs +++ b/html-test/src/Operators.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, MultiParamTypeClasses, GADTs #-} +{-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, GADTs #-} {-# LANGUAGE FunctionalDependencies #-} -- | Test operators with or without fixity declarations diff --git a/html-test/src/QuasiQuote.hs b/html-test/src/QuasiQuote.hs index fe900eb8..6cc928cd 100644 --- a/html-test/src/QuasiQuote.hs +++ b/html-test/src/QuasiQuote.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} +{-# LANGUAGE QuasiQuotes #-} -- example taken from the GHC documentation module QuasiQuote where diff --git a/latex-test/src/GadtConstructorArgs/GadtConstructorArgs.hs b/latex-test/src/GadtConstructorArgs/GadtConstructorArgs.hs index 6d742bd7..50ff93cc 100644 --- a/latex-test/src/GadtConstructorArgs/GadtConstructorArgs.hs +++ b/latex-test/src/GadtConstructorArgs/GadtConstructorArgs.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Haskell2010 #-} -{-# LANGUAGE GADTs, PatternSynonyms #-} +{-# LANGUAGE GADTs #-} module GadtConstructorArgs (Boo(..)) where -- cgit v1.2.3