diff options
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/TypeFamilies.html | 674 | ||||
-rw-r--r-- | html-test/ref/TypeFamilies2.html | 113 | ||||
-rw-r--r-- | html-test/ref/ocean.css | 19 | ||||
-rw-r--r-- | html-test/src/TypeFamilies.hs | 76 | ||||
-rw-r--r-- | html-test/src/TypeFamilies2.hs | 12 |
5 files changed, 797 insertions, 97 deletions
diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html index 27a4564c..bfafc3d0 100644 --- a/html-test/ref/TypeFamilies.html +++ b/html-test/ref/TypeFamilies.html @@ -17,11 +17,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><div id="package-header" ><ul class="links" id="page-menu" ><li - ><a href="" + ><a href="index.html" >Contents</a ></li ><li - ><a href="" + ><a href="doc-index.html" >Index</a ></li ></ul @@ -41,56 +41,90 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><p class="caption" >TypeFamilies</p ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >Doc for: module TypeFamilies</p + ></div + ></div ><div id="synopsis" ><p id="control.syn" class="caption expander" onclick="toggleSection('syn')" >Synopsis</p ><ul id="section.syn" class="hide" onclick="toggleSection('syn')" ><li class="src short" ><span class="keyword" + >data</span + > <a href="#t:X" + >X</a + ><ul class="subs" + ><li + >= <a href="#v:X" + >X</a + ></li + ><li + >| <a href="#v:XX" + >XX</a + ></li + ><li + >| <a href="#v:XXX" + >XXX</a + ></li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="#t:Y" + >Y</a + ></li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="#t:Test" + >Test</a + > a</li + ><li class="src short" + ><span class="keyword" >type family</span - > <a href="" - >G</a + > <a href="#t:Foo" + >Foo</a + > a</li + ><li class="src short" + ><span class="keyword" + >data family</span + > <a href="#t:Bat" + >Bat</a > a :: *</li ><li class="src short" ><span class="keyword" >class</span - > <a href="" - >A</a + > <a href="#t:Assoc" + >Assoc</a > a <span class="keyword" >where</span ><ul class="subs" ><li ><span class="keyword" >data</span - > <a href="" - >B</a - > a :: * -> *</li + > <a href="#t:AssocD" + >AssocD</a + > a :: *</li ><li - ><a href="" - >f</a - > :: <a href="" - >B</a - > a <a href="" - >Int</a - ></li + ><span class="keyword" + >type</span + > <a href="#t:AssocT" + >AssocT</a + > a :: *</li ></ul ></li ><li class="src short" ><span class="keyword" >type family</span - > <a href="" - >F</a - > a</li - ><li class="src short" - ><a href="" - >g</a - > :: <a href="" - >B</a - > <a href="" - >Int</a - > <a href="" - >Integer</a - ></li + > <a href="#t:Bar" + >Bar</a + > b</li ></ul ></div ><div id="interface" @@ -99,27 +133,485 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><div class="top" ><p class="src" ><span class="keyword" + >data</span + > <a name="t:X" class="def" + >X</a + ></p + ><div class="doc" + ><p + >Doc for: data X</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:X" class="def" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: X</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:XX" class="def" + >XX</a + ></td + ><td class="doc" + ><p + >Doc for: XX</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:XXX" class="def" + >XXX</a + ></td + ><td class="doc" + ><p + >Doc for: XXX</p + ></td + ></tr + ></table + ></div + ><div class="subs instances" + ><p id="control.i:X" class="caption collapser" onclick="toggleSection('i:X')" + >Instances</p + ><div id="section.i:X" class="show" + ><table + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Assoc" + >Assoc</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: instance Assoc X</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Test" + >Test</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: instance Test X</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:AssocD" + >AssocD</a + > <a href="TypeFamilies.html#t:X" + >X</a + > = <a name="v:AssocX" class="def" + >AssocX</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:AssocT" + >AssocT</a + > <a href="TypeFamilies.html#t:X" + >X</a + > = <a href="TypeFamilies.html#t:Foo" + >Foo</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:Bat" + >Bat</a + > <a href="TypeFamilies.html#t:X" + >X</a + > <ul class="subs" + ><li + >= <a name="v:BatX" class="def" + >BatX</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></li + ><li + >| <a name="v:BatXX" class="def" + >BatXX</a + > { <ul class="subs" + ><li + ><a name="v:aaa" class="def" + >aaa</a + > :: <a href="TypeFamilies.html#t:X" + >X</a + ></li + ><li + ><a name="v:bbb" class="def" + >bbb</a + > :: <a href="TypeFamilies.html#t:Y" + >Y</a + ></li + ></ul + > }</li + ></ul + ></td + ><td class="doc" + ><p + >Doc for: data instance Bat X</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:Foo" + >Foo</a + > <a href="TypeFamilies.html#t:X" + >X</a + > = <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: type instance Foo X = Y</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Y" class="def" + >Y</a + ></p + ><div class="doc" + ><p + >Doc for: data Y</p + ></div + ><div class="subs instances" + ><p id="control.i:Y" class="caption collapser" onclick="toggleSection('i:Y')" + >Instances</p + ><div id="section.i:Y" class="show" + ><table + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Assoc" + >Assoc</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: instance Assoc Y</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Test" + >Test</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: instance Test Y</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:AssocD" + >AssocD</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > = <a name="v:AssocY" class="def" + >AssocY</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:AssocT" + >AssocT</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > = <a href="TypeFamilies.html#t:Bat" + >Bat</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:Bat" + >Bat</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > <ul class="subs" + ><li + >= <a name="v:BatY" class="def" + >BatY</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></li + ><li + >| <a href="TypeFamilies.html#t:X" + >X</a + > <a name="v::-43-" class="def" + >:+</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></li + ></ul + ></td + ><td class="doc" + ><p + >Doc for: data instance Bat Y</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:Foo" + >Foo</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > = <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: type instance Foo Y = X</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:Test" class="def" + >Test</a + > a</p + ><div class="doc" + ><p + >Doc for: class Test a</p + ></div + ><div class="subs instances" + ><p id="control.i:Test" class="caption collapser" onclick="toggleSection('i:Test')" + >Instances</p + ><div id="section.i:Test" class="show" + ><table + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Test" + >Test</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: instance Test Y</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Test" + >Test</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: instance Test X</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" >type family</span - > <a name="t:G" class="def" - >G</a + > <a name="t:Foo" class="def" + >Foo</a + > a</p + ><div class="doc" + ><p + >Doc for: type family Foo a</p + ></div + ><div class="subs instances" + ><p id="control.i:Foo" class="caption collapser" onclick="toggleSection('i:Foo')" + >Instances</p + ><div id="section.i:Foo" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:Foo" + >Foo</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > = <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: type instance Foo Y = X</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:Foo" + >Foo</a + > <a href="TypeFamilies.html#t:X" + >X</a + > = <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: type instance Foo X = Y</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data family</span + > <a name="t:Bat" class="def" + >Bat</a > a :: *</p ><div class="doc" ><p - >Type family G</p + >Doc for: data family Bat a</p + ></div + ><div class="subs instances" + ><p id="control.i:Bat" class="caption collapser" onclick="toggleSection('i:Bat')" + >Instances</p + ><div id="section.i:Bat" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:Bat" + >Bat</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + > <ul class="subs" + ><li + >= <a name="v:BatY" class="def" + >BatY</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></li + ><li + >| <a href="TypeFamilies.html#t:X" + >X</a + > <a name="v::-43-" class="def" + >:+</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></li + ></ul + ></td + ><td class="doc" + ><p + >Doc for: data instance Bat Y</p + ></td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="TypeFamilies.html#t:Bat" + >Bat</a + > <a href="TypeFamilies.html#t:X" + >X</a + > <ul class="subs" + ><li + >= <a name="v:BatX" class="def" + >BatX</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></li + ><li + >| <a name="v:BatXX" class="def" + >BatXX</a + > { <ul class="subs" + ><li + ><a name="v:aaa" class="def" + >aaa</a + > :: <a href="TypeFamilies.html#t:X" + >X</a + ></li + ><li + ><a name="v:bbb" class="def" + >bbb</a + > :: <a href="TypeFamilies.html#t:Y" + >Y</a + ></li + ></ul + > }</li + ></ul + ></td + ><td class="doc" + ><p + >Doc for: data instance Bat X</p + ></td + ></tr + ></table + ></div ></div ></div ><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 + > <a name="t:Assoc" class="def" + >Assoc</a + > a</p ><div class="doc" ><p - >A class with an associated type</p + >Doc for: class Assoc a</p ></div ><div class="subs associated-types" ><p class="caption" @@ -127,44 +619,52 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><p class="src" ><span class="keyword" >data</span - > <a name="t:B" class="def" - >B</a - > a :: * -> *</p + > <a name="t:AssocD" class="def" + >AssocD</a + > a :: *</p ><div class="doc" ><p - >An associated type</p + >Doc for: data AssocD a</p ></div - ></div - ><div class="subs methods" - ><p class="caption" - >Methods</p ><p class="src" - ><a name="v:f" class="def" - >f</a - > :: <a href="" - >B</a - > a <a href="" - >Int</a - ></p + ><span class="keyword" + >type</span + > <a name="t:AssocT" class="def" + >AssocT</a + > a :: *</p ><div class="doc" ><p - >A method</p + >Doc for: type AssocT a</p ></div ></div ><div class="subs instances" - ><p id="control.i:A" class="caption collapser" onclick="toggleSection('i:A')" + ><p id="control.i:Assoc" class="caption collapser" onclick="toggleSection('i:Assoc')" >Instances</p - ><div id="section.i:A" class="show" + ><div id="section.i:Assoc" class="show" ><table ><tr ><td class="src" - ><a href="" - >A</a - > <a href="" - >Int</a + ><a href="TypeFamilies.html#t:Assoc" + >Assoc</a + > <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc" + ><p + >Doc for: instance Assoc Y</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Assoc" + >Assoc</a + > <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc" + ><p + >Doc for: instance Assoc X</p ></td - ><td class="doc empty" - > </td ></tr ></table ></div @@ -174,31 +674,47 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><p class="src" ><span class="keyword" >type family</span - > <a name="t:F" class="def" - >F</a - > a</p + > <a name="t:Bar" class="def" + >Bar</a + > b</p ><div class="doc" ><p - >Doc for family</p + >Doc for: type family Bar b</p + ></div + ><div class="subs equations" + ><p class="caption" + >Equations</p + ><table + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Bar" + >Bar</a + > <a href="TypeFamilies.html#t:X" + >X</a + > = <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:Bar" + >Bar</a + > y = <a href="TypeFamilies.html#t:Y" + >Y</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table ></div - ></div - ><div class="top" - ><p class="src" - ><a name="v:g" class="def" - >g</a - > :: <a href="" - >B</a - > <a href="" - >Int</a - > <a href="" - >Integer</a - ></p ></div ></div ></div ><div id="footer" ><p - >Produced by <a href="" + >Produced by <a href="http://www.haskell.org/haddock/" >Haddock</a > version 2.14.0</p ></div diff --git a/html-test/ref/TypeFamilies2.html b/html-test/ref/TypeFamilies2.html new file mode 100644 index 00000000..eaa0772f --- /dev/null +++ b/html-test/ref/TypeFamilies2.html @@ -0,0 +1,113 @@ +<!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 + >TypeFamilies2</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_TypeFamilies2.html");}; +//]]> +</script + ></head + ><body + ><div id="package-header" + ><ul class="links" id="page-menu" + ><li + ><a href="index.html" + >Contents</a + ></li + ><li + ><a href="doc-index.html" + >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" + >TypeFamilies2</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:X" class="def" + >X</a + ></p + ><div class="subs instances" + ><p id="control.i:X" class="caption collapser" onclick="toggleSection('i:X')" + >Instances</p + ><div id="section.i:X" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies2.html#t:Foo" + >Foo</a + > <a href="TypeFamilies2.html#t:X" + >X</a + > = Y</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > <a name="t:Foo" class="def" + >Foo</a + > a</p + ><div class="subs instances" + ><p id="control.i:Foo" class="caption collapser" onclick="toggleSection('i:Foo')" + >Instances</p + ><div id="section.i:Foo" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies2.html#t:Foo" + >Foo</a + > <a href="TypeFamilies2.html#t:X" + >X</a + > = Y</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="http://www.haskell.org/haddock/" + >Haddock</a + > version 2.14.0</p + ></div + ></body + ></html +> diff --git a/html-test/ref/ocean.css b/html-test/ref/ocean.css index 42238709..05597d79 100644 --- a/html-test/ref/ocean.css +++ b/html-test/ref/ocean.css @@ -420,6 +420,19 @@ div#style-menu-holder { margin: 0; } +.subs ul { + height: 100%; + padding: 0.5em; + margin: 0; +} + +.subs ul, +.subs ul li.src { + list-style: none; + margin-left: 1em; +} + + .top p.src { border-top: 1px solid #ccc; } @@ -457,6 +470,12 @@ div#style-menu-holder { /* @group Auxillary Pages */ + +.extension-list { + list-style-type: none; + margin-left: 0; +} + #mini { margin: 0 auto; padding: 0 1em 1em; diff --git a/html-test/src/TypeFamilies.hs b/html-test/src/TypeFamilies.hs index 561f95fd..725e76a7 100644 --- a/html-test/src/TypeFamilies.hs +++ b/html-test/src/TypeFamilies.hs @@ -1,28 +1,68 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeFamilies, UndecidableInstances #-} +-- | Doc for: module TypeFamilies module TypeFamilies where --- | Type family G -type family G a :: * +-- | Doc for: data X +data X + = X -- ^ Doc for: X + | XX -- ^ Doc for: XX + | XXX -- ^ Doc for: XXX --- | A class with an associated type -class A a where - -- | An associated type - data B a :: * -> * - -- | A method - f :: B a Int +-- | Doc for: data Y +data Y --- | Doc for family -type family F a +-- | Doc for: class Test a +class Test a +-- | Doc for: instance Test X +instance Test X +-- | Doc for: instance Test Y +instance Test Y --- | Doc for G Int -type instance G Int = Bool -type instance G Float = Int +-- | Doc for: type family Foo a +type family Foo a +-- | Doc for: type instance Foo X = Y +type instance Foo X = Y +-- | Doc for: type instance Foo Y = X +type instance Foo Y = X -instance A Int where - data B Int x = Con x - f = Con 3 +-- | Doc for: data family Bat a +data family Bat a :: * -g = Con 5 +-- | Doc for: data instance Bat X +data instance Bat X + = BatX X -- ^ Doc for: BatX X + | BatXX { aaa :: X , bbb :: Y } -- ^ Doc for: BatXX { ... } + +-- | Doc for: data instance Bat Y +data instance Bat Y + = BatY Y -- ^ Doc for: BatY Y + | X :+ X -- X :+ X + +-- | Doc for: class Assoc a +class Assoc a where + -- | Doc for: data AssocD a + data AssocD a :: * + -- | Doc for: type AssocT a + type AssocT a :: * + +-- | Doc for: instance Assoc X +instance Assoc X where + -- | Doc for: data AssocD X = AssocX + data AssocD X = AssocX -- ^ Doc for: AssocX + -- | Doc for: type AssocT X = Foo X + type AssocT X = Foo X + +-- | Doc for: instance Assoc Y +instance Assoc Y where + -- | Doc for: data AssocD Y = AssocY + data AssocD Y = AssocY -- ^ Doc for: AssocY + -- | Doc for: type AssocT Y = Bat Y + type AssocT Y = Bat Y + +-- | Doc for: type family Bar b +type family Bar b where + Bar X = X + Bar y = Y diff --git a/html-test/src/TypeFamilies2.hs b/html-test/src/TypeFamilies2.hs new file mode 100644 index 00000000..718e11dc --- /dev/null +++ b/html-test/src/TypeFamilies2.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TypeFamilies #-} +-- This tests what happens if we have unexported types +-- in type instances. The expected behaviour is +-- that we get the instance, Y is not linked and +-- Haddock shows a linking warning. +module TypeFamilies2 (X, Foo) where + +data X +data Y + +type family Foo a +type instance Foo X = Y |