aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-10-16 15:10:39 -0700
committerAlec Theriault <alec.theriault@gmail.com>2018-10-16 15:14:48 -0700
commit8d27cc1b185dc36424c4e6dfe5c55c6a25c05028 (patch)
tree9aab1f2c94d39867dd9a036adf808b3d2110aa0e
parentb5372b7d86e3058b419076641dd3048258c4ddf2 (diff)
parent41d9846754cdccb82e667ece2f44725ed9cab4e7 (diff)
Merge branch 'ghc-8.6' into ghc-head
-rw-r--r--CHANGES.md16
-rw-r--r--README.md6
-rw-r--r--doc/markup.rst6
-rw-r--r--haddock-api/haddock-api.cabal12
-rw-r--r--haddock-api/src/Haddock.hs11
-rw-r--r--haddock-api/src/Haddock/Interface.hs1
-rw-r--r--haddock-library/CHANGES.md8
-rw-r--r--haddock-library/haddock-library.cabal17
-rw-r--r--haddock-library/src/Documentation/Haddock/Parser/Monad.hs3
-rw-r--r--haddock-test/src/Test/Haddock/Xhtml.hs3
-rw-r--r--haddock.cabal10
11 files changed, 58 insertions, 35 deletions
diff --git a/CHANGES.md b/CHANGES.md
index d9ddab54..66703068 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,13 +1,21 @@
-## TBD / GHC-8.5+
+## TBA
+
+ * Make `--package-version` optional for `--hoogle` (#899)
+
+## 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)
-TODO
+ * Fix broken instance source links (#869)
-## Changes in version 2.19.1
+ * Avoiding line breaks due to ling line in the output of `--hoogle` (#868)
+
+ * 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..978dea3e 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-head)](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-head
# build & run the test suite
-cabal new-test -w ghc-8.4.1 all
+cabal new-test -w ghc-head all
```
#### Using Cabal sandboxes
diff --git a/doc/markup.rst b/doc/markup.rst
index a9878837..4e00f708 100644
--- a/doc/markup.rst
+++ b/doc/markup.rst
@@ -776,14 +776,14 @@ Special Characters
~~~~~~~~~~~~~~~~~~
The following characters have special meanings in documentation
-comments: ``\\``, ``/``, ``'``, ``\```, ``"``, ``@``, ``<``, ``$``. To insert a
+comments: ``\``, ``/``, ``'``, `````, ``"``, ``@``, ``<``, ``$``, ``#``. To insert a
literal occurrence of one of these special characters, precede it with a
-backslash (``\\``).
+backslash (``\``).
Additionally, the character ``>`` has a special meaning at the beginning
of a line, and the following characters have special meanings at the
beginning of a paragraph: ``*``, ``-``. These characters can also be
-escaped using ``\\``.
+escaped using ``\``.
Furthermore, the character sequence ``>>>`` has a special meaning at the
beginning of a line. To escape it, just prefix the characters in the
diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal
index 2cd2c5d9..c262f975 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 <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
+maintainer: Alec Theriault <alec.theriault@gmail.com>, Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
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.7
, 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.7
, 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-api/src/Haddock.hs b/haddock-api/src/Haddock.hs
index d294b612..8c0ae705 100644
--- a/haddock-api/src/Haddock.hs
+++ b/haddock-api/src/Haddock.hs
@@ -48,6 +48,7 @@ import Control.Exception
import Data.Maybe
import Data.IORef
import Data.Map (Map)
+import Data.Version (makeVersion)
import qualified Data.Map as Map
import System.IO
import System.Exit
@@ -373,9 +374,13 @@ render dflags flags sinceQual qual ifaces installedIfaces extSrcMap = do
-- might want to fix that if/when these two get some work on them
when (Flag_Hoogle `elem` flags) $ do
case pkgNameVer of
- (Just (PackageName pkgNameFS), Just pkgVer) ->
- let pkgNameStr | unpackFS pkgNameFS == "main" && title /= [] = title
- | otherwise = unpackFS pkgNameFS
+ (Just (PackageName pkgNameFS), mpkgVer) ->
+ let
+ pkgNameStr | unpackFS pkgNameFS == "main" && title /= [] = title
+ | otherwise = unpackFS pkgNameFS
+
+ pkgVer =
+ fromMaybe (makeVersion []) mpkgVer
in ppHoogle dflags' pkgNameStr pkgVer title (fmap _doc prologue)
visibleIfaces odir
_ -> putStrLn . unlines $
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs
index c330c5fe..759d5d03 100644
--- a/haddock-api/src/Haddock/Interface.hs
+++ b/haddock-api/src/Haddock/Interface.hs
@@ -84,6 +84,7 @@ processModules
processModules verbosity modules flags extIfaces = do
#if defined(mingw32_HOST_OS)
-- Avoid internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows
+ liftIO $ hSetEncoding stdout $ mkLocaleEncoding TransliterateCodingFailure
liftIO $ hSetEncoding stderr $ mkLocaleEncoding TransliterateCodingFailure
#endif
diff --git a/haddock-library/CHANGES.md b/haddock-library/CHANGES.md
index e41b8087..0175b6af 100644
--- a/haddock-library/CHANGES.md
+++ b/haddock-library/CHANGES.md
@@ -1,3 +1,11 @@
+## Changes in version 1.7.0
+
+ * Make `Documentation.Haddock.Parser.Monad` an internal module
+
+## Changes in version 1.6.1
+
+ * 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..0b4405b9 100644
--- a/haddock-library/haddock-library.cabal
+++ b/haddock-library/haddock-library.cabal
@@ -1,16 +1,16 @@
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
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: Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
+maintainer: Alec Theriault <alec.theriault@gmail.com>, Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
homepage: http://www.haskell.org/haddock/
bug-reports: https://github.com/haskell/haddock/issues
category: Documentation
@@ -35,14 +35,14 @@ library
Documentation.Haddock.Doc
Documentation.Haddock.Markup
Documentation.Haddock.Parser
- Documentation.Haddock.Parser.Monad
Documentation.Haddock.Types
Documentation.Haddock.Utf8
other-modules:
Documentation.Haddock.Parser.Util
+ Documentation.Haddock.Parser.Monad
- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
+ ghc-options: -funbox-strict-fields -Wall -fwarn-tabs
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
@@ -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
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.
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/haddock.cabal b/haddock.cabal
index e103dded..39d01c4d 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.
.
- <<https://cdn.rawgit.com/haskell/haddock/master/doc/cheatsheet/haddocks.svg>>
+ <<https://cdn.rawgit.com/haskell/haddock/ghc-8.6/doc/cheatsheet/haddocks.svg>>
license: BSD3
license-file: LICENSE
author: Simon Marlow, David Waern
-maintainer: Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
+maintainer: Alec Theriault <alec.theriault@gmail.com>, Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
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