[commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: Fix re-exports of built-in type families (8d82524)
git at git.haskell.org
git at git.haskell.org
Wed Jul 8 08:32:38 UTC 2015
- Previous message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: whitespace only (08a2651)
- Next message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: Turn some uses of error into recoverable warnings (267e2c2)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : ssh://git@git.haskell.org/haddock
On branches: T6018-injective-type-families,adamse-D1033,ghc-head,master,metainfo,wip/10268,wip/10313,wip/D538,wip/D538-1,wip/D538-2,wip/D538-3,wip/D538-4,wip/D538-5,wip/D538-6,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-annot-tweaks-7.10,wip/api-annots-ghc-7.10-3,wip/orf-reboot
Link : http://git.haskell.org/haddock.git/commitdiff/8d82524d9d9b278eae08993c2d4c54173d68481c
>---------------------------------------------------------------
commit 8d82524d9d9b278eae08993c2d4c54173d68481c
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date: Tue Nov 4 01:16:20 2014 +0000
Fix re-exports of built-in type families
Fixes #310
>---------------------------------------------------------------
8d82524d9d9b278eae08993c2d4c54173d68481c
CHANGES | 2 ++
haddock-api/src/Haddock/Convert.hs | 11 ++++---
html-test/ref/{Hyperlinks.html => Bug310.html} | 42 ++++++++++++++------------
html-test/src/Bug310.hs | 4 +++
4 files changed, 35 insertions(+), 24 deletions(-)
diff --git a/CHANGES b/CHANGES
index 352a739..3a08424 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,8 @@ Changes in version 2.15.1
This is to disambiguate them from markdown links and will be require with a
future release.
+ * Fix re-exports of built-in type families (#310)
+
Changes in version 2.15.0
* Always read in prologue files as UTF8 (#286 and Cabal #1721)
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 610e8fc..ff7ca56 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -136,6 +136,7 @@ synifyAxiom ax@(CoAxiom { co_ax_tc = tc })
| otherwise
= error "synifyAxiom: closed/open family confusion"
+-- | Turn type constructors into type class declarations
synifyTyCon :: Maybe (CoAxiom br) -> TyCon -> TyClDecl Name
synifyTyCon coax tc
| isFunTyCon tc || isPrimTyCon tc
@@ -163,10 +164,12 @@ synifyTyCon coax tc
= case synTyConRhs_maybe tc of
Just rhs ->
let info = case rhs of
- OpenSynFamilyTyCon -> OpenTypeFamily
- ClosedSynFamilyTyCon (CoAxiom { co_ax_branches = branches }) ->
- ClosedTypeFamily (brListMap (noLoc . synifyAxBranch tc) branches)
- _ -> error "synifyTyCon: type/data family confusion"
+ OpenSynFamilyTyCon -> OpenTypeFamily
+ ClosedSynFamilyTyCon (CoAxiom { co_ax_branches = branches }) ->
+ ClosedTypeFamily (brListMap (noLoc . synifyAxBranch tc) branches)
+ BuiltInSynFamTyCon {} -> ClosedTypeFamily []
+ AbstractClosedSynFamilyTyCon {} -> ClosedTypeFamily []
+ _ -> error "synifyTyCon: type/data family confusion"
in FamDecl (FamilyDecl { fdInfo = info
, fdLName = synifyName tc
, fdTyVars = synifyTyVars (tyConTyVars tc)
diff --git a/html-test/ref/Hyperlinks.html b/html-test/ref/Bug310.html
similarity index 72%
copy from html-test/ref/Hyperlinks.html
copy to html-test/ref/Bug310.html
index 3454c48..926d6cf 100644
--- a/html-test/ref/Hyperlinks.html
+++ b/html-test/ref/Bug310.html
@@ -3,13 +3,13 @@
><head
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><title
- >Hyperlinks</title
+ >Bug310</title
><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
/><script src="haddock-util.js" type="text/javascript"
></script
><script type="text/javascript"
>//<![CDATA[
-window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
+window.onload = function () {pageLoad();setSynopsis("mini_Bug310.html");};
//]]>
</script
></head
@@ -35,21 +35,23 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >None</td
></tr
></table
><p class="caption"
- >Hyperlinks</p
+ >Bug310</p
></div
><div id="synopsis"
><p id="control.syn" class="caption expander" onclick="toggleSection('syn')"
>Synopsis</p
><ul id="section.syn" class="hide" onclick="toggleSection('syn')"
><li class="src short"
- ><a href=""
- >foo</a
- > :: <a href=""
- >Int</a
+ ><span class="keyword"
+ >type family</span
+ > a <a href=""
+ >+</a
+ > b :: <a href=""
+ >Nat</a
></li
></ul
></div
@@ -58,20 +60,20 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
- >foo</a
- > :: <a href=""
- >Int</a
+ ><span class="keyword"
+ >type family</span
+ > a <a name="t:-43-" class="def"
+ >+</a
+ > b :: <a href=""
+ >Nat</a
+ > <span class="fixity"
+ >infixl 6</span
+ ><span class="rightedge"
+ ></span
></p
><div class="doc"
><p
- >A plain URL: <a href=""
- >http://example.com/</a
- ></p
- ><p
- >A URL with a label: <a href=""
- >some link</a
- ></p
+ >Addition of type-level naturals.</p
></div
></div
></div
@@ -80,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.15.1</p
></div
></body
></html
diff --git a/html-test/src/Bug310.hs b/html-test/src/Bug310.hs
new file mode 100644
index 0000000..d2492dc
--- /dev/null
+++ b/html-test/src/Bug310.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE ExplicitNamespaces #-}
+module Bug310 ( type (+) ) where
+
+import GHC.TypeLits
- Previous message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: whitespace only (08a2651)
- Next message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: Turn some uses of error into recoverable warnings (267e2c2)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list