diff options
author | David Waern <david.waern@gmail.com> | 2011-12-03 05:20:20 +0100 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-12-03 05:20:20 +0100 |
commit | b03be836b8491e09e31bc7a1bba14588db79df11 (patch) | |
tree | bcefe05aa4db60813cff625588a468657846c8b8 /tests/html-tests/tests | |
parent | 07c816c5e548824bb089442cf32d70682e47200b (diff) |
Slightly better behaviour on top-levels without type signatures.
- Docs don't get attached to the next top-level with signature by
mistake.
- If there's an export list and the top-level is part of it,
its doc comment shows up in the documentation.
Diffstat (limited to 'tests/html-tests/tests')
-rw-r--r-- | tests/html-tests/tests/Test.hs | 10 | ||||
-rw-r--r-- | tests/html-tests/tests/Test.html.ref | 34 |
2 files changed, 43 insertions, 1 deletions
diff --git a/tests/html-tests/tests/Test.hs b/tests/html-tests/tests/Test.hs index d7a0a716..d352f029 100644 --- a/tests/html-tests/tests/Test.hs +++ b/tests/html-tests/tests/Test.hs @@ -96,7 +96,9 @@ module Test ( $ a non /literal/ line $ -} - f' + f', + + withType, withoutType ) where import Hidden @@ -402,6 +404,12 @@ newp = undefined -- but f' doesn't get link'd 'f\'' f' :: Int +-- | Comment on a definition without type signature +withoutType = undefined + +-- | Comment on a definition with type signature +withType :: Int +withType = 1 -- Add some definitions here so that this file can be compiled with GHC diff --git a/tests/html-tests/tests/Test.html.ref b/tests/html-tests/tests/Test.html.ref index e46f96b5..b9afa1e2 100644 --- a/tests/html-tests/tests/Test.html.ref +++ b/tests/html-tests/tests/Test.html.ref @@ -665,6 +665,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");}; > :: <a href="" >Int</a ></li + ><li class="src short" + ><a href="" + >withType</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >withoutType</a + > :: a</li ></ul ></div ><div id="interface" @@ -2230,6 +2240,30 @@ test2 </p ></div ></div + ><div class="top" + ><p class="src" + ><a name="v:withType" class="def" + >withType</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >Comment on a definition with type signature +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:withoutType" class="def" + >withoutType</a + > :: a</p + ><div class="doc" + ><p + >Comment on a definition without type signature +</p + ></div + ></div ></div ></div ><div id="footer" |