diff options
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/TypeFamilies.html | 304 | ||||
-rw-r--r-- | html-test/src/TypeFamilies.hs | 16 |
2 files changed, 234 insertions, 86 deletions
diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html index d1d54571..355d9248 100644 --- a/html-test/ref/TypeFamilies.html +++ b/html-test/ref/TypeFamilies.html @@ -81,6 +81,22 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ></li ><li class="src short" ><span class="keyword" + >data</span + > <a href="" + >Z</a + ><ul class="subs" + ><li + >= <a href="" + >ZA</a + ></li + ><li + >| <a href="" + >ZB</a + ></li + ></ul + ></li + ><li class="src short" + ><span class="keyword" >class</span > <a href="" >Test</a @@ -253,17 +269,47 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><span class="keyword" >data</span > <a href="" - >Bat</a + >AssocD</a + > * <a href="" + >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="" + >AssocT</a + > * <a href="" + >X</a + > = <a href="" + >Foo</a + > * <a href="" + >X</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >data</span > <a href="" + >Bat</a + > * <a href="" >X</a - > <ul class="subs" - ><li + > <ul class="inst" + ><li class="inst" >= <a name="v:BatX" class="def" >BatX</a > <a href="" >X</a ></li - ><li + ><li class="inst" >| <a name="v:BatXX" class="def" >BatXX</a > { <ul class="subs" @@ -291,36 +337,6 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><tr ><td class="src" ><span class="keyword" - >data</span - > <a href="" - >AssocD</a - > * <a href="" - >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="" - >AssocT</a - > * <a href="" - >X</a - > = <a href="" - >Foo</a - > * <a href="" - >X</a - ></td - ><td class="doc empty" - > </td - ></tr - ><tr - ><td class="src" - ><span class="keyword" >type</span > <a href="" >Foo</a @@ -427,36 +443,6 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><span class="keyword" >data</span > <a href="" - >Bat</a - > <a href="" - >Y</a - > <ul class="subs" - ><li - >= <a name="v:BatY" class="def" - >BatY</a - > <a href="" - >Y</a - ></li - ><li - >| <a href="" - >X</a - > <a name="v::-43-" class="def" - >:+</a - > <a href="" - >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="" >AssocD</a > * <a href="" >Y</a @@ -476,7 +462,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >Y</a > = <a href="" >Bat</a - > <a href="" + > * <a href="" >Y</a ></td ><td class="doc empty" @@ -485,6 +471,24 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><tr ><td class="src" ><span class="keyword" + >data</span + > <a href="" + >Bat</a + > * <a href="" + >Y</a + > = <a name="v:BatY" class="def" + >BatY</a + > <a href="" + >Y</a + ></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="" >Foo</a @@ -517,6 +521,102 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; ><div class="top" ><p class="src" ><span class="keyword" + >data</span + > <a name="t:Z" class="def" + >Z</a + ></p + ><div class="doc" + ><p + >Doc for: data Z</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:ZA" class="def" + >ZA</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:ZB" class="def" + >ZB</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ><div class="subs instances" + ><p id="control.i:Z" class="caption collapser" onclick="toggleSection('i:Z')" + >Instances</p + ><div id="section.i:Z" class="show" + ><table + ><tr + ><td class="src" + ><span class="keyword" + >data</span + > <a href="" + >Bat</a + > <a href="" + >Z</a + > <span class="keyword" + >where</span + ><ul class="inst" + ><li class="inst" + ><a name="v:BatZ1" class="def" + >BatZ1</a + > :: <a href="" + >Z</a + > -> <a href="" + >Bat</a + > <a href="" + >Z</a + > <a href="" + >ZA</a + ></li + ><li class="inst" + ><a name="v:BatZ2" class="def" + >BatZ2</a + > :: { <ul class="subs" + ><li + ><a name="v:batx" class="def" + >batx</a + > :: <a href="" + >X</a + ></li + ><li + ><a name="v:baty" class="def" + >baty</a + > :: <a href="" + >Y</a + ></li + ></ul + > } -> <a href="" + >Bat</a + > <a href="" + >Z</a + > <a href="" + >ZB</a + ></li + ></ul + ></td + ><td class="doc" + ><p + >Doc for: data instance Bat Z</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 @@ -633,27 +733,51 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; > <a href="" >Bat</a > <a href="" - >Y</a - > <ul class="subs" - ><li - >= <a name="v:BatY" class="def" - >BatY</a + >Z</a + > <span class="keyword" + >where</span + ><ul class="inst" + ><li class="inst" + ><a name="v:BatZ1" class="def" + >BatZ1</a + > :: <a href="" + >Z</a + > -> <a href="" + >Bat</a + > <a href="" + >Z</a > <a href="" - >Y</a + >ZA</a ></li - ><li - >| <a href="" - >X</a - > <a name="v::-43-" class="def" - >:+</a + ><li class="inst" + ><a name="v:BatZ2" class="def" + >BatZ2</a + > :: { <ul class="subs" + ><li + ><a name="v:batx" class="def" + >batx</a + > :: <a href="" + >X</a + ></li + ><li + ><a name="v:baty" class="def" + >baty</a + > :: <a href="" + >Y</a + ></li + ></ul + > } -> <a href="" + >Bat</a > <a href="" - >X</a + >Z</a + > <a href="" + >ZB</a ></li ></ul ></td ><td class="doc" ><p - >Doc for: data instance Bat Y</p + >Doc for: data instance Bat Z</p ></td ></tr ><tr @@ -662,16 +786,34 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >data</span > <a href="" >Bat</a + > * <a href="" + >Y</a + > = <a name="v:BatY" class="def" + >BatY</a > <a href="" + >Y</a + ></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="" + >Bat</a + > * <a href="" >X</a - > <ul class="subs" - ><li + > <ul class="inst" + ><li class="inst" >= <a name="v:BatX" class="def" >BatX</a > <a href="" >X</a ></li - ><li + ><li class="inst" >| <a name="v:BatXX" class="def" >BatXX</a > { <ul class="subs" diff --git a/html-test/src/TypeFamilies.hs b/html-test/src/TypeFamilies.hs index 5cd4480e..a79d503e 100644 --- a/html-test/src/TypeFamilies.hs +++ b/html-test/src/TypeFamilies.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeFamilies, UndecidableInstances, PolyKinds, TypeOperators, DataKinds, MultiParamTypeClasses #-} +{-# LANGUAGE TypeFamilies, UndecidableInstances, PolyKinds, TypeOperators, DataKinds, MultiParamTypeClasses, GADTs #-} -- | Doc for: module TypeFamilies module TypeFamilies where @@ -14,6 +14,9 @@ data X -- | Doc for: data Y data Y +-- | Doc for: data Z +data Z = ZA | ZB + -- | Doc for: class Test a class Test a @@ -31,7 +34,7 @@ type instance Foo X = Y type instance Foo Y = X -- | Doc for: data family Bat a -data family Bat a :: * +data family Bat (a :: k) :: * -- | Doc for: data instance Bat X data instance Bat X @@ -39,9 +42,12 @@ data instance Bat 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 +data instance Bat Y = BatY Y -- ^ Doc for: BatY Y + +-- | Doc for: data instance Bat Z +data instance Bat (z :: Z) where + BatZ1 :: Z -> Bat ZA + BatZ2 :: { batx :: X, baty :: Y } -> Bat ZB -- | Doc for: class Assoc a class Assoc a where |