aboutsummaryrefslogtreecommitdiff
path: root/html-test
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2019-05-26 16:16:25 -0400
committerAlec Theriault <alec.theriault@gmail.com>2019-05-26 16:16:25 -0400
commit646c8d2752e45d9304402d4134bf1c59006610fa (patch)
tree31c48e3f3b1591df5264334eca0f621e44d6cc53 /html-test
parent260e1e1be0bb23b4c6d474b36d57354441133ed1 (diff)
Regression test: promoted lists in associated types
When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes #466,
Diffstat (limited to 'html-test')
-rw-r--r--html-test/ref/Bug466.html248
-rw-r--r--html-test/src/Bug466.hs9
2 files changed, 257 insertions, 0 deletions
diff --git a/html-test/ref/Bug466.html b/html-test/ref/Bug466.html
new file mode 100644
index 00000000..a0c1cd87
--- /dev/null
+++ b/html-test/ref/Bug466.html
@@ -0,0 +1,248 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><meta name="viewport" content="width=device-width, initial-scale=1"
+ /><title
+ >Bug466</title
+ ><link href="#" rel="stylesheet" type="text/css" title="Linuwial"
+ /><link rel="stylesheet" type="text/css" href="#"
+ /><link rel="stylesheet" type="text/css" href="#"
+ /><script src="haddock-bundle.min.js" async="async" type="text/javascript"
+ ></script
+ ><script type="text/x-mathjax-config"
+ >MathJax.Hub.Config({ tex2jax: { processClass: &quot;mathjax&quot;, ignoreClass: &quot;.*&quot; } });</script
+ ><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"
+ ></script
+ ></head
+ ><body
+ ><div id="package-header"
+ ><span class="caption empty"
+ ></span
+ ><ul class="links" id="page-menu"
+ ><li
+ ><a href="#"
+ >Contents</a
+ ></li
+ ><li
+ ><a href="#"
+ >Index</a
+ ></li
+ ></ul
+ ></div
+ ><div id="content"
+ ><div id="module-header"
+ ><table class="info"
+ ><tr
+ ><th
+ >Safe Haskell</th
+ ><td
+ >Safe</td
+ ></tr
+ ></table
+ ><p class="caption"
+ >Bug466</p
+ ></div
+ ><div id="interface"
+ ><h1
+ >Documentation</h1
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >class</span
+ > <a id="t:Cl" class="def"
+ >Cl</a
+ > a <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a id="t:Fam" class="def"
+ >Fam</a
+ > a :: [*] <a href="#" class="selflink"
+ >#</a
+ ></p
+ ></div
+ ><div class="subs instances"
+ ><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Cl"
+ >Instances</h4
+ ><details id="i:Cl" open="open"
+ ><summary class="hide-when-js-enabled"
+ >Instances details</summary
+ ><table
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:Cl:Cl:1"
+ ></span
+ > <a href="#" title="Bug466"
+ >Cl</a
+ > <a href="#" title="Bug466"
+ >X</a
+ ></span
+ > <a href="#" class="selflink"
+ >#</a
+ ></td
+ ><td class="doc empty"
+ ></td
+ ></tr
+ ><tr
+ ><td colspan="2"
+ ><details id="i:ic:Cl:Cl:1"
+ ><summary class="hide-when-js-enabled"
+ >Instance details</summary
+ ><p
+ >Defined in <a href="#"
+ >Bug466</a
+ ></p
+ > <div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href="#" title="Bug466"
+ >Fam</a
+ > <a href="#" title="Bug466"
+ >X</a
+ > :: [<a href="#" title="Data.Kind"
+ >Type</a
+ >] <a href="#" class="selflink"
+ >#</a
+ ></p
+ ></div
+ ></details
+ ></td
+ ></tr
+ ></table
+ ></details
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a id="t:X" class="def"
+ >X</a
+ > <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a id="v:X" class="def"
+ >X</a
+ ></td
+ ><td class="doc empty"
+ ></td
+ ></tr
+ ></table
+ ></div
+ ><div class="subs instances"
+ ><h4 class="instances details-toggle-control details-toggle" data-details-id="i:X"
+ >Instances</h4
+ ><details id="i:X" open="open"
+ ><summary class="hide-when-js-enabled"
+ >Instances details</summary
+ ><table
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:X:Cl:1"
+ ></span
+ > <a href="#" title="Bug466"
+ >Cl</a
+ > <a href="#" title="Bug466"
+ >X</a
+ ></span
+ > <a href="#" class="selflink"
+ >#</a
+ ></td
+ ><td class="doc empty"
+ ></td
+ ></tr
+ ><tr
+ ><td colspan="2"
+ ><details id="i:id:X:Cl:1"
+ ><summary class="hide-when-js-enabled"
+ >Instance details</summary
+ ><p
+ >Defined in <a href="#"
+ >Bug466</a
+ ></p
+ > <div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href="#" title="Bug466"
+ >Fam</a
+ > <a href="#" title="Bug466"
+ >X</a
+ > :: [<a href="#" title="Data.Kind"
+ >Type</a
+ >] <a href="#" class="selflink"
+ >#</a
+ ></p
+ ></div
+ ></details
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:X:Fam:2"
+ ></span
+ > <span class="keyword"
+ >type</span
+ > <a href="#" title="Bug466"
+ >Fam</a
+ > <a href="#" title="Bug466"
+ >X</a
+ ></span
+ > <a href="#" class="selflink"
+ >#</a
+ ></td
+ ><td class="doc empty"
+ ></td
+ ></tr
+ ><tr
+ ><td colspan="2"
+ ><details id="i:id:X:Fam:2"
+ ><summary class="hide-when-js-enabled"
+ >Instance details</summary
+ ><p
+ >Defined in <a href="#"
+ >Bug466</a
+ ></p
+ > <div class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href="#" title="Bug466"
+ >Fam</a
+ > <a href="#" title="Bug466"
+ >X</a
+ > = '[<a href="#" title="Data.Char"
+ >Char</a
+ >]</div
+ ></details
+ ></td
+ ></tr
+ ></table
+ ></details
+ ></div
+ ></div
+ ></div
+ ></div
+ ><div id="footer"
+ ></div
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/html-test/src/Bug466.hs b/html-test/src/Bug466.hs
new file mode 100644
index 00000000..ec7cde2c
--- /dev/null
+++ b/html-test/src/Bug466.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE DataKinds, TypeFamilies, StarIsType #-}
+module Bug466 where
+
+class Cl a where
+ type Fam a :: [*]
+
+data X = X
+instance Cl X where
+ type Fam X = '[Char]