Skip to content
Snippets Groups Projects
Commit 8d27cc1b authored by Alec Theriault's avatar Alec Theriault
Browse files

Merge branch 'ghc-8.6' into ghc-head

parents b5372b7d 41d98467
No related branches found
No related tags found
No related merge requests found
## 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)
......
# 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
......
......@@ -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
......
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
......
......@@ -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 $
......
......@@ -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
......
## 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
......
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
......
......@@ -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.
......
{-# 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
......
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment