aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Biehl <alexbiehl@gmail.com>2017-07-03 19:43:04 +0200
committerGitHub <noreply@github.com>2017-07-03 19:43:04 +0200
commita330da5297106ff214cbb5e74965d9d1ef9dab7b (patch)
tree91a27b0a2de35d4082a7c9c2fc23e950bed05c82
parent901b327f46dc4bd70cd310ae2c6339aa9ce572bb (diff)
Document record fields when DuplicateRecordFields is enabled (#649)
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs2
-rw-r--r--html-test/ref/DuplicateRecordFields.html160
-rw-r--r--html-test/src/DuplicateRecordFields.hs25
3 files changed, 186 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 9227c378..b9179d11 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -79,7 +79,7 @@ createInterface tm flags modMap instIfaceMap = do
dflags = ms_hspp_opts ms
!instances = modInfoInstances mi
!fam_instances = md_fam_insts md
- !exportedNames = modInfoExports mi
+ !exportedNames = modInfoExportsWithSelectors mi
(TcGblEnv { tcg_rdr_env = gre
, tcg_warns = warnings
diff --git a/html-test/ref/DuplicateRecordFields.html b/html-test/ref/DuplicateRecordFields.html
new file mode 100644
index 00000000..4430b50a
--- /dev/null
+++ b/html-test/ref/DuplicateRecordFields.html
@@ -0,0 +1,160 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><title
+ >DuplicateRecordFields</title
+ ><link href="#" rel="stylesheet" type="text/css" title="Ocean"
+ /><script src="haddock-util.js" type="text/javascript"
+ ></script
+ ><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"
+ ></script
+ ><script type="text/javascript"
+ >//
+window.onload = function () {pageLoad();};
+//
+</script
+ ></head
+ ><body
+ ><div id="package-header"
+ ><ul class="links" id="page-menu"
+ ><li
+ ><a href="#"
+ >Contents</a
+ ></li
+ ><li
+ ><a href="#"
+ >Index</a
+ ></li
+ ></ul
+ ><p class="caption empty"
+ ></p
+ ></div
+ ><div id="content"
+ ><div id="module-header"
+ ><table class="info"
+ ><tr
+ ><th
+ >Safe Haskell</th
+ ><td
+ >Safe</td
+ ></tr
+ ></table
+ ><p class="caption"
+ >DuplicateRecordFields</p
+ ></div
+ ><div id="interface"
+ ><h1
+ >Documentation</h1
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a id="t:RawReplay" class="def"
+ >RawReplay</a
+ > <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a id="v:RawReplay" class="def"
+ >RawReplay</a
+ ></td
+ ><td class="doc empty"
+ ></td
+ ></tr
+ ><tr
+ ><td colspan="2"
+ ><div class="subs fields"
+ ><p class="caption"
+ >Fields</p
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a id="v:headerSize" class="def"
+ >headerSize</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The byte size of the first section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:headerCRC" class="def"
+ >headerCRC</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The CRC of the first section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:header" class="def"
+ >header</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The first section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:contentSize" class="def"
+ >contentSize</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The byte size of the second section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:contentCRC" class="def"
+ >contentCRC</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The CRC of the second section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:content" class="def"
+ >content</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >The second section.</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a id="v:footer" class="def"
+ >footer</a
+ > :: Int</dfn
+ ><div class="doc"
+ ><p
+ >Arbitrary data after the second section. In replays generated by
+ Rocket League, this is always empty. However it is not technically
+ invalid to put something here.</p
+ ></div
+ ></li
+ ></ul
+ ></div
+ ></td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ></div
+ ></div
+ ><div id="footer"
+ ></div
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/html-test/src/DuplicateRecordFields.hs b/html-test/src/DuplicateRecordFields.hs
new file mode 100644
index 00000000..2cf9ff43
--- /dev/null
+++ b/html-test/src/DuplicateRecordFields.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE DuplicateRecordFields #-}
+module DuplicateRecordFields (RawReplay(..)) where
+
+import Prelude hiding (Int)
+
+data Int = Int
+
+data RawReplay = RawReplay
+ { headerSize :: Int
+ -- ^ The byte size of the first section.
+ , headerCRC :: Int
+ -- ^ The CRC of the first section.
+ , header :: Int
+ -- ^ The first section.
+ , contentSize :: Int
+ -- ^ The byte size of the second section.
+ , contentCRC :: Int
+ -- ^ The CRC of the second section.
+ , content :: Int
+ -- ^ The second section.
+ , footer :: Int
+ -- ^ Arbitrary data after the second section. In replays generated by
+ -- Rocket League, this is always empty. However it is not technically
+ -- invalid to put something here.
+ } \ No newline at end of file