diff options
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/TypeFamilies.html | 292 | ||||
-rw-r--r-- | html-test/src/TypeFamilies.hs | 14 |
2 files changed, 238 insertions, 68 deletions
diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html index bfafc3d0..65845102 100644 --- a/html-test/ref/TypeFamilies.html +++ b/html-test/ref/TypeFamilies.html @@ -90,7 +90,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >type family</span > <a href="#t:Foo" >Foo</a - > a</li + > a :: k</li ><li class="src short" ><span class="keyword" >data family</span @@ -125,6 +125,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; > <a href="#t:Bar" >Bar</a > b</li + ><li class="src short" + ><span class="keyword" + >type family</span + > a <a href="#t:-60--62-" + ><></a + > b :: k</li + ><li class="src short" + ><span class="keyword" + >class</span + > a <a href="#t:-62--60-" + >><</a + > b</li ></ul ></div ><div id="interface" @@ -186,7 +198,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Assoc" >Assoc</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a ></td ><td class="doc" @@ -198,7 +210,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Test" >Test</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a ></td ><td class="doc" @@ -208,30 +220,14 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ></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:-62--60-" + >(><)</a > <a href="TypeFamilies.html#t:X" >X</a + > <a href="TypeFamilies.html#v:XX" + >XX</a + > <a href="TypeFamilies.html#v:XXX" + >XXX</a ></td ><td class="doc empty" > </td @@ -279,10 +275,40 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><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" >type</span > <a href="TypeFamilies.html#t:Foo" >Foo</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a > = <a href="TypeFamilies.html#t:Y" >Y</a @@ -292,6 +318,38 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >Doc for: type instance Foo X = Y</p ></td ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > * <a href="TypeFamilies.html#t:X" + >X</a + > a = <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > <a href="TypeFamilies.html#t:X" + >X</a + > <a href="TypeFamilies.html#v:XXX" + >XXX</a + > <a href="TypeFamilies.html#v:XX" + >XX</a + > = <a href="TypeFamilies.html#v:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr ></table ></div ></div @@ -316,7 +374,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Assoc" >Assoc</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a ></td ><td class="doc" @@ -328,7 +386,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Test" >Test</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a ></td ><td class="doc" @@ -340,36 +398,6 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><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" @@ -399,10 +427,40 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><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" >type</span > <a href="TypeFamilies.html#t:Foo" >Foo</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a > = <a href="TypeFamilies.html#t:X" >X</a @@ -412,6 +470,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >Doc for: type instance Foo Y = X</p ></td ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > * <a href="TypeFamilies.html#t:Y" + >Y</a + > a = a</td + ><td class="doc empty" + > </td + ></tr ></table ></div ></div @@ -436,7 +506,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Test" >Test</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a ></td ><td class="doc" @@ -448,7 +518,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Test" >Test</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a ></td ><td class="doc" @@ -466,7 +536,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >type family</span > <a name="t:Foo" class="def" >Foo</a - > a</p + > a :: k</p ><div class="doc" ><p >Doc for: type family Foo a</p @@ -482,7 +552,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >type</span > <a href="TypeFamilies.html#t:Foo" >Foo</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a > = <a href="TypeFamilies.html#t:X" >X</a @@ -498,7 +568,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >type</span > <a href="TypeFamilies.html#t:Foo" >Foo</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a > = <a href="TypeFamilies.html#t:Y" >Y</a @@ -646,7 +716,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Assoc" >Assoc</a - > <a href="TypeFamilies.html#t:Y" + > * <a href="TypeFamilies.html#t:Y" >Y</a ></td ><td class="doc" @@ -658,7 +728,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><td class="src" ><a href="TypeFamilies.html#t:Assoc" >Assoc</a - > <a href="TypeFamilies.html#t:X" + > * <a href="TypeFamilies.html#t:X" >X</a ></td ><td class="doc" @@ -710,6 +780,96 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ></table ></div ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > a <a name="t:-60--62-" class="def" + ><></a + > b :: k</p + ><div class="subs instances" + ><p id="control.i:-60--62-" class="caption collapser" onclick="toggleSection('i:-60--62-')" + >Instances</p + ><div id="section.i:-60--62-" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > * <a href="TypeFamilies.html#t:Y" + >Y</a + > a = a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > * <a href="TypeFamilies.html#t:X" + >X</a + > a = <a href="TypeFamilies.html#t:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >type</span + > <a href="TypeFamilies.html#t:-60--62-" + >(<>)</a + > <a href="TypeFamilies.html#t:X" + >X</a + > <a href="TypeFamilies.html#v:XXX" + >XXX</a + > <a href="TypeFamilies.html#v:XX" + >XX</a + > = <a href="TypeFamilies.html#v:X" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > a <a name="t:-62--60-" class="def" + >><</a + > b</p + ><div class="subs instances" + ><p id="control.i:-62--60-" class="caption collapser" onclick="toggleSection('i:-62--60-')" + >Instances</p + ><div id="section.i:-62--60-" class="show" + ><table + ><tr + ><td class="src" + ><a href="TypeFamilies.html#t:-62--60-" + >(><)</a + > <a href="TypeFamilies.html#t:X" + >X</a + > <a href="TypeFamilies.html#v:XX" + >XX</a + > <a href="TypeFamilies.html#v:XXX" + >XXX</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div ></div ></div ><div id="footer" diff --git a/html-test/src/TypeFamilies.hs b/html-test/src/TypeFamilies.hs index 725e76a7..e7cc0458 100644 --- a/html-test/src/TypeFamilies.hs +++ b/html-test/src/TypeFamilies.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeFamilies, UndecidableInstances #-} +{-# LANGUAGE TypeFamilies, UndecidableInstances, PolyKinds, TypeOperators, DataKinds, MultiParamTypeClasses #-} -- | Doc for: module TypeFamilies module TypeFamilies where @@ -21,7 +21,7 @@ instance Test X instance Test Y -- | Doc for: type family Foo a -type family Foo a +type family Foo a :: k -- | Doc for: type instance Foo X = Y type instance Foo X = Y @@ -66,3 +66,13 @@ instance Assoc Y where type family Bar b where Bar X = X Bar y = Y + +type family (<>) (a :: k) (b :: k) :: k + +type instance X <> a = X +type instance Y <> a = a + +type instance XXX <> XX = 'X + +class (><) (a :: k) (b :: k) +instance XX >< XXX |