Repository : ssh://darcs.haskell.org//srv/darcs/haddock On branch : ghc-7.4
http://hackage.haskell.org/trac/ghc/changeset/15aa68da3523a56475298d91f288587c4744de4a >--------------------------------------------------------------- commit 15aa68da3523a56475298d91f288587c4744de4a Author: Simon Hengel <[email protected]> Date: Thu May 17 17:47:32 2012 +0200 Add test for deprecated record field >--------------------------------------------------------------- tests/html-tests/tests/DeprecatedRecord.hs | 9 ++ .../{Bug1.html.ref => DeprecatedRecord.html.ref} | 79 ++++++++++++++++---- ...ug1.html.ref => mini_DeprecatedRecord.html.ref} | 6 +- 3 files changed, 75 insertions(+), 19 deletions(-) diff --git a/tests/html-tests/tests/DeprecatedRecord.hs b/tests/html-tests/tests/DeprecatedRecord.hs new file mode 100644 index 0000000..d44499e --- /dev/null +++ b/tests/html-tests/tests/DeprecatedRecord.hs @@ -0,0 +1,9 @@ +module DeprecatedRecord where + +-- | type Foo +data Foo = Foo { + fooName :: String -- ^ some name +, fooValue :: Int -- ^ some value +} + +{-# DEPRECATED fooValue "do not use this" #-} diff --git a/tests/html-tests/tests/Bug1.html.ref b/tests/html-tests/tests/DeprecatedRecord.html.ref similarity index 61% copy from tests/html-tests/tests/Bug1.html.ref copy to tests/html-tests/tests/DeprecatedRecord.html.ref index aae1aaf..d6648bc 100644 --- a/tests/html-tests/tests/Bug1.html.ref +++ b/tests/html-tests/tests/DeprecatedRecord.html.ref @@ -3,13 +3,13 @@ ><head ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title - >Bug1</title + >DeprecatedRecord</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_Bug1.html");}; +window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html");}; //]]> </script ></head @@ -39,7 +39,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");}; ></tr ></table ><p class="caption" - >Bug1</p + >DeprecatedRecord</p ></div ><div id="synopsis" ><p id="control.syn" class="caption expander" onclick="toggleSection('syn')" @@ -49,10 +49,24 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");}; ><span class="keyword" >data</span > <a href="" - >T</a + >Foo</a > = <a href="" - >T</a - ></li + >Foo</a + > {<ul class="subs" + ><li + ><a href="" + >fooName</a + > :: <a href="" + >String</a + ></li + ><li + ><a href="" + >fooValue</a + > :: <a href="" + >Int</a + ></li + ></ul + >}</li ></ul ></div ><div id="interface" @@ -62,17 +76,12 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");}; ><p class="src" ><span class="keyword" >data</span - > <a name="t:T" class="def" - >T</a + > <a name="t:Foo" class="def" + >Foo</a > </p ><div class="doc" ><p - >We should have different anchors for constructors and types/classes. This - hyperlink should point to the type constructor by default: <code - ><a href="" - >T</a - ></code - >. + >type Foo </p ></div ><div class="subs constructors" @@ -81,12 +90,50 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");}; ><table ><tr ><td class="src" - ><a name="v:T" class="def" - >T</a + ><a name="v:Foo" class="def" + >Foo</a ></td ><td class="doc empty" > </td ></tr + ><tr + ><td colspan="2" + ><div class="subs fields" + ><p class="caption" + >Fields</p + ><dl + ><dt class="src" + ><a name="v:fooName" class="def" + >fooName</a + > :: <a href="" + >String</a + ></dt + ><dd class="doc" + ><p + >some name +</p + ></dd + ><dt class="src" + ><a name="v:fooValue" class="def" + >fooValue</a + > :: <a href="" + >Int</a + ></dt + ><dd class="doc" + ><div class="warning" + ><p + >Deprecated: do not use this</p + ></div + ><p + >some value +</p + ></dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr ></table ></div ></div diff --git a/tests/html-tests/tests/mini_Bug1.html.ref b/tests/html-tests/tests/mini_DeprecatedRecord.html.ref similarity index 92% copy from tests/html-tests/tests/mini_Bug1.html.ref copy to tests/html-tests/tests/mini_DeprecatedRecord.html.ref index adf81c7..3d949d2 100644 --- a/tests/html-tests/tests/mini_Bug1.html.ref +++ b/tests/html-tests/tests/mini_DeprecatedRecord.html.ref @@ -3,7 +3,7 @@ ><head ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title - >Bug1</title + >DeprecatedRecord</title ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript" ></script @@ -16,7 +16,7 @@ window.onload = function () {pageLoad();}; ><body id="mini" ><div id="module-header" ><p class="caption" - >Bug1</p + >DeprecatedRecord</p ></div ><div id="interface" ><div class="top" @@ -24,7 +24,7 @@ window.onload = function () {pageLoad();}; ><span class="keyword" >data</span > <a href="" target="main" - >T</a + >Foo</a > </p ></div ></div _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
