summaryrefslogtreecommitdiff
path: root/testsuite/tests/showIface
diff options
context:
space:
mode:
authorLuke Lau <luke_lau@icloud.com>2020-05-26 18:42:12 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-04 04:36:41 -0400
commit2bd3929ad1b06b01c1d22d513902507eefadc131 (patch)
treec313f6533d672b0b1dcdbe0e353a7d2182f38faf /testsuite/tests/showIface
parent1b975aedb1b74b8694d14ba8fdc5955497f8f31c (diff)
downloadhaskell-2bd3929ad1b06b01c1d22d513902507eefadc131.tar.gz
Fix documentation on type families not being extracted
It looks like the location of the Names used for CoAxioms on type families are now located at their type constructors. Previously, Docs.hs thought the Names were located in the RHS, so the RealSrcSpan in the instanceMap and getInstLoc didn't match up. Fixes #18241
Diffstat (limited to 'testsuite/tests/showIface')
-rw-r--r--testsuite/tests/showIface/DocsInHiFile.hs6
-rw-r--r--testsuite/tests/showIface/DocsInHiFile1.stdout4
2 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/showIface/DocsInHiFile.hs b/testsuite/tests/showIface/DocsInHiFile.hs
index 26156722ac..e753eb5e42 100644
--- a/testsuite/tests/showIface/DocsInHiFile.hs
+++ b/testsuite/tests/showIface/DocsInHiFile.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE TypeFamilies #-}
{-| `elem`, 'print',
`Unknown',
'<>', ':=:', 'Bool'
@@ -35,3 +36,8 @@ class P f where
-- | Another datatype...
data D'
-- ^ ...with two docstrings.
+
+-- | A type family
+type family F a
+-- | A type family instance
+type instance F Int = Bool
diff --git a/testsuite/tests/showIface/DocsInHiFile1.stdout b/testsuite/tests/showIface/DocsInHiFile1.stdout
index 83d21f1953..fa642627d6 100644
--- a/testsuite/tests/showIface/DocsInHiFile1.stdout
+++ b/testsuite/tests/showIface/DocsInHiFile1.stdout
@@ -22,6 +22,10 @@ declaration docs:
" Another datatype...
...with two docstrings."
+ D:R:FInt:
+ " A type family instance"
+ F:
+ " A type family"
arg docs:
add:
0: