diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-04-03 21:13:48 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-04-03 21:13:48 +0100 |
commit | 52103425e6d621523fb0ed5b5b83c2588cacc7b6 (patch) | |
tree | 0ecb2f2243a4d55f4ee8802919538d464a916b31 /html-test | |
parent | c2a1f755565008efbee80cdd51eabeeb0606fe51 (diff) |
Update test cases for GHC bug #8945, Haddock #188
The order of signature groups has been corrected upstream. Here we add a
test case and update some existing test-cases to reflect this change. We
remove grouped signature in test cases that we can (Minimal,
BugDeprecated &c) so that the test is as self-contained as possible.
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/Bug188.html | 81 | ||||
-rw-r--r-- | html-test/ref/BugDeprecated.html | 38 | ||||
-rw-r--r-- | html-test/ref/Minimal.html | 64 | ||||
-rw-r--r-- | html-test/ref/Operators.html | 14 | ||||
-rw-r--r-- | html-test/src/Bug188.hs | 7 | ||||
-rw-r--r-- | html-test/src/BugDeprecated.hs | 14 | ||||
-rw-r--r-- | html-test/src/Minimal.hs | 25 |
7 files changed, 186 insertions, 57 deletions
diff --git a/html-test/ref/Bug188.html b/html-test/ref/Bug188.html new file mode 100644 index 00000000..3e9f4eec --- /dev/null +++ b/html-test/ref/Bug188.html @@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" +><head + ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" + /><title + >Bug188</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_Bug188.html");}; +//]]> +</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-Inferred</td + ></tr + ></table + ><p class="caption" + >Bug188</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:A" class="def" + >A</a + > a <span class="keyword" + >where</span + ></p + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:f" class="def" + >f</a + >, <a name="v:g" class="def" + >g</a + >, <a name="v:h" class="def" + >h</a + >, <a name="v:i" class="def" + >i</a + > :: a -> ()</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.15.0</p + ></div + ></body + ></html +> diff --git a/html-test/ref/BugDeprecated.html b/html-test/ref/BugDeprecated.html index 2ff23494..69521b95 100644 --- a/html-test/ref/BugDeprecated.html +++ b/html-test/ref/BugDeprecated.html @@ -53,13 +53,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");} ></li ><li class="src short" ><a href="" - >baz</a + >bar</a > :: <a href="" >Int</a ></li ><li class="src short" ><a href="" - >bar</a + >baz</a > :: <a href="" >Int</a ></li @@ -71,13 +71,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");} ></li ><li class="src short" ><a href="" - >three</a + >two</a > :: <a href="" >Int</a ></li ><li class="src short" ><a href="" - >two</a + >three</a > :: <a href="" >Int</a ></li @@ -102,29 +102,29 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");} ></div ><div class="top" ><p class="src" - ><a name="v:baz" class="def" - >baz</a + ><a name="v:bar" class="def" + >bar</a > :: <a href="" >Int</a ></p ><div class="doc" ><div class="warning" ><p - >Deprecated: for baz</p + >Deprecated: for bar</p ></div ></div ></div ><div class="top" ><p class="src" - ><a name="v:bar" class="def" - >bar</a + ><a name="v:baz" class="def" + >baz</a > :: <a href="" >Int</a ></p ><div class="doc" ><div class="warning" ><p - >Deprecated: for bar</p + >Deprecated: for baz</p ></div ></div ></div @@ -141,39 +141,35 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");} >Deprecated: for one</p ></div ><p - >some documentation for one, two and three</p + >some documentation for one</p ></div ></div ><div class="top" ><p class="src" - ><a name="v:three" class="def" - >three</a + ><a name="v:two" class="def" + >two</a > :: <a href="" >Int</a ></p ><div class="doc" ><div class="warning" ><p - >Deprecated: for three</p + >Deprecated: for two</p ></div - ><p - >some documentation for one, two and three</p ></div ></div ><div class="top" ><p class="src" - ><a name="v:two" class="def" - >two</a + ><a name="v:three" class="def" + >three</a > :: <a href="" >Int</a ></p ><div class="doc" ><div class="warning" ><p - >Deprecated: for two</p + >Deprecated: for three</p ></div - ><p - >some documentation for one, two and three</p ></div ></div ></div diff --git a/html-test/ref/Minimal.html b/html-test/ref/Minimal.html index f062dc8c..32405540 100644 --- a/html-test/ref/Minimal.html +++ b/html-test/ref/Minimal.html @@ -87,16 +87,20 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");}; ><p class="src" ><a name="v:foo" class="def" >foo</a - >, <a name="v:bat" class="def" - >bat</a - >, <a name="v:bar" class="def" - >bar</a > :: a</p ><div class="doc" ><p >Any two of these are required...</p ></div ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: a</p + ><p class="src" + ><a name="v:bat" class="def" + >bat</a + > :: a</p + ><p class="src" ><a name="v:fooBarBat" class="def" >fooBarBat</a > :: (a, a, a)</p @@ -141,19 +145,31 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");}; ><p class="src" ><a name="v:a" class="def" >a</a - >, <a name="v:g" class="def" - >g</a - >, <a name="v:f" class="def" - >f</a - >, <a name="v:e" class="def" - >e</a - >, <a name="v:d" class="def" - >d</a - >, <a name="v:c" class="def" - >c</a - >, <a name="v:b" class="def" + > :: a</p + ><p class="src" + ><a name="v:b" class="def" >b</a > :: a</p + ><p class="src" + ><a name="v:c" class="def" + >c</a + > :: a</p + ><p class="src" + ><a name="v:d" class="def" + >d</a + > :: a</p + ><p class="src" + ><a name="v:e" class="def" + >e</a + > :: a</p + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: a</p + ><p class="src" + ><a name="v:g" class="def" + >g</a + > :: a</p ></div ></div ><div class="top" @@ -181,11 +197,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");}; ><p class="src" ><a name="v:x" class="def" >x</a - >, <a name="v:z" class="def" - >z</a - >, <a name="v:y" class="def" + > :: a</p + ><p class="src" + ><a name="v:y" class="def" >y</a > :: a</p + ><p class="src" + ><a name="v:z" class="def" + >z</a + > :: a</p ></div ></div ><div class="top" @@ -203,7 +223,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");}; ><p class="src" ><a name="v:aaa" class="def" >aaa</a - >, <a name="v:bbb" class="def" + > :: a</p + ><p class="src" + ><a name="v:bbb" class="def" >bbb</a > :: a</p ></div @@ -255,7 +277,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");}; ><p class="src" ><a name="v:eee" class="def" >eee</a - >, <a name="v:fff" class="def" + > :: a</p + ><p class="src" + ><a name="v:fff" class="def" >fff</a > :: a</p ></div diff --git a/html-test/ref/Operators.html b/html-test/ref/Operators.html index 1c49b714..bfecfb38 100644 --- a/html-test/ref/Operators.html +++ b/html-test/ref/Operators.html @@ -151,11 +151,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");}; ><a href="" >(**>)</a >, <a href="" - >(<**)</a + >(**<)</a >, <a href="" >(>**)</a >, <a href="" - >(**<)</a + >(<**)</a > :: a -> a -> ()</li ></ul ></li @@ -407,16 +407,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");}; ><p class="src" ><a name="v:-42--42--62-" class="def" >(**>)</a - >, <a name="v:-60--42--42-" class="def" - >(<**)</a - >, <a name="v:-62--42--42-" class="def" - >(>**)</a >, <a name="v:-42--42--60-" class="def" >(**<)</a + >, <a name="v:-62--42--42-" class="def" + >(>**)</a + >, <a name="v:-60--42--42-" class="def" + >(<**)</a > :: a -> a -> () <span class="fixity" >infixr 8 **>, >**</span ><span class="fixity" - >infixl 8 <**, **<</span + >infixl 8 **<, <**</span ><span class="rightedge" ></span ></p diff --git a/html-test/src/Bug188.hs b/html-test/src/Bug188.hs new file mode 100644 index 00000000..15089699 --- /dev/null +++ b/html-test/src/Bug188.hs @@ -0,0 +1,7 @@ +-- Tests that the listed order of functions grouped under a single +-- type signature is preserved as in-source. Before fixing #188, it +-- seems to have preserved the first function but reversed the rest. +module Bug188 where + +class A a where + f, g, h, i :: a -> () diff --git a/html-test/src/BugDeprecated.hs b/html-test/src/BugDeprecated.hs index 0f7ac2eb..7741786f 100644 --- a/html-test/src/BugDeprecated.hs +++ b/html-test/src/BugDeprecated.hs @@ -1,17 +1,25 @@ module BugDeprecated where -foo, bar, baz :: Int +foo :: Int foo = 23 + +bar :: Int bar = 23 + +baz :: Int baz = 23 {-# DEPRECATED foo "for foo" #-} {-# DEPRECATED bar "for bar" #-} {-# DEPRECATED baz "for baz" #-} --- | some documentation for one, two and three -one, two, three :: Int +-- | some documentation for one +one :: Int one = 23 + +two :: Int two = 23 + +three :: Int three = 23 {-# DEPRECATED one "for one" #-} {-# DEPRECATED two "for two" #-} diff --git a/html-test/src/Minimal.hs b/html-test/src/Minimal.hs index cd2df930..9df03cca 100644 --- a/html-test/src/Minimal.hs +++ b/html-test/src/Minimal.hs @@ -10,7 +10,9 @@ module Minimal class Foo a where -- | Any two of these are required... - foo, bar, bat :: a + foo :: a + bar :: a + bat :: a -- | .. or just this fooBarBat :: (a,a,a) @@ -18,23 +20,34 @@ class Foo a where {-# MINIMAL (foo, bar) | (bar, bat) | (foo, bat) | fooBarBat #-} class Weird a where - a,b,c,d,e,f,g :: a + a :: a + b :: a + c :: a + d :: a + e :: a + f :: a + g :: a {-# MINIMAL ((a, b), c | (d | (e, (f | g)))) #-} class NoMins a where - x,y,z :: a + x :: a + y :: a + z :: a -- | Has a default implementation! z = x class FullMin a where - aaa,bbb :: a + aaa :: a + bbb :: a class PartialMin a where - ccc,ddd :: a + ccc :: a + ddd :: a class EmptyMin a where - eee,fff :: a + eee :: a + fff :: a eee = fff fff = undefined |