diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-31 05:34:36 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-31 05:34:36 +0100 |
commit | bd134c7b2a6880bf3858fd8c27fa16ab946d7718 (patch) | |
tree | 811926786f30e17ed0370ad80d9f444009ea7213 /html-test | |
parent | f3c7cd34d066cd40cb4983893165de038974fd95 (diff) |
Print kind signatures on GADTs
Diffstat (limited to 'html-test')
-rw-r--r-- | html-test/ref/AdvanceTypes.html | 2 | ||||
-rw-r--r-- | html-test/ref/Bug85.html | 135 | ||||
-rw-r--r-- | html-test/src/Bug85.hs | 15 |
3 files changed, 151 insertions, 1 deletions
diff --git a/html-test/ref/AdvanceTypes.html b/html-test/ref/AdvanceTypes.html index ab37fe61..b918a220 100644 --- a/html-test/ref/AdvanceTypes.html +++ b/html-test/ref/AdvanceTypes.html @@ -50,7 +50,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_AdvanceTypes.html");}; >data</span > <a name="t:Pattern" class="def" >Pattern</a - > <span class="keyword" + > :: [*] -> * <span class="keyword" >where</span ></p ><div class="subs constructors" diff --git a/html-test/ref/Bug85.html b/html-test/ref/Bug85.html new file mode 100644 index 00000000..bb1f03a3 --- /dev/null +++ b/html-test/ref/Bug85.html @@ -0,0 +1,135 @@ +<!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 + >Bug85</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_Bug85.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" + >Bug85</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Foo" class="def" + >Foo</a + > :: (* -> *) -> * -> * <span class="keyword" + >where</span + ></p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Bar" class="def" + >Bar</a + > :: f x -> <a href="" + >Foo</a + > f (f x)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Baz" class="def" + >Baz</a + > :: * <span class="keyword" + >where</span + ></p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Baz-39-" class="def" + >Baz'</a + > :: <a href="" + >Baz</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Qux" class="def" + >Qux</a + > <span class="keyword" + >where</span + ></p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Quux" class="def" + >Quux</a + > :: <a href="" + >Qux</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></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/src/Bug85.hs b/html-test/src/Bug85.hs new file mode 100644 index 00000000..9c5b768b --- /dev/null +++ b/html-test/src/Bug85.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE GADTs, KindSignatures #-} +{-# OPTIONS_HADDOCK use-unicode #-} +module Bug85 where + +-- explicitly stated non-trivial kind +data Foo :: (* -> *) -> * -> * where + Bar :: f x -> Foo f (f x) + +-- Just kind * but explicitly written +data Baz :: * where + Baz' :: Baz + +-- No kind signature written down at all +data Qux where + Quux :: Qux |