From b03be836b8491e09e31bc7a1bba14588db79df11 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 3 Dec 2011 05:20:20 +0100 Subject: 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. --- tests/html-tests/tests/Test.hs | 10 +++++++++- tests/html-tests/tests/Test.html.ref | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'tests') 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");}; > :: Int
  • withType :: Int
  • withoutType :: a
  • but f' doesn't get link'd 'f\'' +

    withType :: Int

    Comment on a definition with type signature +

    withoutType :: a

    Comment on a definition without type signature