From 9c5f68605aee048a061ea7b4074b59a0a0371c4f Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 22 Sep 2018 08:32:16 -0700 Subject: Update Travis --- .travis.yml | 96 +++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 290b0e0e..cc75b682 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ # This Travis job script has been generated by a script via # -# make_travis_yml_2.hs 'haddock.cabal' +# runghc make_travis_yml_2.hs 'haddock.cabal' # -# For more information, see https://github.com/hvr/multi-ghc-travis +# For more information, see https://github.com/haskell-CI/haskell-ci # language: c sudo: false @@ -24,54 +24,76 @@ before_cache: - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx + - rm -rfv $HOME/.cabal/packages/head.hackage + matrix: include: - compiler: "ghc-8.6.1" # env: TEST=--disable-tests BENCH=--disable-benchmarks addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}} - allow_failures: - - compiler: "ghc-head" - before_install: - - HC=${CC} - - unset CC - - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH - - PKGNAME='haddock' + - HC=${CC} + - HCPKG=${HC/ghc/ghc-pkg} + - unset CC + - ROOTDIR=$(pwd) + - mkdir -p $HOME/.local/bin + - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH" + - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') )) + - echo $HCNUMVER install: - - cabal --version - - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" - - BENCH=${BENCH---enable-benchmarks} - - TEST=${TEST---enable-tests} - - travis_retry cabal update -v - - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config - - rm -fv cabal.project.local - - rm -f cabal.project.freeze - - travis_retry cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 --allow-newer --constraint 'setup.Cabal installed' all - - travis_retry cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 --allow-newer --constraint 'setup.Cabal installed' all + - cabal --version + - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" + - BENCH=${BENCH---enable-benchmarks} + - TEST=${TEST---enable-tests} + - HADDOCK=${HADDOCK-true} + - UNCONSTRAINED=${UNCONSTRAINED-true} + - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false} + - GHCHEAD=${GHCHEAD-false} + - travis_retry cabal update -v + - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config" + - rm -fv cabal.project cabal.project.local + - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$' + - "printf 'packages: \".\"\\n' > cabal.project" + - touch cabal.project.local + - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- haddock | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" + - cat cabal.project || true + - cat cabal.project.local || true + - if [ -f "./configure.ac" ]; then + (cd "." && autoreconf -i); + fi + - rm -f cabal.project.freeze + - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all + - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all + - rm -rf .ghc.environment.* "."/dist + - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) # Here starts the actual work to be performed for the package under test; # any command which exits with a non-zero exit code causes the build to fail. script: - - if [ -f configure.ac ]; then autoreconf -i; fi - - rm -rf dist/ - - cabal sdist # test that a source-distribution can be generated - - cd dist/ - - SRCTAR=(${PKGNAME}-*.tar.gz) - - SRC_BASENAME="${SRCTAR/%.tar.gz}" - - tar -xvf "./$SRC_BASENAME.tar.gz" - - cd "$SRC_BASENAME/" -## from here on, CWD is inside the extracted source-tarball - - rm -fv cabal.project.local - # this builds all libraries and executables (without tests/benchmarks) - - rm -f cabal.project.freeze - - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --allow-newer --constraint 'setup.Cabal installed' all - # this builds all libraries and executables (including tests/benchmarks) - # - rm -rf ./dist-newstyle + # test that source-distributions can be generated + - (cd "." && cabal sdist) + - mv "."/dist/haddock-*.tar.gz ${DISTDIR}/ + - cd ${DISTDIR} || false + - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; + - "printf 'packages: haddock-*/*.cabal\\n' > cabal.project" + - touch cabal.project.local + - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- haddock | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" + - cat cabal.project || true + - cat cabal.project.local || true + # this builds all libraries and executables (without tests/benchmarks) + - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all + + # build & run tests, build benchmarks + - cabal new-build -w ${HC} ${TEST} ${BENCH} all + - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi + + # cabal check + - (cd haddock-* && cabal check) - # build & run tests - - cabal new-build -w ${HC} ${TEST} ${BENCH} --allow-newer --constraint 'setup.Cabal installed' all - - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} --allow-newer --constraint 'setup.Cabal installed' all; fi + # Build without installed constraints for packages in global-db + - if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi +# REGENDATA ["haddock.cabal"] # EOF -- cgit v1.2.3 From 20623767951d24e96985d817f798f7fddb1f5c60 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 22 Sep 2018 09:33:39 -0700 Subject: Accept failing tests Also silence orphan warnings. --- haddock-test/src/Test/Haddock/Xhtml.hs | 3 +-- hoogle-test/ref/Bug722/test.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/haddock-test/src/Test/Haddock/Xhtml.hs b/haddock-test/src/Test/Haddock/Xhtml.hs index 69361f7c..8bfc973f 100644 --- a/haddock-test/src/Test/Haddock/Xhtml.hs +++ b/haddock-test/src/Test/Haddock/Xhtml.hs @@ -1,6 +1,6 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StandaloneDeriving #-} - +{-# OPTIONS_GHC -fno-warn-orphans #-} module Test.Haddock.Xhtml ( Xml(..) @@ -22,7 +22,6 @@ newtype Xml = Xml } deriving Eq --- TODO: Find a way to avoid warning about orphan instances. deriving instance Eq Element deriving instance Eq Content deriving instance Eq CData diff --git a/hoogle-test/ref/Bug722/test.txt b/hoogle-test/ref/Bug722/test.txt index 96f3747b..2f44ed8f 100644 --- a/hoogle-test/ref/Bug722/test.txt +++ b/hoogle-test/ref/Bug722/test.txt @@ -8,7 +8,7 @@ module Bug722 class Foo a (!@#) :: Foo a => a -> a -> a infixl 4 !@# -type family &* :: * -> * -> * +type family (&*) :: * -> * -> * infixr 3 &* data a :-& b (:^&) :: a -> b -> (:-&) a b -- cgit v1.2.3 From fb1db8f48ec97bdb26cac129c582913870e3d1bf Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 22 Sep 2018 09:41:23 -0700 Subject: Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README --- CHANGES.md | 12 ++++++++---- README.md | 6 +++--- haddock-api/haddock-api.cabal | 12 ++++++------ haddock-library/CHANGES.md | 4 ++++ haddock-library/haddock-library.cabal | 4 ++-- haddock.cabal | 10 +++++----- 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d9ddab54..ee19ae3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,17 @@ -## TBD / GHC-8.5+ +## Changes in version 2.21.0 * Overhaul handling of data declarations in XHTML and LaTeX. Adds support for documenting individual arguments of constructors/patterns (#709) -## Changes in version 2.20.0 + * Actually list all fixities for `--hoogle` (#871) + + * Fix broken instance source links (#869) -TODO + * Avoiding line breaks due to ling line in the output of `--hoogle` (#868) -## Changes in version 2.19.1 + * Capture docs on type family instances (#867) + +## Changes in version 2.20.0 * Show where instances are defined (#748) diff --git a/README.md b/README.md index 51642aab..38354996 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Haddock, a Haskell Documentation Tool [![Build Status](https://travis-ci.org/haskell/haddock.svg?branch=master)](https://travis-ci.org/haskell/haddock) +# Haddock, a Haskell Documentation Tool [![Build Status](https://travis-ci.org/haskell/haddock.svg?branch=ghc-8.6)](https://travis-ci.org/haskell/haddock) ## About haddock @@ -57,9 +57,9 @@ and then proceed using your favourite build tool. #### Using [`cabal new-build`](http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html) ```bash -cabal new-build -w ghc-8.4.1 +cabal new-build -w ghc-8.6.1 # build & run the test suite -cabal new-test -w ghc-8.4.1 all +cabal new-test -w ghc-8.6.1 all ``` #### Using Cabal sandboxes diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index e1a52824..fa14eb50 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -1,13 +1,13 @@ cabal-version: 2.0 name: haddock-api -version: 2.20.0 +version: 2.21.0 synopsis: A documentation-generation tool for Haskell libraries description: Haddock is a documentation-generation tool for Haskell libraries license: BSD3 license-file: LICENSE author: Simon Marlow, David Waern -maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk +maintainer: Alec Theriault , Alex Biehl , Simon Hengel , Mateusz Kowalczyk homepage: http://www.haskell.org/haddock/ bug-reports: https://github.com/haskell/haddock/issues copyright: (c) Simon Marlow, David Waern @@ -41,10 +41,10 @@ library -- this package typically supports only single major versions build-depends: base ^>= 4.12.0 - , Cabal ^>= 2.3.0 + , Cabal ^>= 2.4.0 , ghc ^>= 8.6 , ghc-paths ^>= 0.1.0.9 - , haddock-library ^>= 1.6.0 + , haddock-library ^>= 1.7.0 , xhtml ^>= 3000.2.2 -- Versions for the dependencies below are transitively pinned by @@ -166,10 +166,10 @@ test-suite spec Haddock.Backends.Hyperlinker.Parser Haddock.Backends.Hyperlinker.Types - build-depends: Cabal ^>= 2.3 + build-depends: Cabal ^>= 2.4 , ghc ^>= 8.6 , ghc-paths ^>= 0.1.0.9 - , haddock-library ^>= 1.6.0 + , haddock-library ^>= 1.7.0 , xhtml ^>= 3000.2.2 , hspec >= 2.4.4 && < 2.6 , QuickCheck ^>= 2.11 diff --git a/haddock-library/CHANGES.md b/haddock-library/CHANGES.md index e41b8087..ec30a4d3 100644 --- a/haddock-library/CHANGES.md +++ b/haddock-library/CHANGES.md @@ -1,3 +1,7 @@ +## Changes in version 1.7.0 + + * Replace `attoparsec` with `parsec` (#799) + ## Changes in version 1.6.0 * `MetaDoc` stores package name for since annotations diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal index 1fc3f772..820a36ad 100644 --- a/haddock-library/haddock-library.cabal +++ b/haddock-library/haddock-library.cabal @@ -1,6 +1,6 @@ cabal-version: 2.0 name: haddock-library -version: 1.6.0 +version: 1.7.0 synopsis: Library exposing some functionality of Haddock. description: Haddock is a documentation-generation tool for Haskell libraries. These modules expose some functionality of it @@ -10,7 +10,7 @@ description: Haddock is a documentation-generation tool for Haskell itself, see the ‘haddock’ package. license: BSD3 license-files: LICENSE -maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk +maintainer: Alec Theriault , Alex Biehl , Simon Hengel , Mateusz Kowalczyk homepage: http://www.haskell.org/haddock/ bug-reports: https://github.com/haskell/haddock/issues category: Documentation diff --git a/haddock.cabal b/haddock.cabal index 29d3d114..1c84562d 100644 --- a/haddock.cabal +++ b/haddock.cabal @@ -1,6 +1,6 @@ cabal-version: 2.0 name: haddock -version: 2.20.0 +version: 2.21.0 synopsis: A documentation-generation tool for Haskell libraries description: This is Haddock, a tool for automatically generating documentation @@ -23,17 +23,17 @@ description: without any documentation annotations, Haddock can generate useful documentation from your source code. . - <> + <> license: BSD3 license-file: LICENSE author: Simon Marlow, David Waern -maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk +maintainer: Alec Theriault , Alex Biehl , Simon Hengel , Mateusz Kowalczyk homepage: http://www.haskell.org/haddock/ bug-reports: https://github.com/haskell/haddock/issues copyright: (c) Simon Marlow, David Waern category: Documentation build-type: Simple -tested-with: GHC==8.4.* +tested-with: GHC==8.6.* extra-source-files: CHANGES.md @@ -142,7 +142,7 @@ executable haddock else -- in order for haddock's advertised version number to have proper meaning, -- we pin down to a single haddock-api version. - build-depends: haddock-api == 2.20.0 + build-depends: haddock-api == 2.21.0 test-suite html-test type: exitcode-stdio-1.0 -- cgit v1.2.3 From 246905efb043ca1aec041defe77b2cfa2cbcda92 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 22 Sep 2018 10:53:31 -0700 Subject: Turn haddock-library into a minor release Fix some version bounds in haddock-library too. --- haddock-api/haddock-api.cabal | 4 ++-- haddock-library/CHANGES.md | 2 +- haddock-library/haddock-library.cabal | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index fa14eb50..384b5794 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -44,7 +44,7 @@ library , Cabal ^>= 2.4.0 , ghc ^>= 8.6 , ghc-paths ^>= 0.1.0.9 - , haddock-library ^>= 1.7.0 + , haddock-library ^>= 1.6.1 , xhtml ^>= 3000.2.2 -- Versions for the dependencies below are transitively pinned by @@ -169,7 +169,7 @@ test-suite spec build-depends: Cabal ^>= 2.4 , ghc ^>= 8.6 , ghc-paths ^>= 0.1.0.9 - , haddock-library ^>= 1.7.0 + , haddock-library ^>= 1.6.1 , xhtml ^>= 3000.2.2 , hspec >= 2.4.4 && < 2.6 , QuickCheck ^>= 2.11 diff --git a/haddock-library/CHANGES.md b/haddock-library/CHANGES.md index ec30a4d3..c62edd85 100644 --- a/haddock-library/CHANGES.md +++ b/haddock-library/CHANGES.md @@ -1,4 +1,4 @@ -## Changes in version 1.7.0 +## Changes in version 1.6.1 * Replace `attoparsec` with `parsec` (#799) diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal index 820a36ad..195d409e 100644 --- a/haddock-library/haddock-library.cabal +++ b/haddock-library/haddock-library.cabal @@ -1,6 +1,6 @@ cabal-version: 2.0 name: haddock-library -version: 1.7.0 +version: 1.6.1 synopsis: Library exposing some functionality of Haddock. description: Haddock is a documentation-generation tool for Haskell libraries. These modules expose some functionality of it @@ -71,7 +71,7 @@ test-suite spec Documentation.Haddock.Utf8Spec build-depends: - base >= 4.5 && < 4.12 + base >= 4.5 && < 4.13 , base-compat >= 0.9.3 && < 0.11 , bytestring >= 0.9.2.1 && < 0.11 , containers >= 0.4.2.1 && < 0.7 @@ -91,8 +91,9 @@ test-suite fixtures main-is: Fixtures.hs ghc-options: -Wall -O0 hs-source-dirs: fixtures + buildable: False build-depends: - base >= 4.5 && < 4.12 + base >= 4.5 && < 4.13 , base-compat >= 0.9.3 && < 0.11 , directory ^>= 1.3.0.2 , filepath ^>= 1.4.1.2 -- cgit v1.2.3 From 7873f4c1011c5ab61ab050399a129d48b54b3491 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Sat, 22 Sep 2018 11:42:54 -0700 Subject: keep cabal.project file --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc75b682..681399b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,9 +53,8 @@ install: - GHCHEAD=${GHCHEAD-false} - travis_retry cabal update -v - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config" - - rm -fv cabal.project cabal.project.local + - rm -fv cabal.project.local - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$' - - "printf 'packages: \".\"\\n' > cabal.project" - touch cabal.project.local - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- haddock | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" - cat cabal.project || true @@ -72,14 +71,6 @@ install: # Here starts the actual work to be performed for the package under test; # any command which exits with a non-zero exit code causes the build to fail. script: - # test that source-distributions can be generated - - (cd "." && cabal sdist) - - mv "."/dist/haddock-*.tar.gz ${DISTDIR}/ - - cd ${DISTDIR} || false - - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; - - "printf 'packages: haddock-*/*.cabal\\n' > cabal.project" - - touch cabal.project.local - - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- haddock | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" - cat cabal.project || true - cat cabal.project.local || true # this builds all libraries and executables (without tests/benchmarks) @@ -90,7 +81,7 @@ script: - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi # cabal check - - (cd haddock-* && cabal check) + - cabal check # Build without installed constraints for packages in global-db - if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi -- cgit v1.2.3 From d6b47bbb8bfb88fcf0900fa33376131b5d8e1e6b Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Tue, 16 Oct 2018 09:36:30 -0700 Subject: Build on 7.4 and 7.8 --- haddock-library/src/Documentation/Haddock/Parser/Monad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haddock-library/src/Documentation/Haddock/Parser/Monad.hs b/haddock-library/src/Documentation/Haddock/Parser/Monad.hs index 585c76bb..a5664aa8 100644 --- a/haddock-library/src/Documentation/Haddock/Parser/Monad.hs +++ b/haddock-library/src/Documentation/Haddock/Parser/Monad.hs @@ -17,6 +17,7 @@ import Data.String ( IsString(..) ) import Data.Bits ( Bits(..) ) import Data.Char ( ord ) import Data.List ( foldl' ) +import Control.Applicative as App import Documentation.Haddock.Types ( Version ) @@ -52,7 +53,7 @@ peekChar' = Parsec.lookAhead Parsec.anyChar -- | Parses the given string. Returns the parsed string. string :: Text -> Parser Text -string t = Parsec.string (T.unpack t) *> pure t +string t = Parsec.string (T.unpack t) *> App.pure t -- | Scan the input text, accumulating characters as long as the scanning -- function returns true. -- cgit v1.2.3 From b90465ac987600d09d0f9b9b5afee077925bda06 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Tue, 16 Oct 2018 18:45:52 +0200 Subject: Minor tweak to package description --- haddock-library/haddock-library.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal index 195d409e..74c928b2 100644 --- a/haddock-library/haddock-library.cabal +++ b/haddock-library/haddock-library.cabal @@ -6,8 +6,8 @@ description: Haddock is a documentation-generation tool for Haskell libraries. These modules expose some functionality of it without pulling in the GHC dependency. Please note that the API is likely to change so specify upper bounds in your - project if you can't release often. For interacting with Haddock - itself, see the ‘haddock’ package. + project. For interacting with Haddock + itself, see the [haddock package](https://hackage.haskell.org/package/haddock). license: BSD3 license-files: LICENSE maintainer: Alec Theriault , Alex Biehl , Simon Hengel , Mateusz Kowalczyk -- cgit v1.2.3