From 11385cf01f0d852782444ebfeb4e5092c174c6f8 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Thu, 12 Jan 2012 21:28:14 +0100 Subject: Make sure that generated xhtml is valid (close #186) Thanks to Phyx. --- tests/html-tests/tests/A.html.ref | 2 +- tests/html-tests/tests/B.html.ref | 2 +- tests/html-tests/tests/Bug1.html.ref | 2 +- tests/html-tests/tests/Bug2.html.ref | 2 +- tests/html-tests/tests/Bug3.html.ref | 2 +- tests/html-tests/tests/Bug4.html.ref | 2 +- tests/html-tests/tests/Bug6.html.ref | 2 +- tests/html-tests/tests/Bug7.html.ref | 2 +- tests/html-tests/tests/Bug8.html.ref | 2 +- tests/html-tests/tests/Bugs.html.ref | 2 +- tests/html-tests/tests/CrossPackageDocs.html.ref | 2 +- tests/html-tests/tests/Examples.html.ref | 2 +- tests/html-tests/tests/FunArgs.html.ref | 2 +- tests/html-tests/tests/GADTRecords.html.ref | 2 +- tests/html-tests/tests/Hash.html.ref | 2 +- tests/html-tests/tests/NamedDoc.html.ref | 2 +- tests/html-tests/tests/NoLayout.html.ref | 2 +- tests/html-tests/tests/NonGreedy.html.ref | 2 +- tests/html-tests/tests/QuasiExpr.html.ref | 2 +- tests/html-tests/tests/QuasiQuote.html.ref | 2 +- tests/html-tests/tests/TH.html.ref | 2 +- tests/html-tests/tests/TH2.html.ref | 2 +- tests/html-tests/tests/Test.html.ref | 2 +- tests/html-tests/tests/Ticket112.html.ref | 2 +- tests/html-tests/tests/Ticket61.html.ref | 2 +- tests/html-tests/tests/Ticket75.html.ref | 2 +- tests/html-tests/tests/TypeFamilies.html.ref | 2 +- tests/html-tests/tests/TypeOperators.html.ref | 2 +- tests/html-tests/tests/Unicode.html.ref | 2 +- tests/html-tests/tests/Visible.html.ref | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) (limited to 'tests/html-tests') diff --git a/tests/html-tests/tests/A.html.ref b/tests/html-tests/tests/A.html.ref index 38a39479..d5e6dcc0 100644 --- a/tests/html-tests/tests/A.html.ref +++ b/tests/html-tests/tests/A.html.ref @@ -25,7 +25,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");}; >Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Index

 

Date: Wed, 25 Jan 2012 00:44:15 +0100 Subject: Fix bug introduced in my recent refactoring. --- src/Haddock/Interface/Create.hs | 34 ++++++++------- tests/html-tests/tests/A.hs | 9 ++++ tests/html-tests/tests/A.html.ref | 88 +++++++++++++++++++++++++++++++++++++++ tests/html-tests/tests/B.hs | 4 +- tests/html-tests/tests/B.html.ref | 57 +++++++++++++++++++++++++ 5 files changed, 174 insertions(+), 18 deletions(-) (limited to 'tests/html-tests') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 580aaa83..0a0c0e2d 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -433,13 +433,12 @@ mkExportItems declWith :: Name -> ErrMsgGhc [ ExportItem Name ] declWith t = - let (doc, subs) = exportDecl t docMap argMap subMap in case findDecl t of - [L _ (ValD _)] -> do + ([L _ (ValD _)], (doc, _)) -> do -- Top-level binding without type signature export <- hiValExportItem t doc return [export] - ds | decl : _ <- filter (not . isValD . unLoc) ds -> + (ds, docs_) | decl : _ <- filter (not . isValD . unLoc) ds -> let declNames = getMainDeclBinder (unL decl) in case () of _ @@ -461,7 +460,7 @@ mkExportItems return [] -- normal case - | otherwise -> return [ mkExportDecl t newDecl (doc, subs) ] + | otherwise -> return [ mkExportDecl t newDecl docs_ ] where -- Since a single signature might refer to many names, we -- need to filter the ones that are actually exported. This @@ -475,7 +474,7 @@ mkExportItems _ -> decl -- Declaration from another package - [] -> do + ([], _) -> do mayDecl <- hiDecl t case mayDecl of Nothing -> return [ ExportNoDecl t [] ] @@ -489,7 +488,7 @@ mkExportItems let subs_ = [ (n, noDocForDecl) | (n, _, _) <- subordinates (unLoc decl) ] return [ mkExportDecl t decl (noDocForDecl, subs_) ] Just iface -> do - return [ mkExportDecl t decl (exportDecl t (instDocMap iface) (instArgMap iface) (instSubMap iface)) ] + return [ mkExportDecl t decl (lookupDocs t (instDocMap iface) (instArgMap iface) (instSubMap iface)) ] _ -> return [] @@ -506,13 +505,15 @@ mkExportItems isExported = (`elem` exportedNames) - findDecl :: Name -> [LHsDecl Name] - findDecl name - | mdl == thisMod = maybe [] id (M.lookup name declMap) - | Just iface <- M.lookup mdl modMap = maybe [] id (M.lookup name (ifaceDeclMap iface)) - | otherwise = [] + findDecl :: Name -> ([LHsDecl Name], (DocForDecl Name, [(Name, DocForDecl Name)])) + findDecl n + | m == thisMod, Just ds <- M.lookup n declMap = + (ds, lookupDocs n docMap argMap subMap) + | Just iface <- M.lookup m modMap, Just ds <- M.lookup n (ifaceDeclMap iface) = + (ds, lookupDocs n (ifaceDocMap iface) (ifaceArgMap iface) (ifaceSubMap iface)) + | otherwise = ([], (noDocForDecl, [])) where - mdl = nameModule name + m = nameModule n hiDecl :: Name -> ErrMsgGhc (Maybe (LHsDecl Name)) @@ -533,8 +534,9 @@ hiValExportItem name doc = do Just decl -> return (ExportDecl decl doc [] []) -exportDecl :: Name -> DocMap Name -> ArgMap Name -> SubMap -> (DocForDecl Name, [(Name, DocForDecl Name)]) -exportDecl name docMap argMap subMap = +-- | Lookup docs for a declaration from maps. +lookupDocs :: Name -> DocMap Name -> ArgMap Name -> SubMap -> (DocForDecl Name, [(Name, DocForDecl Name)]) +lookupDocs name docMap argMap subMap = let lookupArgMap x = maybe M.empty id (M.lookup x argMap) in let doc = (M.lookup name docMap, lookupArgMap name) in let subs = [ (sub, (M.lookup sub docMap, lookupArgMap sub)) | sub <- maybe [] id (M.lookup name subMap) ] in @@ -616,12 +618,12 @@ fullModuleContents dflags gre (docMap, argMap, subMap, declMap) decls = mkExportItem (L _ (ValD d)) | name:_ <- collectHsBindBinders d, Just [L _ (ValD _)] <- M.lookup name declMap = -- Top-level binding without type signature. - let (doc, _) = exportDecl name docMap argMap subMap in + let (doc, _) = lookupDocs name docMap argMap subMap in fmap Just (hiValExportItem name doc) | otherwise = return Nothing mkExportItem decl | name:_ <- getMainDeclBinder (unLoc decl) = - let (doc, subs) = exportDecl name docMap argMap subMap in + let (doc, subs) = lookupDocs name docMap argMap subMap in return $ Just (ExportDecl decl doc subs []) | otherwise = return Nothing diff --git a/tests/html-tests/tests/A.hs b/tests/html-tests/tests/A.hs index ac8fad49..606b0865 100644 --- a/tests/html-tests/tests/A.hs +++ b/tests/html-tests/tests/A.hs @@ -1,8 +1,17 @@ module A where + data A = A other :: Int other = 2 +-- | Doc for test2 test2 :: Bool test2 = False + +-- | Should show up on the page for both modules A and B +data X = X -- ^ Doc for consructor + +-- | Should show up on the page for both modules A and B +reExport :: Int +reExport = 1 diff --git a/tests/html-tests/tests/A.html.ref b/tests/html-tests/tests/A.html.ref index 38a39479..143f8a73 100644 --- a/tests/html-tests/tests/A.html.ref +++ b/tests/html-tests/tests/A.html.ref @@ -41,6 +41,46 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");}; >

A

Synopsis

Documentation

:: Bool

Doc for test2 +

data X

Should show up on the page for both modules A and B +

Constructors

X

Doc for consructor +

reExport :: Int

Should show up on the page for both modules A and B +

:: Int
  • reExport :: Int
  • data X = X
  • reExport :: Int

    Should show up on the page for both modules A and B +

    data X

    Should show up on the page for both modules A and B +

    Constructors

    X

    Doc for consructor +

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Index

     

    Date: Sat, 4 Feb 2012 03:21:12 +0100 Subject: Use mapM_ in accept.hs as well. --- tests/html-tests/accept.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/html-tests') diff --git a/tests/html-tests/accept.hs b/tests/html-tests/accept.hs index fe1e5422..49da5c5a 100644 --- a/tests/html-tests/accept.hs +++ b/tests/html-tests/accept.hs @@ -13,9 +13,9 @@ main = do contents <- getDirectoryContents (dir "output") if not $ null args then - mapM copy [ "output" file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ] + mapM_ copy [ "output" file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ] else - mapM copy [ "output" file | file <- contents, ".html" `isSuffixOf` file ] + mapM_ copy [ "output" file | file <- contents, ".html" `isSuffixOf` file ] copy file = do -- cgit v1.2.3 From fbef8bafd21d34f83326f7dd06bb82c563571345 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 4 Feb 2012 03:21:33 +0100 Subject: Remove copy.hs - use accept.hs instead. --- tests/html-tests/copy.hs | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 tests/html-tests/copy.hs (limited to 'tests/html-tests') diff --git a/tests/html-tests/copy.hs b/tests/html-tests/copy.hs deleted file mode 100644 index 188bfd33..00000000 --- a/tests/html-tests/copy.hs +++ /dev/null @@ -1,37 +0,0 @@ -import System.Cmd -import System.Environment -import System.FilePath -import System.Exit -import System.Directory -import Data.List -import Control.Monad - - -main :: IO () -main = do - args <- getArgs - dir <- getCurrentDirectory - contents <- getDirectoryContents (dir "output") - if not $ null args - then - mapM_ copy [ "output" file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ] - else - mapM_ copy [ "output" file | file <- contents, ".html" `isSuffixOf` file ] - - -copy file = do - let new = "tests" takeFileName file <.> ".ref" - print file - print new - contents <- readFile file - writeFile new (stripLinks contents) - - -stripLinks str = - let prefix = " prefix ++ stripLinks (dropWhile (/= '"') str') - Nothing -> - case str of - [] -> [] - x : xs -> x : stripLinks xs -- cgit v1.2.3 From dec878df8eebb8e831d42db865d59b4e082ec4de Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 1 Apr 2012 01:51:19 +0200 Subject: Disable unicode test. --- tests/html-tests/tests/Unicode.hs | 6 ------ tests/html-tests/tests/Unicode.hs.disabled | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 tests/html-tests/tests/Unicode.hs create mode 100644 tests/html-tests/tests/Unicode.hs.disabled (limited to 'tests/html-tests') diff --git a/tests/html-tests/tests/Unicode.hs b/tests/html-tests/tests/Unicode.hs deleted file mode 100644 index d5bbf445..00000000 --- a/tests/html-tests/tests/Unicode.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Unicode where - --- | γλώσσα -x :: Int -x = 1 - diff --git a/tests/html-tests/tests/Unicode.hs.disabled b/tests/html-tests/tests/Unicode.hs.disabled new file mode 100644 index 00000000..d5bbf445 --- /dev/null +++ b/tests/html-tests/tests/Unicode.hs.disabled @@ -0,0 +1,6 @@ +module Unicode where + +-- | γλώσσα +x :: Int +x = 1 + -- cgit v1.2.3 From b8845b879d968c2888091ca2dd1bc7bdc208a166 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 1 Apr 2012 18:10:30 +0200 Subject: Don't crash on unicode strings in doc comments. --- src/Haddock/Lex.x | 3 ++- tests/html-tests/tests/Unicode.hs | 6 ++++++ tests/html-tests/tests/Unicode.hs.disabled | 6 ------ 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 tests/html-tests/tests/Unicode.hs delete mode 100644 tests/html-tests/tests/Unicode.hs.disabled (limited to 'tests/html-tests') diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x index f65aee8c..b9ebe688 100644 --- a/src/Haddock/Lex.x +++ b/src/Haddock/Lex.x @@ -34,6 +34,7 @@ import Data.Char import Data.Word (Word8) import Numeric import System.IO.Unsafe +import Debug.Trace } $ws = $white # \n @@ -181,7 +182,7 @@ tokenise dflags str (line, col) = let toks = go (posn, '\n', eofHack str) para i go inp@(pos, _, str) sc = case alexScan inp sc of AlexEOF -> [] - AlexError _ -> error "lexical error" + AlexError _ -> [] AlexSkip inp' _ -> go inp' sc AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags 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.hs.disabled b/tests/html-tests/tests/Unicode.hs.disabled deleted file mode 100644 index d5bbf445..00000000 --- a/tests/html-tests/tests/Unicode.hs.disabled +++ /dev/null @@ -1,6 +0,0 @@ -module Unicode where - --- | γλώσσα -x :: Int -x = 1 - -- cgit v1.2.3 From faf1c0231e199206ff26c13f982d853bf81517f3 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 1 Apr 2012 20:13:35 +0200 Subject: Add test for --ignore-all-exports flag/ignore-exports pragma. --- tests/html-tests/tests/IgnoreExports.hs | 10 +++ tests/html-tests/tests/IgnoreExports.html.ref | 101 ++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 tests/html-tests/tests/IgnoreExports.hs create mode 100644 tests/html-tests/tests/IgnoreExports.html.ref (limited to 'tests/html-tests') diff --git a/tests/html-tests/tests/IgnoreExports.hs b/tests/html-tests/tests/IgnoreExports.hs new file mode 100644 index 00000000..0321ad02 --- /dev/null +++ b/tests/html-tests/tests/IgnoreExports.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_HADDOCK ignore-exports #-} +module IgnoreExports (foo) where + +-- | documentation for foo +foo :: Int +foo = 23 + +-- | documentation for bar +bar :: Int +bar = 23 diff --git a/tests/html-tests/tests/IgnoreExports.html.ref b/tests/html-tests/tests/IgnoreExports.html.ref new file mode 100644 index 00000000..4c093035 --- /dev/null +++ b/tests/html-tests/tests/IgnoreExports.html.ref @@ -0,0 +1,101 @@ + +IgnoreExports
    Safe HaskellNone

    IgnoreExports

    Synopsis

    Documentation

    foo :: Int

    documentation for foo +

    bar :: Int

    documentation for bar +

    -- cgit v1.2.3 From d92d5a98adab5a94d34b763b9f4fd07557977ccb Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 16 May 2012 21:32:50 +0200 Subject: Bump version number. --- doc/haddock.xml | 2 +- haddock.cabal | 2 +- haddock.spec | 2 +- tests/html-tests/tests/A.html.ref | 2 +- tests/html-tests/tests/B.html.ref | 2 +- tests/html-tests/tests/Bug1.html.ref | 2 +- tests/html-tests/tests/Bug2.html.ref | 2 +- tests/html-tests/tests/Bug3.html.ref | 2 +- tests/html-tests/tests/Bug4.html.ref | 2 +- tests/html-tests/tests/Bug6.html.ref | 2 +- tests/html-tests/tests/Bug7.html.ref | 2 +- tests/html-tests/tests/Bug8.html.ref | 2 +- tests/html-tests/tests/BugDeprecated.html.ref | 2 +- tests/html-tests/tests/BugExportHeadings.html.ref | 2 +- tests/html-tests/tests/Bugs.html.ref | 2 +- tests/html-tests/tests/CrossPackageDocs.html.ref | 2 +- tests/html-tests/tests/DeprecatedClass.html.ref | 2 +- tests/html-tests/tests/DeprecatedData.html.ref | 2 +- tests/html-tests/tests/DeprecatedFunction.html.ref | 2 +- .../html-tests/tests/DeprecatedFunction2.html.ref | 2 +- .../html-tests/tests/DeprecatedFunction3.html.ref | 2 +- tests/html-tests/tests/DeprecatedModule.html.ref | 2 +- tests/html-tests/tests/DeprecatedModule2.html.ref | 2 +- tests/html-tests/tests/DeprecatedNewtype.html.ref | 2 +- .../html-tests/tests/DeprecatedTypeFamily.html.ref | 2 +- .../tests/DeprecatedTypeSynonym.html.ref | 2 +- tests/html-tests/tests/Examples.html.ref | 2 +- tests/html-tests/tests/FunArgs.html.ref | 2 +- tests/html-tests/tests/GADTRecords.html.ref | 2 +- tests/html-tests/tests/Hash.html.ref | 2 +- tests/html-tests/tests/IgnoreExports.html.ref | 2 +- tests/html-tests/tests/ModuleWithWarning.html.ref | 2 +- tests/html-tests/tests/NamedDoc.html.ref | 2 +- tests/html-tests/tests/NoLayout.html.ref | 2 +- tests/html-tests/tests/NonGreedy.html.ref | 2 +- tests/html-tests/tests/QuasiExpr.html.ref | 2 +- tests/html-tests/tests/QuasiQuote.html.ref | 2 +- tests/html-tests/tests/TH.html.ref | 2 +- tests/html-tests/tests/TH2.html.ref | 2 +- tests/html-tests/tests/Test.html.ref | 2 +- tests/html-tests/tests/Ticket112.html.ref | 2 +- tests/html-tests/tests/Ticket61.html.ref | 2 +- tests/html-tests/tests/Ticket75.html.ref | 2 +- tests/html-tests/tests/TypeFamilies.html.ref | 2 +- tests/html-tests/tests/TypeOperators.html.ref | 2 +- tests/html-tests/tests/Unicode.html.ref | 2 +- tests/html-tests/tests/Visible.html.ref | 2 +- tests/html-tests/tests/frames.html.ref | 8 +++-- tests/html-tests/tests/mini_A.html.ref | 14 ++++++++ tests/html-tests/tests/mini_B.html.ref | 14 ++++++++ tests/html-tests/tests/mini_IgnoreExports.html.ref | 37 ++++++++++++++++++++++ 51 files changed, 117 insertions(+), 50 deletions(-) create mode 100644 tests/html-tests/tests/mini_IgnoreExports.html.ref (limited to 'tests/html-tests') diff --git a/doc/haddock.xml b/doc/haddock.xml index 7b5a07e6..27dd69d8 100644 --- a/doc/haddock.xml +++ b/doc/haddock.xml @@ -21,7 +21,7 @@ Simon Marlow, David Waern - This document describes Haddock version 2.10.0, a Haskell + This document describes Haddock version 2.11.0, a Haskell documentation tool. diff --git a/haddock.cabal b/haddock.cabal index 84d3c2a8..9d6f1a9b 100644 --- a/haddock.cabal +++ b/haddock.cabal @@ -1,5 +1,5 @@ name: haddock -version: 2.10.0 +version: 2.11.0 synopsis: A documentation-generation tool for Haskell libraries description: Haddock is a documentation-generation tool for Haskell libraries diff --git a/haddock.spec b/haddock.spec index 4a602e02..8b2a5599 100644 --- a/haddock.spec +++ b/haddock.spec @@ -17,7 +17,7 @@ # version label of your release tarball. %define name haddock -%define version 2.10.0 +%define version 2.11.0 %define release 1 Name: %{name} diff --git a/tests/html-tests/tests/A.html.ref b/tests/html-tests/tests/A.html.ref index 152dabf7..424ce52c 100644 --- a/tests/html-tests/tests/A.html.ref +++ b/tests/html-tests/tests/A.html.ref @@ -176,7 +176,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");}; >

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    Produced by Haddock version 2.10.0

    version 2.11.0

    + + - - + + - + diff --git a/tests/html-tests/tests/mini_A.html.ref b/tests/html-tests/tests/mini_A.html.ref index 3de17437..cbe50e41 100644 --- a/tests/html-tests/tests/mini_A.html.ref +++ b/tests/html-tests/tests/mini_A.html.ref @@ -39,6 +39,20 @@ window.onload = function () {pageLoad();}; >test2

    data X

    reExport

    test

    reExport

    data X

    +IgnoreExports

    IgnoreExports

    -- cgit v1.2.3 From 15aa68da3523a56475298d91f288587c4744de4a Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Thu, 17 May 2012 17:47:32 +0200 Subject: Add test for deprecated record field --- tests/html-tests/tests/DeprecatedRecord.hs | 9 ++ tests/html-tests/tests/DeprecatedRecord.html.ref | 150 +++++++++++++++++++++ .../tests/mini_DeprecatedRecord.html.ref | 33 +++++ 3 files changed, 192 insertions(+) create mode 100644 tests/html-tests/tests/DeprecatedRecord.hs create mode 100644 tests/html-tests/tests/DeprecatedRecord.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedRecord.html.ref (limited to 'tests/html-tests') diff --git a/tests/html-tests/tests/DeprecatedRecord.hs b/tests/html-tests/tests/DeprecatedRecord.hs new file mode 100644 index 00000000..d44499e7 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedRecord.hs @@ -0,0 +1,9 @@ +module DeprecatedRecord where + +-- | type Foo +data Foo = Foo { + fooName :: String -- ^ some name +, fooValue :: Int -- ^ some value +} + +{-# DEPRECATED fooValue "do not use this" #-} diff --git a/tests/html-tests/tests/DeprecatedRecord.html.ref b/tests/html-tests/tests/DeprecatedRecord.html.ref new file mode 100644 index 00000000..d6648bc2 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedRecord.html.ref @@ -0,0 +1,150 @@ + +DeprecatedRecord
    Safe HaskellNone

    DeprecatedRecord

    Synopsis

    Documentation

    data Foo

    type Foo +

    Constructors

    Foo 

    Fields

    fooName :: String

    some name +

    fooValue :: Int

    Deprecated: do not use this

    some value +

    diff --git a/tests/html-tests/tests/mini_DeprecatedRecord.html.ref b/tests/html-tests/tests/mini_DeprecatedRecord.html.ref new file mode 100644 index 00000000..3d949d2d --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedRecord.html.ref @@ -0,0 +1,33 @@ + +DeprecatedRecord

    DeprecatedRecord

    data Foo

    -- cgit v1.2.3 From 37e0abebc1e14e59ac352b0a5f633a63233f04de Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Thu, 17 May 2012 17:20:17 +0200 Subject: Add test for #205 --- tests/html-tests/tests/PruneWithWarning.hs | 9 ++++ tests/html-tests/tests/PruneWithWarning.html.ref | 55 ++++++++++++++++++++++ .../tests/mini_PruneWithWarning.html.ref | 25 ++++++++++ 3 files changed, 89 insertions(+) create mode 100644 tests/html-tests/tests/PruneWithWarning.hs create mode 100644 tests/html-tests/tests/PruneWithWarning.html.ref create mode 100644 tests/html-tests/tests/mini_PruneWithWarning.html.ref (limited to 'tests/html-tests') diff --git a/tests/html-tests/tests/PruneWithWarning.hs b/tests/html-tests/tests/PruneWithWarning.hs new file mode 100644 index 00000000..fefe81f5 --- /dev/null +++ b/tests/html-tests/tests/PruneWithWarning.hs @@ -0,0 +1,9 @@ +{-# OPTIONS_HADDOCK prune #-} +module PruneWithWarning (foo, bar) where + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} + +bar :: Int +bar = 42 diff --git a/tests/html-tests/tests/PruneWithWarning.html.ref b/tests/html-tests/tests/PruneWithWarning.html.ref new file mode 100644 index 00000000..7fe3edf1 --- /dev/null +++ b/tests/html-tests/tests/PruneWithWarning.html.ref @@ -0,0 +1,55 @@ + +PruneWithWarning
    Safe HaskellNone

    PruneWithWarning

    diff --git a/tests/html-tests/tests/mini_PruneWithWarning.html.ref b/tests/html-tests/tests/mini_PruneWithWarning.html.ref new file mode 100644 index 00000000..9eb3aa00 --- /dev/null +++ b/tests/html-tests/tests/mini_PruneWithWarning.html.ref @@ -0,0 +1,25 @@ + +PruneWithWarning

    PruneWithWarning

    -- cgit v1.2.3