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

    Date: Sat, 3 Dec 2011 05:38:10 +0100 Subject: Add a test for Unicode doc comments. --- tests/html-tests/tests/Unicode.hs | 6 +++ tests/html-tests/tests/Unicode.html.ref | 82 +++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 tests/html-tests/tests/Unicode.hs create mode 100644 tests/html-tests/tests/Unicode.html.ref (limited to 'tests') diff --git a/tests/html-tests/tests/Unicode.hs b/tests/html-tests/tests/Unicode.hs new file mode 100644 index 00000000..d5bbf445 --- /dev/null +++ b/tests/html-tests/tests/Unicode.hs @@ -0,0 +1,6 @@ +module Unicode where + +-- | γλώσσα +x :: Int +x = 1 + diff --git a/tests/html-tests/tests/Unicode.html.ref b/tests/html-tests/tests/Unicode.html.ref new file mode 100644 index 00000000..29990e59 --- /dev/null +++ b/tests/html-tests/tests/Unicode.html.ref @@ -0,0 +1,82 @@ + +Unicode

     

    Safe HaskellNone

    Unicode

    Synopsis

    Documentation

    x :: Int

    γλώσσα +

    -- cgit v1.2.3