From 958d64d77572c47d249965d7146ac17a23de806d Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 15 Oct 2012 10:34:28 +0200 Subject: Move HTML tests to directory /html-test/ --- .gitignore | 2 +- haddock.cabal | 6 +- html-test/README | 24 + html-test/accept.hs | 43 + html-test/runtests.hs | 152 ++ html-test/tests/A.hs | 17 + html-test/tests/A.html.ref | 183 ++ html-test/tests/AdvanceTypes.hs | 9 + html-test/tests/AdvanceTypes.html.ref | 97 + html-test/tests/B.hs | 8 + html-test/tests/B.html.ref | 175 ++ html-test/tests/Bug1.hs | 6 + html-test/tests/Bug1.html.ref | 103 + html-test/tests/Bug2.hs | 4 + html-test/tests/Bug2.html.ref | 65 + html-test/tests/Bug3.hs | 6 + html-test/tests/Bug3.html.ref | 83 + html-test/tests/Bug4.hs | 5 + html-test/tests/Bug4.html.ref | 82 + html-test/tests/Bug6.hs | 23 + html-test/tests/Bug6.html.ref | 335 +++ html-test/tests/Bug7.hs | 12 + html-test/tests/Bug7.html.ref | 173 ++ html-test/tests/Bug8.hs | 14 + html-test/tests/Bug8.html.ref | 131 ++ html-test/tests/BugDeprecated.hs | 18 + html-test/tests/BugDeprecated.html.ref | 198 ++ html-test/tests/BugExportHeadings.hs | 29 + html-test/tests/BugExportHeadings.html.ref | 220 ++ html-test/tests/Bugs.hs | 3 + html-test/tests/Bugs.html.ref | 81 + html-test/tests/CrossPackageDocs.hs | 4 + html-test/tests/CrossPackageDocs.html.ref | 298 +++ html-test/tests/DeprecatedClass.hs | 15 + html-test/tests/DeprecatedClass.html.ref | 161 ++ html-test/tests/DeprecatedData.hs | 15 + html-test/tests/DeprecatedData.html.ref | 198 ++ html-test/tests/DeprecatedFunction.hs | 10 + html-test/tests/DeprecatedFunction.html.ref | 110 + html-test/tests/DeprecatedFunction2.hs | 6 + html-test/tests/DeprecatedFunction2.html.ref | 84 + html-test/tests/DeprecatedFunction3.hs | 6 + html-test/tests/DeprecatedFunction3.html.ref | 84 + html-test/tests/DeprecatedModule.hs | 5 + html-test/tests/DeprecatedModule.html.ref | 83 + html-test/tests/DeprecatedModule2.hs | 4 + html-test/tests/DeprecatedModule2.html.ref | 76 + html-test/tests/DeprecatedNewtype.hs | 10 + html-test/tests/DeprecatedNewtype.html.ref | 161 ++ html-test/tests/DeprecatedReExport.hs | 16 + html-test/tests/DeprecatedReExport.html.ref | 133 ++ html-test/tests/DeprecatedRecord.hs | 9 + html-test/tests/DeprecatedRecord.html.ref | 151 ++ html-test/tests/DeprecatedTypeFamily.hs | 9 + html-test/tests/DeprecatedTypeFamily.html.ref | 108 + html-test/tests/DeprecatedTypeSynonym.hs | 9 + html-test/tests/DeprecatedTypeSynonym.html.ref | 116 + html-test/tests/DeprecationMessageParseError.hs | 12 + .../tests/DeprecationMessageParseError.html.ref | 101 + html-test/tests/Examples.hs | 39 + html-test/tests/Examples.html.ref | 179 ++ html-test/tests/FunArgs.hs | 16 + html-test/tests/FunArgs.html.ref | 176 ++ html-test/tests/GADTRecords.hs | 12 + html-test/tests/GADTRecords.html.ref | 234 ++ html-test/tests/Hash.hs | 51 + html-test/tests/Hash.html.ref | 337 +++ html-test/tests/Hidden.hs | 6 + html-test/tests/HiddenInstances.hs | 35 + html-test/tests/HiddenInstances.html.ref | 169 ++ html-test/tests/HiddenInstancesA.hs | 17 + html-test/tests/HiddenInstancesB.hs | 2 + html-test/tests/HiddenInstancesB.html.ref | 143 ++ html-test/tests/Hyperlinks.hs | 8 + html-test/tests/Hyperlinks.html.ref | 89 + html-test/tests/IgnoreExports.hs | 10 + html-test/tests/IgnoreExports.html.ref | 101 + html-test/tests/ModuleWithWarning.hs | 5 + html-test/tests/ModuleWithWarning.html.ref | 83 + html-test/tests/NamedDoc.hs | 4 + html-test/tests/NamedDoc.html.ref | 68 + html-test/tests/NoLayout.hs | 12 + html-test/tests/NoLayout.html.ref | 86 + html-test/tests/NonGreedy.hs | 5 + html-test/tests/NonGreedy.html.ref | 82 + html-test/tests/Properties.hs | 9 + html-test/tests/Properties.html.ref | 92 + html-test/tests/PruneWithWarning.hs | 15 + html-test/tests/PruneWithWarning.html.ref | 72 + html-test/tests/QuasiExpr.hs | 34 + html-test/tests/QuasiExpr.html.ref | 221 ++ html-test/tests/QuasiQuote.hs | 9 + html-test/tests/QuasiQuote.html.ref | 65 + html-test/tests/TH.hs | 8 + html-test/tests/TH.html.ref | 63 + html-test/tests/TH2.hs | 7 + html-test/tests/TH2.html.ref | 63 + html-test/tests/Test.hs | 422 ++++ html-test/tests/Test.html.ref | 2245 ++++++++++++++++++++ html-test/tests/Ticket112.hs | 9 + html-test/tests/Ticket112.html.ref | 82 + html-test/tests/Ticket61.hs | 3 + html-test/tests/Ticket61.html.ref | 80 + html-test/tests/Ticket61_Hidden.hs | 7 + html-test/tests/Ticket75.hs | 7 + html-test/tests/Ticket75.html.ref | 116 + html-test/tests/TypeFamilies.hs | 28 + html-test/tests/TypeFamilies.html.ref | 212 ++ html-test/tests/TypeOperators.hs | 20 + html-test/tests/TypeOperators.html.ref | 185 ++ html-test/tests/Unicode.hs.disabled | 6 + html-test/tests/Unicode.html.ref | 82 + html-test/tests/Visible.hs | 3 + html-test/tests/Visible.html.ref | 67 + html-test/tests/frames.html.ref | 30 + html-test/tests/mini_A.html.ref | 59 + html-test/tests/mini_AdvanceTypes.html.ref | 33 + html-test/tests/mini_B.html.ref | 45 + html-test/tests/mini_Bug1.html.ref | 33 + html-test/tests/mini_Bug2.html.ref | 31 + html-test/tests/mini_Bug3.html.ref | 31 + html-test/tests/mini_Bug4.html.ref | 31 + html-test/tests/mini_Bug6.html.ref | 65 + html-test/tests/mini_Bug7.html.ref | 41 + html-test/tests/mini_Bug8.html.ref | 63 + html-test/tests/mini_BugDeprecated.html.ref | 61 + html-test/tests/mini_BugExportHeadings.html.ref | 79 + html-test/tests/mini_Bugs.html.ref | 33 + html-test/tests/mini_CrossPackageDocs.html.ref | 45 + html-test/tests/mini_DeprecatedClass.html.ref | 41 + html-test/tests/mini_DeprecatedData.html.ref | 41 + html-test/tests/mini_DeprecatedFunction.html.ref | 37 + html-test/tests/mini_DeprecatedFunction2.html.ref | 31 + html-test/tests/mini_DeprecatedFunction3.html.ref | 31 + html-test/tests/mini_DeprecatedModule.html.ref | 31 + html-test/tests/mini_DeprecatedModule2.html.ref | 31 + html-test/tests/mini_DeprecatedNewtype.html.ref | 41 + html-test/tests/mini_DeprecatedReExport.html.ref | 37 + html-test/tests/mini_DeprecatedRecord.html.ref | 33 + html-test/tests/mini_DeprecatedTypeFamily.html.ref | 41 + .../tests/mini_DeprecatedTypeSynonym.html.ref | 41 + .../mini_DeprecationMessageParseError.html.ref | 31 + html-test/tests/mini_Examples.html.ref | 31 + html-test/tests/mini_FunArgs.html.ref | 37 + html-test/tests/mini_GADTRecords.html.ref | 33 + html-test/tests/mini_Hash.html.ref | 74 + html-test/tests/mini_HiddenInstances.html.ref | 41 + html-test/tests/mini_HiddenInstancesB.html.ref | 41 + html-test/tests/mini_Hyperlinks.html.ref | 31 + html-test/tests/mini_IgnoreExports.html.ref | 37 + html-test/tests/mini_ModuleWithWarning.html.ref | 31 + html-test/tests/mini_NamedDoc.html.ref | 25 + html-test/tests/mini_NoLayout.html.ref | 31 + html-test/tests/mini_NonGreedy.html.ref | 31 + html-test/tests/mini_Properties.html.ref | 31 + html-test/tests/mini_PruneWithWarning.html.ref | 25 + html-test/tests/mini_QuasiExpr.html.ref | 59 + html-test/tests/mini_QuasiQuote.html.ref | 31 + html-test/tests/mini_TH.html.ref | 31 + html-test/tests/mini_TH2.html.ref | 31 + html-test/tests/mini_Test.html.ref | 269 +++ html-test/tests/mini_Ticket112.html.ref | 31 + html-test/tests/mini_Ticket61.html.ref | 33 + html-test/tests/mini_Ticket75.html.ref | 39 + html-test/tests/mini_TypeFamilies.html.ref | 55 + html-test/tests/mini_TypeOperators.html.ref | 66 + html-test/tests/mini_Unicode.html.ref | 31 + html-test/tests/mini_Visible.html.ref | 31 + tests/html-tests/README | 24 - tests/html-tests/accept.hs | 43 - tests/html-tests/runtests.hs | 152 -- tests/html-tests/tests/A.hs | 17 - tests/html-tests/tests/A.html.ref | 183 -- tests/html-tests/tests/AdvanceTypes.hs | 9 - tests/html-tests/tests/AdvanceTypes.html.ref | 97 - tests/html-tests/tests/B.hs | 8 - tests/html-tests/tests/B.html.ref | 175 -- tests/html-tests/tests/Bug1.hs | 6 - tests/html-tests/tests/Bug1.html.ref | 103 - tests/html-tests/tests/Bug2.hs | 4 - tests/html-tests/tests/Bug2.html.ref | 65 - tests/html-tests/tests/Bug3.hs | 6 - tests/html-tests/tests/Bug3.html.ref | 83 - tests/html-tests/tests/Bug4.hs | 5 - tests/html-tests/tests/Bug4.html.ref | 82 - tests/html-tests/tests/Bug6.hs | 23 - tests/html-tests/tests/Bug6.html.ref | 335 --- tests/html-tests/tests/Bug7.hs | 12 - tests/html-tests/tests/Bug7.html.ref | 173 -- tests/html-tests/tests/Bug8.hs | 14 - tests/html-tests/tests/Bug8.html.ref | 131 -- tests/html-tests/tests/BugDeprecated.hs | 18 - tests/html-tests/tests/BugDeprecated.html.ref | 198 -- tests/html-tests/tests/BugExportHeadings.hs | 29 - tests/html-tests/tests/BugExportHeadings.html.ref | 220 -- tests/html-tests/tests/Bugs.hs | 3 - tests/html-tests/tests/Bugs.html.ref | 81 - tests/html-tests/tests/CrossPackageDocs.hs | 4 - tests/html-tests/tests/CrossPackageDocs.html.ref | 298 --- tests/html-tests/tests/DeprecatedClass.hs | 15 - tests/html-tests/tests/DeprecatedClass.html.ref | 161 -- tests/html-tests/tests/DeprecatedData.hs | 15 - tests/html-tests/tests/DeprecatedData.html.ref | 198 -- tests/html-tests/tests/DeprecatedFunction.hs | 10 - tests/html-tests/tests/DeprecatedFunction.html.ref | 110 - tests/html-tests/tests/DeprecatedFunction2.hs | 6 - .../html-tests/tests/DeprecatedFunction2.html.ref | 84 - tests/html-tests/tests/DeprecatedFunction3.hs | 6 - .../html-tests/tests/DeprecatedFunction3.html.ref | 84 - tests/html-tests/tests/DeprecatedModule.hs | 5 - tests/html-tests/tests/DeprecatedModule.html.ref | 83 - tests/html-tests/tests/DeprecatedModule2.hs | 4 - tests/html-tests/tests/DeprecatedModule2.html.ref | 76 - tests/html-tests/tests/DeprecatedNewtype.hs | 10 - tests/html-tests/tests/DeprecatedNewtype.html.ref | 161 -- tests/html-tests/tests/DeprecatedReExport.hs | 16 - tests/html-tests/tests/DeprecatedReExport.html.ref | 133 -- tests/html-tests/tests/DeprecatedRecord.hs | 9 - tests/html-tests/tests/DeprecatedRecord.html.ref | 151 -- tests/html-tests/tests/DeprecatedTypeFamily.hs | 9 - .../html-tests/tests/DeprecatedTypeFamily.html.ref | 108 - tests/html-tests/tests/DeprecatedTypeSynonym.hs | 9 - .../tests/DeprecatedTypeSynonym.html.ref | 116 - .../tests/DeprecationMessageParseError.hs | 12 - .../tests/DeprecationMessageParseError.html.ref | 101 - tests/html-tests/tests/Examples.hs | 39 - tests/html-tests/tests/Examples.html.ref | 179 -- tests/html-tests/tests/FunArgs.hs | 16 - tests/html-tests/tests/FunArgs.html.ref | 176 -- tests/html-tests/tests/GADTRecords.hs | 12 - tests/html-tests/tests/GADTRecords.html.ref | 234 -- tests/html-tests/tests/Hash.hs | 51 - tests/html-tests/tests/Hash.html.ref | 337 --- tests/html-tests/tests/Hidden.hs | 6 - tests/html-tests/tests/HiddenInstances.hs | 35 - tests/html-tests/tests/HiddenInstances.html.ref | 169 -- tests/html-tests/tests/HiddenInstancesA.hs | 17 - tests/html-tests/tests/HiddenInstancesB.hs | 2 - tests/html-tests/tests/HiddenInstancesB.html.ref | 143 -- tests/html-tests/tests/Hyperlinks.hs | 8 - tests/html-tests/tests/Hyperlinks.html.ref | 89 - tests/html-tests/tests/IgnoreExports.hs | 10 - tests/html-tests/tests/IgnoreExports.html.ref | 101 - tests/html-tests/tests/ModuleWithWarning.hs | 5 - tests/html-tests/tests/ModuleWithWarning.html.ref | 83 - tests/html-tests/tests/NamedDoc.hs | 4 - tests/html-tests/tests/NamedDoc.html.ref | 68 - tests/html-tests/tests/NoLayout.hs | 12 - tests/html-tests/tests/NoLayout.html.ref | 86 - tests/html-tests/tests/NonGreedy.hs | 5 - tests/html-tests/tests/NonGreedy.html.ref | 82 - tests/html-tests/tests/Properties.hs | 9 - tests/html-tests/tests/Properties.html.ref | 92 - tests/html-tests/tests/PruneWithWarning.hs | 15 - tests/html-tests/tests/PruneWithWarning.html.ref | 72 - tests/html-tests/tests/QuasiExpr.hs | 34 - tests/html-tests/tests/QuasiExpr.html.ref | 221 -- tests/html-tests/tests/QuasiQuote.hs | 9 - tests/html-tests/tests/QuasiQuote.html.ref | 65 - tests/html-tests/tests/TH.hs | 8 - tests/html-tests/tests/TH.html.ref | 63 - tests/html-tests/tests/TH2.hs | 7 - tests/html-tests/tests/TH2.html.ref | 63 - tests/html-tests/tests/Test.hs | 422 ---- tests/html-tests/tests/Test.html.ref | 2245 -------------------- tests/html-tests/tests/Ticket112.hs | 9 - tests/html-tests/tests/Ticket112.html.ref | 82 - tests/html-tests/tests/Ticket61.hs | 3 - tests/html-tests/tests/Ticket61.html.ref | 80 - tests/html-tests/tests/Ticket61_Hidden.hs | 7 - tests/html-tests/tests/Ticket75.hs | 7 - tests/html-tests/tests/Ticket75.html.ref | 116 - tests/html-tests/tests/TypeFamilies.hs | 28 - tests/html-tests/tests/TypeFamilies.html.ref | 212 -- tests/html-tests/tests/TypeOperators.hs | 20 - tests/html-tests/tests/TypeOperators.html.ref | 185 -- tests/html-tests/tests/Unicode.hs.disabled | 6 - tests/html-tests/tests/Unicode.html.ref | 82 - tests/html-tests/tests/Visible.hs | 3 - tests/html-tests/tests/Visible.html.ref | 67 - tests/html-tests/tests/frames.html.ref | 30 - tests/html-tests/tests/mini_A.html.ref | 59 - tests/html-tests/tests/mini_AdvanceTypes.html.ref | 33 - tests/html-tests/tests/mini_B.html.ref | 45 - tests/html-tests/tests/mini_Bug1.html.ref | 33 - tests/html-tests/tests/mini_Bug2.html.ref | 31 - tests/html-tests/tests/mini_Bug3.html.ref | 31 - tests/html-tests/tests/mini_Bug4.html.ref | 31 - tests/html-tests/tests/mini_Bug6.html.ref | 65 - tests/html-tests/tests/mini_Bug7.html.ref | 41 - tests/html-tests/tests/mini_Bug8.html.ref | 63 - tests/html-tests/tests/mini_BugDeprecated.html.ref | 61 - .../tests/mini_BugExportHeadings.html.ref | 79 - tests/html-tests/tests/mini_Bugs.html.ref | 33 - .../tests/mini_CrossPackageDocs.html.ref | 45 - .../html-tests/tests/mini_DeprecatedClass.html.ref | 41 - .../html-tests/tests/mini_DeprecatedData.html.ref | 41 - .../tests/mini_DeprecatedFunction.html.ref | 37 - .../tests/mini_DeprecatedFunction2.html.ref | 31 - .../tests/mini_DeprecatedFunction3.html.ref | 31 - .../tests/mini_DeprecatedModule.html.ref | 31 - .../tests/mini_DeprecatedModule2.html.ref | 31 - .../tests/mini_DeprecatedNewtype.html.ref | 41 - .../tests/mini_DeprecatedReExport.html.ref | 37 - .../tests/mini_DeprecatedRecord.html.ref | 33 - .../tests/mini_DeprecatedTypeFamily.html.ref | 41 - .../tests/mini_DeprecatedTypeSynonym.html.ref | 41 - .../mini_DeprecationMessageParseError.html.ref | 31 - tests/html-tests/tests/mini_Examples.html.ref | 31 - tests/html-tests/tests/mini_FunArgs.html.ref | 37 - tests/html-tests/tests/mini_GADTRecords.html.ref | 33 - tests/html-tests/tests/mini_Hash.html.ref | 74 - .../html-tests/tests/mini_HiddenInstances.html.ref | 41 - .../tests/mini_HiddenInstancesB.html.ref | 41 - tests/html-tests/tests/mini_Hyperlinks.html.ref | 31 - tests/html-tests/tests/mini_IgnoreExports.html.ref | 37 - .../tests/mini_ModuleWithWarning.html.ref | 31 - tests/html-tests/tests/mini_NamedDoc.html.ref | 25 - tests/html-tests/tests/mini_NoLayout.html.ref | 31 - tests/html-tests/tests/mini_NonGreedy.html.ref | 31 - tests/html-tests/tests/mini_Properties.html.ref | 31 - .../tests/mini_PruneWithWarning.html.ref | 25 - tests/html-tests/tests/mini_QuasiExpr.html.ref | 59 - tests/html-tests/tests/mini_QuasiQuote.html.ref | 31 - tests/html-tests/tests/mini_TH.html.ref | 31 - tests/html-tests/tests/mini_TH2.html.ref | 31 - tests/html-tests/tests/mini_Test.html.ref | 269 --- tests/html-tests/tests/mini_Ticket112.html.ref | 31 - tests/html-tests/tests/mini_Ticket61.html.ref | 33 - tests/html-tests/tests/mini_Ticket75.html.ref | 39 - tests/html-tests/tests/mini_TypeFamilies.html.ref | 55 - tests/html-tests/tests/mini_TypeOperators.html.ref | 66 - tests/html-tests/tests/mini_Unicode.html.ref | 31 - tests/html-tests/tests/mini_Visible.html.ref | 31 - 334 files changed, 12851 insertions(+), 12851 deletions(-) create mode 100644 html-test/README create mode 100644 html-test/accept.hs create mode 100644 html-test/runtests.hs create mode 100644 html-test/tests/A.hs create mode 100644 html-test/tests/A.html.ref create mode 100644 html-test/tests/AdvanceTypes.hs create mode 100644 html-test/tests/AdvanceTypes.html.ref create mode 100644 html-test/tests/B.hs create mode 100644 html-test/tests/B.html.ref create mode 100644 html-test/tests/Bug1.hs create mode 100644 html-test/tests/Bug1.html.ref create mode 100644 html-test/tests/Bug2.hs create mode 100644 html-test/tests/Bug2.html.ref create mode 100644 html-test/tests/Bug3.hs create mode 100644 html-test/tests/Bug3.html.ref create mode 100644 html-test/tests/Bug4.hs create mode 100644 html-test/tests/Bug4.html.ref create mode 100644 html-test/tests/Bug6.hs create mode 100644 html-test/tests/Bug6.html.ref create mode 100644 html-test/tests/Bug7.hs create mode 100644 html-test/tests/Bug7.html.ref create mode 100644 html-test/tests/Bug8.hs create mode 100644 html-test/tests/Bug8.html.ref create mode 100644 html-test/tests/BugDeprecated.hs create mode 100644 html-test/tests/BugDeprecated.html.ref create mode 100644 html-test/tests/BugExportHeadings.hs create mode 100644 html-test/tests/BugExportHeadings.html.ref create mode 100644 html-test/tests/Bugs.hs create mode 100644 html-test/tests/Bugs.html.ref create mode 100644 html-test/tests/CrossPackageDocs.hs create mode 100644 html-test/tests/CrossPackageDocs.html.ref create mode 100644 html-test/tests/DeprecatedClass.hs create mode 100644 html-test/tests/DeprecatedClass.html.ref create mode 100644 html-test/tests/DeprecatedData.hs create mode 100644 html-test/tests/DeprecatedData.html.ref create mode 100644 html-test/tests/DeprecatedFunction.hs create mode 100644 html-test/tests/DeprecatedFunction.html.ref create mode 100644 html-test/tests/DeprecatedFunction2.hs create mode 100644 html-test/tests/DeprecatedFunction2.html.ref create mode 100644 html-test/tests/DeprecatedFunction3.hs create mode 100644 html-test/tests/DeprecatedFunction3.html.ref create mode 100644 html-test/tests/DeprecatedModule.hs create mode 100644 html-test/tests/DeprecatedModule.html.ref create mode 100644 html-test/tests/DeprecatedModule2.hs create mode 100644 html-test/tests/DeprecatedModule2.html.ref create mode 100644 html-test/tests/DeprecatedNewtype.hs create mode 100644 html-test/tests/DeprecatedNewtype.html.ref create mode 100644 html-test/tests/DeprecatedReExport.hs create mode 100644 html-test/tests/DeprecatedReExport.html.ref create mode 100644 html-test/tests/DeprecatedRecord.hs create mode 100644 html-test/tests/DeprecatedRecord.html.ref create mode 100644 html-test/tests/DeprecatedTypeFamily.hs create mode 100644 html-test/tests/DeprecatedTypeFamily.html.ref create mode 100644 html-test/tests/DeprecatedTypeSynonym.hs create mode 100644 html-test/tests/DeprecatedTypeSynonym.html.ref create mode 100644 html-test/tests/DeprecationMessageParseError.hs create mode 100644 html-test/tests/DeprecationMessageParseError.html.ref create mode 100644 html-test/tests/Examples.hs create mode 100644 html-test/tests/Examples.html.ref create mode 100644 html-test/tests/FunArgs.hs create mode 100644 html-test/tests/FunArgs.html.ref create mode 100644 html-test/tests/GADTRecords.hs create mode 100644 html-test/tests/GADTRecords.html.ref create mode 100644 html-test/tests/Hash.hs create mode 100644 html-test/tests/Hash.html.ref create mode 100644 html-test/tests/Hidden.hs create mode 100644 html-test/tests/HiddenInstances.hs create mode 100644 html-test/tests/HiddenInstances.html.ref create mode 100644 html-test/tests/HiddenInstancesA.hs create mode 100644 html-test/tests/HiddenInstancesB.hs create mode 100644 html-test/tests/HiddenInstancesB.html.ref create mode 100644 html-test/tests/Hyperlinks.hs create mode 100644 html-test/tests/Hyperlinks.html.ref create mode 100644 html-test/tests/IgnoreExports.hs create mode 100644 html-test/tests/IgnoreExports.html.ref create mode 100644 html-test/tests/ModuleWithWarning.hs create mode 100644 html-test/tests/ModuleWithWarning.html.ref create mode 100644 html-test/tests/NamedDoc.hs create mode 100644 html-test/tests/NamedDoc.html.ref create mode 100644 html-test/tests/NoLayout.hs create mode 100644 html-test/tests/NoLayout.html.ref create mode 100644 html-test/tests/NonGreedy.hs create mode 100644 html-test/tests/NonGreedy.html.ref create mode 100644 html-test/tests/Properties.hs create mode 100644 html-test/tests/Properties.html.ref create mode 100644 html-test/tests/PruneWithWarning.hs create mode 100644 html-test/tests/PruneWithWarning.html.ref create mode 100644 html-test/tests/QuasiExpr.hs create mode 100644 html-test/tests/QuasiExpr.html.ref create mode 100644 html-test/tests/QuasiQuote.hs create mode 100644 html-test/tests/QuasiQuote.html.ref create mode 100644 html-test/tests/TH.hs create mode 100644 html-test/tests/TH.html.ref create mode 100644 html-test/tests/TH2.hs create mode 100644 html-test/tests/TH2.html.ref create mode 100644 html-test/tests/Test.hs create mode 100644 html-test/tests/Test.html.ref create mode 100644 html-test/tests/Ticket112.hs create mode 100644 html-test/tests/Ticket112.html.ref create mode 100644 html-test/tests/Ticket61.hs create mode 100644 html-test/tests/Ticket61.html.ref create mode 100644 html-test/tests/Ticket61_Hidden.hs create mode 100644 html-test/tests/Ticket75.hs create mode 100644 html-test/tests/Ticket75.html.ref create mode 100644 html-test/tests/TypeFamilies.hs create mode 100644 html-test/tests/TypeFamilies.html.ref create mode 100644 html-test/tests/TypeOperators.hs create mode 100644 html-test/tests/TypeOperators.html.ref create mode 100644 html-test/tests/Unicode.hs.disabled create mode 100644 html-test/tests/Unicode.html.ref create mode 100644 html-test/tests/Visible.hs create mode 100644 html-test/tests/Visible.html.ref create mode 100644 html-test/tests/frames.html.ref create mode 100644 html-test/tests/mini_A.html.ref create mode 100644 html-test/tests/mini_AdvanceTypes.html.ref create mode 100644 html-test/tests/mini_B.html.ref create mode 100644 html-test/tests/mini_Bug1.html.ref create mode 100644 html-test/tests/mini_Bug2.html.ref create mode 100644 html-test/tests/mini_Bug3.html.ref create mode 100644 html-test/tests/mini_Bug4.html.ref create mode 100644 html-test/tests/mini_Bug6.html.ref create mode 100644 html-test/tests/mini_Bug7.html.ref create mode 100644 html-test/tests/mini_Bug8.html.ref create mode 100644 html-test/tests/mini_BugDeprecated.html.ref create mode 100644 html-test/tests/mini_BugExportHeadings.html.ref create mode 100644 html-test/tests/mini_Bugs.html.ref create mode 100644 html-test/tests/mini_CrossPackageDocs.html.ref create mode 100644 html-test/tests/mini_DeprecatedClass.html.ref create mode 100644 html-test/tests/mini_DeprecatedData.html.ref create mode 100644 html-test/tests/mini_DeprecatedFunction.html.ref create mode 100644 html-test/tests/mini_DeprecatedFunction2.html.ref create mode 100644 html-test/tests/mini_DeprecatedFunction3.html.ref create mode 100644 html-test/tests/mini_DeprecatedModule.html.ref create mode 100644 html-test/tests/mini_DeprecatedModule2.html.ref create mode 100644 html-test/tests/mini_DeprecatedNewtype.html.ref create mode 100644 html-test/tests/mini_DeprecatedReExport.html.ref create mode 100644 html-test/tests/mini_DeprecatedRecord.html.ref create mode 100644 html-test/tests/mini_DeprecatedTypeFamily.html.ref create mode 100644 html-test/tests/mini_DeprecatedTypeSynonym.html.ref create mode 100644 html-test/tests/mini_DeprecationMessageParseError.html.ref create mode 100644 html-test/tests/mini_Examples.html.ref create mode 100644 html-test/tests/mini_FunArgs.html.ref create mode 100644 html-test/tests/mini_GADTRecords.html.ref create mode 100644 html-test/tests/mini_Hash.html.ref create mode 100644 html-test/tests/mini_HiddenInstances.html.ref create mode 100644 html-test/tests/mini_HiddenInstancesB.html.ref create mode 100644 html-test/tests/mini_Hyperlinks.html.ref create mode 100644 html-test/tests/mini_IgnoreExports.html.ref create mode 100644 html-test/tests/mini_ModuleWithWarning.html.ref create mode 100644 html-test/tests/mini_NamedDoc.html.ref create mode 100644 html-test/tests/mini_NoLayout.html.ref create mode 100644 html-test/tests/mini_NonGreedy.html.ref create mode 100644 html-test/tests/mini_Properties.html.ref create mode 100644 html-test/tests/mini_PruneWithWarning.html.ref create mode 100644 html-test/tests/mini_QuasiExpr.html.ref create mode 100644 html-test/tests/mini_QuasiQuote.html.ref create mode 100644 html-test/tests/mini_TH.html.ref create mode 100644 html-test/tests/mini_TH2.html.ref create mode 100644 html-test/tests/mini_Test.html.ref create mode 100644 html-test/tests/mini_Ticket112.html.ref create mode 100644 html-test/tests/mini_Ticket61.html.ref create mode 100644 html-test/tests/mini_Ticket75.html.ref create mode 100644 html-test/tests/mini_TypeFamilies.html.ref create mode 100644 html-test/tests/mini_TypeOperators.html.ref create mode 100644 html-test/tests/mini_Unicode.html.ref create mode 100644 html-test/tests/mini_Visible.html.ref delete mode 100644 tests/html-tests/README delete mode 100644 tests/html-tests/accept.hs delete mode 100644 tests/html-tests/runtests.hs delete mode 100644 tests/html-tests/tests/A.hs delete mode 100644 tests/html-tests/tests/A.html.ref delete mode 100644 tests/html-tests/tests/AdvanceTypes.hs delete mode 100644 tests/html-tests/tests/AdvanceTypes.html.ref delete mode 100644 tests/html-tests/tests/B.hs delete mode 100644 tests/html-tests/tests/B.html.ref delete mode 100644 tests/html-tests/tests/Bug1.hs delete mode 100644 tests/html-tests/tests/Bug1.html.ref delete mode 100644 tests/html-tests/tests/Bug2.hs delete mode 100644 tests/html-tests/tests/Bug2.html.ref delete mode 100644 tests/html-tests/tests/Bug3.hs delete mode 100644 tests/html-tests/tests/Bug3.html.ref delete mode 100644 tests/html-tests/tests/Bug4.hs delete mode 100644 tests/html-tests/tests/Bug4.html.ref delete mode 100644 tests/html-tests/tests/Bug6.hs delete mode 100644 tests/html-tests/tests/Bug6.html.ref delete mode 100644 tests/html-tests/tests/Bug7.hs delete mode 100644 tests/html-tests/tests/Bug7.html.ref delete mode 100644 tests/html-tests/tests/Bug8.hs delete mode 100644 tests/html-tests/tests/Bug8.html.ref delete mode 100644 tests/html-tests/tests/BugDeprecated.hs delete mode 100644 tests/html-tests/tests/BugDeprecated.html.ref delete mode 100644 tests/html-tests/tests/BugExportHeadings.hs delete mode 100644 tests/html-tests/tests/BugExportHeadings.html.ref delete mode 100644 tests/html-tests/tests/Bugs.hs delete mode 100644 tests/html-tests/tests/Bugs.html.ref delete mode 100644 tests/html-tests/tests/CrossPackageDocs.hs delete mode 100644 tests/html-tests/tests/CrossPackageDocs.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedClass.hs delete mode 100644 tests/html-tests/tests/DeprecatedClass.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedData.hs delete mode 100644 tests/html-tests/tests/DeprecatedData.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedFunction.hs delete mode 100644 tests/html-tests/tests/DeprecatedFunction.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedFunction2.hs delete mode 100644 tests/html-tests/tests/DeprecatedFunction2.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedFunction3.hs delete mode 100644 tests/html-tests/tests/DeprecatedFunction3.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedModule.hs delete mode 100644 tests/html-tests/tests/DeprecatedModule.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedModule2.hs delete mode 100644 tests/html-tests/tests/DeprecatedModule2.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedNewtype.hs delete mode 100644 tests/html-tests/tests/DeprecatedNewtype.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedReExport.hs delete mode 100644 tests/html-tests/tests/DeprecatedReExport.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedRecord.hs delete mode 100644 tests/html-tests/tests/DeprecatedRecord.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedTypeFamily.hs delete mode 100644 tests/html-tests/tests/DeprecatedTypeFamily.html.ref delete mode 100644 tests/html-tests/tests/DeprecatedTypeSynonym.hs delete mode 100644 tests/html-tests/tests/DeprecatedTypeSynonym.html.ref delete mode 100644 tests/html-tests/tests/DeprecationMessageParseError.hs delete mode 100644 tests/html-tests/tests/DeprecationMessageParseError.html.ref delete mode 100644 tests/html-tests/tests/Examples.hs delete mode 100644 tests/html-tests/tests/Examples.html.ref delete mode 100644 tests/html-tests/tests/FunArgs.hs delete mode 100644 tests/html-tests/tests/FunArgs.html.ref delete mode 100644 tests/html-tests/tests/GADTRecords.hs delete mode 100644 tests/html-tests/tests/GADTRecords.html.ref delete mode 100644 tests/html-tests/tests/Hash.hs delete mode 100644 tests/html-tests/tests/Hash.html.ref delete mode 100644 tests/html-tests/tests/Hidden.hs delete mode 100644 tests/html-tests/tests/HiddenInstances.hs delete mode 100644 tests/html-tests/tests/HiddenInstances.html.ref delete mode 100644 tests/html-tests/tests/HiddenInstancesA.hs delete mode 100644 tests/html-tests/tests/HiddenInstancesB.hs delete mode 100644 tests/html-tests/tests/HiddenInstancesB.html.ref delete mode 100644 tests/html-tests/tests/Hyperlinks.hs delete mode 100644 tests/html-tests/tests/Hyperlinks.html.ref delete mode 100644 tests/html-tests/tests/IgnoreExports.hs delete mode 100644 tests/html-tests/tests/IgnoreExports.html.ref delete mode 100644 tests/html-tests/tests/ModuleWithWarning.hs delete mode 100644 tests/html-tests/tests/ModuleWithWarning.html.ref delete mode 100644 tests/html-tests/tests/NamedDoc.hs delete mode 100644 tests/html-tests/tests/NamedDoc.html.ref delete mode 100644 tests/html-tests/tests/NoLayout.hs delete mode 100644 tests/html-tests/tests/NoLayout.html.ref delete mode 100644 tests/html-tests/tests/NonGreedy.hs delete mode 100644 tests/html-tests/tests/NonGreedy.html.ref delete mode 100644 tests/html-tests/tests/Properties.hs delete mode 100644 tests/html-tests/tests/Properties.html.ref delete mode 100644 tests/html-tests/tests/PruneWithWarning.hs delete mode 100644 tests/html-tests/tests/PruneWithWarning.html.ref delete mode 100644 tests/html-tests/tests/QuasiExpr.hs delete mode 100644 tests/html-tests/tests/QuasiExpr.html.ref delete mode 100644 tests/html-tests/tests/QuasiQuote.hs delete mode 100644 tests/html-tests/tests/QuasiQuote.html.ref delete mode 100644 tests/html-tests/tests/TH.hs delete mode 100644 tests/html-tests/tests/TH.html.ref delete mode 100644 tests/html-tests/tests/TH2.hs delete mode 100644 tests/html-tests/tests/TH2.html.ref delete mode 100644 tests/html-tests/tests/Test.hs delete mode 100644 tests/html-tests/tests/Test.html.ref delete mode 100644 tests/html-tests/tests/Ticket112.hs delete mode 100644 tests/html-tests/tests/Ticket112.html.ref delete mode 100644 tests/html-tests/tests/Ticket61.hs delete mode 100644 tests/html-tests/tests/Ticket61.html.ref delete mode 100644 tests/html-tests/tests/Ticket61_Hidden.hs delete mode 100644 tests/html-tests/tests/Ticket75.hs delete mode 100644 tests/html-tests/tests/Ticket75.html.ref delete mode 100644 tests/html-tests/tests/TypeFamilies.hs delete mode 100644 tests/html-tests/tests/TypeFamilies.html.ref delete mode 100644 tests/html-tests/tests/TypeOperators.hs delete mode 100644 tests/html-tests/tests/TypeOperators.html.ref delete mode 100644 tests/html-tests/tests/Unicode.hs.disabled delete mode 100644 tests/html-tests/tests/Unicode.html.ref delete mode 100644 tests/html-tests/tests/Visible.hs delete mode 100644 tests/html-tests/tests/Visible.html.ref delete mode 100644 tests/html-tests/tests/frames.html.ref delete mode 100644 tests/html-tests/tests/mini_A.html.ref delete mode 100644 tests/html-tests/tests/mini_AdvanceTypes.html.ref delete mode 100644 tests/html-tests/tests/mini_B.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug1.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug2.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug3.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug4.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug6.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug7.html.ref delete mode 100644 tests/html-tests/tests/mini_Bug8.html.ref delete mode 100644 tests/html-tests/tests/mini_BugDeprecated.html.ref delete mode 100644 tests/html-tests/tests/mini_BugExportHeadings.html.ref delete mode 100644 tests/html-tests/tests/mini_Bugs.html.ref delete mode 100644 tests/html-tests/tests/mini_CrossPackageDocs.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedClass.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedData.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedFunction.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedFunction2.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedFunction3.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedModule.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedModule2.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedNewtype.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedReExport.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedRecord.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref delete mode 100644 tests/html-tests/tests/mini_DeprecationMessageParseError.html.ref delete mode 100644 tests/html-tests/tests/mini_Examples.html.ref delete mode 100644 tests/html-tests/tests/mini_FunArgs.html.ref delete mode 100644 tests/html-tests/tests/mini_GADTRecords.html.ref delete mode 100644 tests/html-tests/tests/mini_Hash.html.ref delete mode 100644 tests/html-tests/tests/mini_HiddenInstances.html.ref delete mode 100644 tests/html-tests/tests/mini_HiddenInstancesB.html.ref delete mode 100644 tests/html-tests/tests/mini_Hyperlinks.html.ref delete mode 100644 tests/html-tests/tests/mini_IgnoreExports.html.ref delete mode 100644 tests/html-tests/tests/mini_ModuleWithWarning.html.ref delete mode 100644 tests/html-tests/tests/mini_NamedDoc.html.ref delete mode 100644 tests/html-tests/tests/mini_NoLayout.html.ref delete mode 100644 tests/html-tests/tests/mini_NonGreedy.html.ref delete mode 100644 tests/html-tests/tests/mini_Properties.html.ref delete mode 100644 tests/html-tests/tests/mini_PruneWithWarning.html.ref delete mode 100644 tests/html-tests/tests/mini_QuasiExpr.html.ref delete mode 100644 tests/html-tests/tests/mini_QuasiQuote.html.ref delete mode 100644 tests/html-tests/tests/mini_TH.html.ref delete mode 100644 tests/html-tests/tests/mini_TH2.html.ref delete mode 100644 tests/html-tests/tests/mini_Test.html.ref delete mode 100644 tests/html-tests/tests/mini_Ticket112.html.ref delete mode 100644 tests/html-tests/tests/mini_Ticket61.html.ref delete mode 100644 tests/html-tests/tests/mini_Ticket75.html.ref delete mode 100644 tests/html-tests/tests/mini_TypeFamilies.html.ref delete mode 100644 tests/html-tests/tests/mini_TypeOperators.html.ref delete mode 100644 tests/html-tests/tests/mini_Unicode.html.ref delete mode 100644 tests/html-tests/tests/mini_Visible.html.ref diff --git a/.gitignore b/.gitignore index ba90347e..3d242029 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /dist/ -/tests/html-tests/output/ +/html-test/output/ /doc/haddock /doc/autom4te.cache/ diff --git a/haddock.cabal b/haddock.cabal index 846d7c6a..36c016e9 100644 --- a/haddock.cabal +++ b/haddock.cabal @@ -31,7 +31,7 @@ extra-source-files: src/haddock.sh -- The test files shouldn't have to go here, but the source files for -- the test-suite stanzas don't get picked up by `cabal sdist`. - tests/html-tests/runtests.hs + tests/html-test/runtests.hs data-dir: resources data-files: html/frames.html @@ -169,11 +169,11 @@ library if flag(in-ghc-tree) buildable: False -test-suite html-tests +test-suite html-test type: exitcode-stdio-1.0 default-language: Haskell2010 main-is: runtests.hs - hs-source-dirs: tests/html-tests + hs-source-dirs: html-test build-depends: base, directory, process, filepath, Cabal test-suite spec diff --git a/html-test/README b/html-test/README new file mode 100644 index 00000000..9afb10e7 --- /dev/null +++ b/html-test/README @@ -0,0 +1,24 @@ +This is a testsuite for Haddock that uses the concept of "golden files". That +is, it compares output files against a set of reference files. + +To add a new test: + + 1) Create a module in the "tests" directory. + + 2) Run "cabal test". You should now have output/.html. The test + passes since there is no reference file to compare with. + + 3) To make a reference file from the output file, do + runhaskell accept.hs + +Tips and tricks: + +To "accept" all output files (copy them to reference files), run + runhaskell accept.hs + +You can run all tests despite failing tests, like so + cabal test --test-option=all + +You can pass extra options to haddock like so + cabal test --test-options='all --title="All Tests"' + diff --git a/html-test/accept.hs b/html-test/accept.hs new file mode 100644 index 00000000..45b32078 --- /dev/null +++ b/html-test/accept.hs @@ -0,0 +1,43 @@ +import System.Cmd +import System.Environment +import System.FilePath +import System.Exit +import System.Directory +import Data.List +import Control.Monad +import Control.Applicative + + +main = do + args <- getArgs + dir <- getCurrentDirectory + contents <- filter (`notElem` ignore) <$> 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 ] + where + ignore = [ + "doc-index.html" + , "index-frames.html" + , "index.html" + ] + + +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 diff --git a/html-test/runtests.hs b/html-test/runtests.hs new file mode 100644 index 00000000..292deb8b --- /dev/null +++ b/html-test/runtests.hs @@ -0,0 +1,152 @@ +import Prelude hiding (mod) +import Control.Monad +import Control.Applicative +import Data.List +import Data.Maybe +import Distribution.InstalledPackageInfo +import Distribution.Package (PackageName (..)) +import Distribution.Simple.Compiler +import Distribution.Simple.GHC +import Distribution.Simple.PackageIndex +import Distribution.Simple.Program +import Distribution.Simple.Utils +import Distribution.Verbosity +import System.IO +import System.Cmd +import System.Directory +import System.Environment +import System.Exit +import System.FilePath +import System.Process (ProcessHandle, runProcess, waitForProcess) + + +packageRoot, dataDir, haddockPath, testSuiteRoot, testDir, outDir :: FilePath +packageRoot = "." +dataDir = packageRoot "resources" +haddockPath = packageRoot "dist" "build" "haddock" "haddock" +testSuiteRoot = packageRoot "html-test" +testDir = testSuiteRoot "tests" +outDir = testSuiteRoot "output" + + +main :: IO () +main = do + test + putStrLn "All tests passed!" + + +test :: IO () +test = do + x <- doesFileExist haddockPath + unless x $ die "you need to run 'cabal build' successfully first" + + contents <- getDirectoryContents testDir + args <- getArgs + let (opts, spec) = span ("-" `isPrefixOf`) args + let mods = + case spec of + y:_ | y /= "all" -> [y ++ ".hs"] + _ -> filter ((==) ".hs" . takeExtension) contents + + let mods' = map (testDir ) mods + + -- add haddock_datadir to environment for subprocesses + env <- Just . (:) ("haddock_datadir", dataDir) <$> getEnvironment + + putStrLn "" + putStrLn "Haddock version: " + h1 <- runProcess haddockPath ["--version"] Nothing + env Nothing Nothing Nothing + wait h1 "*** Running `haddock --version' failed!" + putStrLn "" + putStrLn "GHC version: " + h2 <- runProcess haddockPath ["--ghc-version"] Nothing + env Nothing Nothing Nothing + wait h2 "*** Running `haddock --ghc-version' failed!" + putStrLn "" + + -- TODO: maybe do something more clever here using haddock.cabal + ghcPath <- fmap init $ rawSystemStdout normal haddockPath ["--print-ghc-path"] + (_, conf) <- configure normal (Just ghcPath) Nothing defaultProgramConfiguration + pkgIndex <- getInstalledPackages normal [GlobalPackageDB] conf + let mkDep pkgName = + fromMaybe (error "Couldn't find test dependencies") $ do + let pkgs = lookupPackageName pkgIndex (PackageName pkgName) + (_, pkgs') <- listToMaybe pkgs + pkg <- listToMaybe pkgs' + ifacePath <- listToMaybe (haddockInterfaces pkg) + htmlPath <- listToMaybe (haddockHTMLs pkg) + return ("-i " ++ htmlPath ++ "," ++ ifacePath) + + let base = mkDep "base" + process = mkDep "process" + ghcprim = mkDep "ghc-prim" + + putStrLn "Running tests..." + handle <- runProcess haddockPath + (["-w", "-o", outDir, "-h", "--pretty-html", "--optghc=-fglasgow-exts" + , "--optghc=-w", base, process, ghcprim] ++ opts ++ mods') + Nothing env Nothing + Nothing Nothing + + wait handle "*** Haddock run failed! Exiting." + check mods (if not (null args) && args !! 0 == "all" then False else True) + where + wait :: ProcessHandle -> String -> IO () + wait h msg = do + r <- waitForProcess h + unless (r == ExitSuccess) $ do + hPutStrLn stderr msg + exitFailure + +check :: [FilePath] -> Bool -> IO () +check modules strict = do + forM_ modules $ \mod -> do + let outfile = outDir dropExtension mod ++ ".html" + let reffile = testDir dropExtension mod ++ ".html.ref" + b <- doesFileExist reffile + if b + then do + copyFile reffile (outDir takeFileName reffile) + out <- readFile outfile + ref <- readFile reffile + if not $ haddockEq out ref + then do + putStrLn $ "Output for " ++ mod ++ " has changed! Exiting with diff:" + let ref' = stripLinks ref + out' = stripLinks out + let reffile' = outDir takeFileName reffile ++ ".nolinks" + outfile' = outDir takeFileName outfile ++ ".nolinks" + writeFile reffile' ref' + writeFile outfile' out' + r <- programOnPath "colordiff" + code <- if r + then system $ "colordiff " ++ reffile' ++ " " ++ outfile' + else system $ "diff " ++ reffile' ++ " " ++ outfile' + if strict then exitFailure else return () + unless (code == ExitSuccess) $ do + hPutStrLn stderr "*** Running diff failed!" + exitFailure + else do + putStrLn $ "Pass: " ++ mod + else do + putStrLn $ "Pass: " ++ mod ++ " (no .ref file)" + + +haddockEq :: String -> String -> Bool +haddockEq file1 file2 = stripLinks file1 == stripLinks file2 + +stripLinks :: String -> String +stripLinks str = + let prefix = " prefix ++ stripLinks (dropWhile (/= '"') str') + Nothing -> + case str of + [] -> [] + x : xs -> x : stripLinks xs + +programOnPath :: FilePath -> IO Bool +programOnPath p = do + result <- findProgramLocation silent p + return (isJust result) diff --git a/html-test/tests/A.hs b/html-test/tests/A.hs new file mode 100644 index 00000000..606b0865 --- /dev/null +++ b/html-test/tests/A.hs @@ -0,0 +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/html-test/tests/A.html.ref b/html-test/tests/A.html.ref new file mode 100644 index 00000000..328fec02 --- /dev/null +++ b/html-test/tests/A.html.ref @@ -0,0 +1,183 @@ + +A
Safe HaskellNone

A

Synopsis

Documentation

data A

Constructors

A 

test2 :: 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 +

diff --git a/html-test/tests/AdvanceTypes.hs b/html-test/tests/AdvanceTypes.hs new file mode 100644 index 00000000..939fdf07 --- /dev/null +++ b/html-test/tests/AdvanceTypes.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE TypeOperators #-} +module AdvanceTypes where + +data Pattern :: [*] -> * where + Nil :: Pattern '[] + Cons :: Maybe h -> Pattern t -> Pattern (h ': t) diff --git a/html-test/tests/AdvanceTypes.html.ref b/html-test/tests/AdvanceTypes.html.ref new file mode 100644 index 00000000..bac545be --- /dev/null +++ b/html-test/tests/AdvanceTypes.html.ref @@ -0,0 +1,97 @@ + +AdvanceTypes
Safe HaskellNone

AdvanceTypes

Documentation

data Pattern where

Constructors

Nil :: Pattern `[]` 
Cons :: Maybe h -> Pattern t -> Pattern (h : t) 
diff --git a/html-test/tests/B.hs b/html-test/tests/B.hs new file mode 100644 index 00000000..5fd69acd --- /dev/null +++ b/html-test/tests/B.hs @@ -0,0 +1,8 @@ +module B ( module A, test, reExport, X(..) ) where +import A ( A(..), test2, reExport, X(..) ) + +-- | This link shouldn't work: 'other'. +-- These links should work: 'A.other', 'Data.List.sortBy', 'test2', 'A.test2', 'Data.Maybe.fromMaybe'. +-- Module link: "Prelude". +test :: Int +test = 1 diff --git a/html-test/tests/B.html.ref b/html-test/tests/B.html.ref new file mode 100644 index 00000000..410bc75b --- /dev/null +++ b/html-test/tests/B.html.ref @@ -0,0 +1,175 @@ + +B
Safe HaskellNone

B

Synopsis

Documentation

module A

test :: Int

This link shouldn't work: other. + These links should work: other, sortBy, test2, test2, fromMaybe. + Module link: Prelude. +

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 +

diff --git a/html-test/tests/Bug1.hs b/html-test/tests/Bug1.hs new file mode 100644 index 00000000..af1ed4d3 --- /dev/null +++ b/html-test/tests/Bug1.hs @@ -0,0 +1,6 @@ +module Bug1 where + +-- | We should have different anchors for constructors and types\/classes. This +-- hyperlink should point to the type constructor by default: 'T'. +data T = T + diff --git a/html-test/tests/Bug1.html.ref b/html-test/tests/Bug1.html.ref new file mode 100644 index 00000000..f8a86948 --- /dev/null +++ b/html-test/tests/Bug1.html.ref @@ -0,0 +1,103 @@ + +Bug1
Safe HaskellNone

Bug1

Synopsis

  • data T = T

Documentation

data T

We should have different anchors for constructors and types/classes. This + hyperlink should point to the type constructor by default: T. +

Constructors

T 
diff --git a/html-test/tests/Bug2.hs b/html-test/tests/Bug2.hs new file mode 100644 index 00000000..9121922e --- /dev/null +++ b/html-test/tests/Bug2.hs @@ -0,0 +1,4 @@ +module Bug2 ( x ) where +import B +x :: A +x = A diff --git a/html-test/tests/Bug2.html.ref b/html-test/tests/Bug2.html.ref new file mode 100644 index 00000000..813035a6 --- /dev/null +++ b/html-test/tests/Bug2.html.ref @@ -0,0 +1,65 @@ + +Bug2
Safe HaskellNone

Bug2

Documentation

x :: A

diff --git a/html-test/tests/Bug3.hs b/html-test/tests/Bug3.hs new file mode 100644 index 00000000..67e57892 --- /dev/null +++ b/html-test/tests/Bug3.hs @@ -0,0 +1,6 @@ +module Bug3 where + +-- | /multi-line +-- emphasis/ +foo :: Int +foo = undefined diff --git a/html-test/tests/Bug3.html.ref b/html-test/tests/Bug3.html.ref new file mode 100644 index 00000000..76d4e730 --- /dev/null +++ b/html-test/tests/Bug3.html.ref @@ -0,0 +1,83 @@ + +Bug3
Safe HaskellNone

Bug3

Synopsis

Documentation

foo :: Int

/multi-line + emphasis/ +

diff --git a/html-test/tests/Bug4.hs b/html-test/tests/Bug4.hs new file mode 100644 index 00000000..425a77aa --- /dev/null +++ b/html-test/tests/Bug4.hs @@ -0,0 +1,5 @@ +module Bug4 where +-- | don't use apostrophe's in the wrong place's +foo :: Int +foo = undefined + diff --git a/html-test/tests/Bug4.html.ref b/html-test/tests/Bug4.html.ref new file mode 100644 index 00000000..9e852978 --- /dev/null +++ b/html-test/tests/Bug4.html.ref @@ -0,0 +1,82 @@ + +Bug4
Safe HaskellNone

Bug4

Synopsis

Documentation

foo :: Int

don't use apostrophe's in the wrong place's +

diff --git a/html-test/tests/Bug6.hs b/html-test/tests/Bug6.hs new file mode 100644 index 00000000..17411f31 --- /dev/null +++ b/html-test/tests/Bug6.hs @@ -0,0 +1,23 @@ +-- | Exporting records. +module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where + +-- | +-- This record is exported without its field +data A = A { a :: Int } + +-- | +-- .. with its field, but the field is named separately in the export list +-- (the field isn't documented separately since it is already documented here) +data B = B { b :: Int } + +-- | +-- .. with fields names as subordinate names in the export +data C = C { c1 :: Int, c2 :: Int } + +-- | +-- .. with only some of the fields exported (we can't handle this one - +-- how do we render the declaration?) +data D = D { d1 :: Int, d2 :: Int } + +-- | a newtype with a field +newtype E = E { e :: Int } diff --git a/html-test/tests/Bug6.html.ref b/html-test/tests/Bug6.html.ref new file mode 100644 index 00000000..606e45e3 --- /dev/null +++ b/html-test/tests/Bug6.html.ref @@ -0,0 +1,335 @@ + +Bug6
Safe HaskellNone

Bug6

Description

Exporting records. +

Synopsis

Documentation

data A

This record is exported without its field +

Constructors

A Int 

data B

.. with its field, but the field is named separately in the export list + (the field isn't documented separately since it is already documented here) +

Constructors

B 

Fields

b :: Int
 

data C

.. with fields names as subordinate names in the export +

Constructors

C 

Fields

c1 :: Int
 
c2 :: Int
 

data D

.. with only some of the fields exported (we can't handle this one - + how do we render the declaration?) +

Constructors

D Int Int 

newtype E

a newtype with a field +

Constructors

E Int 
diff --git a/html-test/tests/Bug7.hs b/html-test/tests/Bug7.hs new file mode 100644 index 00000000..8cf57914 --- /dev/null +++ b/html-test/tests/Bug7.hs @@ -0,0 +1,12 @@ +-- | This module caused a duplicate instance in the documentation for the Foo +-- type. +module Bug7 where + +-- | The Foo datatype +data Foo = Foo + +-- | The Bar class +class Bar x y + +-- | Just one instance +instance Bar Foo Foo diff --git a/html-test/tests/Bug7.html.ref b/html-test/tests/Bug7.html.ref new file mode 100644 index 00000000..8ac72b16 --- /dev/null +++ b/html-test/tests/Bug7.html.ref @@ -0,0 +1,173 @@ + +Bug7
Safe HaskellNone

Bug7

Description

This module caused a duplicate instance in the documentation for the Foo + type. +

Synopsis

Documentation

data Foo

The Foo datatype +

Constructors

Foo 

Instances

Bar Foo Foo

Just one instance +

class Bar x y

The Bar class +

Instances

Bar Foo Foo

Just one instance +

diff --git a/html-test/tests/Bug8.hs b/html-test/tests/Bug8.hs new file mode 100644 index 00000000..18df63c8 --- /dev/null +++ b/html-test/tests/Bug8.hs @@ -0,0 +1,14 @@ +module Bug8 where + +infix --> +infix ---> + +data Typ = Type (String,[Typ]) + | TFree (String, [String]) + +x --> y = Type("fun",[s,t]) +(--->) = flip $ foldr (-->) + +s = undefined +t = undefined +main = undefined diff --git a/html-test/tests/Bug8.html.ref b/html-test/tests/Bug8.html.ref new file mode 100644 index 00000000..469151f1 --- /dev/null +++ b/html-test/tests/Bug8.html.ref @@ -0,0 +1,131 @@ + +Bug8
Safe HaskellNone

Bug8

Documentation

data Typ

Constructors

Type (String, [Typ]) 
TFree (String, [String]) 

(-->) :: t -> t1 -> Typ

(--->) :: [a] -> Typ -> Typ

s :: a

t :: a

main :: a

diff --git a/html-test/tests/BugDeprecated.hs b/html-test/tests/BugDeprecated.hs new file mode 100644 index 00000000..0f7ac2eb --- /dev/null +++ b/html-test/tests/BugDeprecated.hs @@ -0,0 +1,18 @@ +module BugDeprecated where + +foo, bar, baz :: Int +foo = 23 +bar = 23 +baz = 23 +{-# DEPRECATED foo "for foo" #-} +{-# DEPRECATED bar "for bar" #-} +{-# DEPRECATED baz "for baz" #-} + +-- | some documentation for one, two and three +one, two, three :: Int +one = 23 +two = 23 +three = 23 +{-# DEPRECATED one "for one" #-} +{-# DEPRECATED two "for two" #-} +{-# DEPRECATED three "for three" #-} diff --git a/html-test/tests/BugDeprecated.html.ref b/html-test/tests/BugDeprecated.html.ref new file mode 100644 index 00000000..913b189d --- /dev/null +++ b/html-test/tests/BugDeprecated.html.ref @@ -0,0 +1,198 @@ + +BugDeprecated
Safe HaskellNone

BugDeprecated

Synopsis

Documentation

foo :: Int

Deprecated: for foo +

baz :: Int

Deprecated: for baz +

bar :: Int

Deprecated: for bar +

one :: Int

Deprecated: for one +

some documentation for one, two and three +

three :: Int

Deprecated: for three +

some documentation for one, two and three +

two :: Int

Deprecated: for two +

some documentation for one, two and three +

diff --git a/html-test/tests/BugExportHeadings.hs b/html-test/tests/BugExportHeadings.hs new file mode 100644 index 00000000..a5493a08 --- /dev/null +++ b/html-test/tests/BugExportHeadings.hs @@ -0,0 +1,29 @@ +-- test for #192 +module BugExportHeadings ( +-- * Foo + foo +-- * Bar +, bar +-- * Baz +, baz + +-- * One +, one +-- * Two +, two +-- * Three +, three +) where + +foo, bar, baz :: Int +foo = 23 +bar = 23 +baz = 23 + +one, two, three :: Int +one = 23 +two = 23 +three = 23 +{-# DEPRECATED one "for one" #-} +{-# DEPRECATED two "for two" #-} +{-# DEPRECATED three "for three" #-} diff --git a/html-test/tests/BugExportHeadings.html.ref b/html-test/tests/BugExportHeadings.html.ref new file mode 100644 index 00000000..457e2c50 --- /dev/null +++ b/html-test/tests/BugExportHeadings.html.ref @@ -0,0 +1,220 @@ + +BugExportHeadings
Safe HaskellNone

BugExportHeadings

Synopsis

Foo +

foo :: Int

Bar +

bar :: Int

Baz +

baz :: Int

One +

one :: Int

Deprecated: for one +

Two +

two :: Int

Deprecated: for two +

Three +

three :: Int

Deprecated: for three +

diff --git a/html-test/tests/Bugs.hs b/html-test/tests/Bugs.hs new file mode 100644 index 00000000..8e1f0079 --- /dev/null +++ b/html-test/tests/Bugs.hs @@ -0,0 +1,3 @@ +module Bugs where + +data A a = A a (a -> Int) diff --git a/html-test/tests/Bugs.html.ref b/html-test/tests/Bugs.html.ref new file mode 100644 index 00000000..c5a4ca9d --- /dev/null +++ b/html-test/tests/Bugs.html.ref @@ -0,0 +1,81 @@ + +Bugs
Safe HaskellNone

Bugs

Documentation

data A a

Constructors

A a (a -> Int) 
diff --git a/html-test/tests/CrossPackageDocs.hs b/html-test/tests/CrossPackageDocs.hs new file mode 100644 index 00000000..4d529f79 --- /dev/null +++ b/html-test/tests/CrossPackageDocs.hs @@ -0,0 +1,4 @@ +module CrossPackageDocs (map, IsString(..), runInteractiveProcess) where + +import System.Process +import Data.String diff --git a/html-test/tests/CrossPackageDocs.html.ref b/html-test/tests/CrossPackageDocs.html.ref new file mode 100644 index 00000000..fea3d0cc --- /dev/null +++ b/html-test/tests/CrossPackageDocs.html.ref @@ -0,0 +1,298 @@ + +CrossPackageDocs
Safe HaskellNone

CrossPackageDocs

Synopsis

Documentation

map :: (a -> b) -> [a] -> [b]

map f xs is the list obtained by applying f to each element + of xs, i.e., +

 map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
+ map f [x1, x2, ...] == [f x1, f x2, ...]
+

class IsString a where

Class for string-like datastructures; used by the overloaded string + extension (-foverloaded-strings in GHC). +

Methods

fromString :: String -> a

Instances

runInteractiveProcess

Arguments

:: FilePath

Filename of the executable (see proc for details) +

-> [String]

Arguments to pass to the executable +

-> Maybe FilePath

Optional path to the working directory +

-> Maybe [(String, String)]

Optional environment (otherwise inherit) +

-> IO (Handle, Handle, Handle, ProcessHandle) 

Runs a raw command, and returns Handles that may be used to communicate + with the process via its stdin, stdout and stderr respectively. +

For example, to start a process and feed a string to its stdin: +

   (inp,out,err,pid) <- runInteractiveProcess "..."
+   forkIO (hPutStr inp str)
+

The Handles are initially in binary mode; if you need them to be + in text mode then use hSetBinaryMode. +

diff --git a/html-test/tests/DeprecatedClass.hs b/html-test/tests/DeprecatedClass.hs new file mode 100644 index 00000000..018904ab --- /dev/null +++ b/html-test/tests/DeprecatedClass.hs @@ -0,0 +1,15 @@ +module DeprecatedClass where + +-- | some class +class SomeClass a where + -- | documentation for foo + foo :: a -> a + +{-# DEPRECATED SomeClass "SomeClass" #-} +{-# DEPRECATED foo "foo" #-} + +class SomeOtherClass a where + bar :: a -> a + +{-# DEPRECATED SomeOtherClass "SomeOtherClass" #-} +{-# DEPRECATED bar "bar" #-} diff --git a/html-test/tests/DeprecatedClass.html.ref b/html-test/tests/DeprecatedClass.html.ref new file mode 100644 index 00000000..d716c1d8 --- /dev/null +++ b/html-test/tests/DeprecatedClass.html.ref @@ -0,0 +1,161 @@ + +DeprecatedClass
Safe HaskellNone

DeprecatedClass

Synopsis

Documentation

class SomeClass a where

Deprecated: SomeClass +

some class +

Methods

foo :: a -> a

Deprecated: foo +

documentation for foo +

class SomeOtherClass a where

Deprecated: SomeOtherClass +

Methods

bar :: a -> a

Deprecated: bar +

diff --git a/html-test/tests/DeprecatedData.hs b/html-test/tests/DeprecatedData.hs new file mode 100644 index 00000000..c40ba122 --- /dev/null +++ b/html-test/tests/DeprecatedData.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedData where + +-- | type Foo +data Foo = Foo -- ^ constructor Foo + | Bar -- ^ constructor Bar + +{-# DEPRECATED Foo "Foo" #-} +{-# DEPRECATED Bar "Bar" #-} + +data One = One + | Two + +{-# DEPRECATED One "One" #-} +{-# DEPRECATED Two "Two" #-} diff --git a/html-test/tests/DeprecatedData.html.ref b/html-test/tests/DeprecatedData.html.ref new file mode 100644 index 00000000..24758345 --- /dev/null +++ b/html-test/tests/DeprecatedData.html.ref @@ -0,0 +1,198 @@ + +DeprecatedData
Safe HaskellNone

DeprecatedData

Synopsis

Documentation

data Foo

Deprecated: Foo +

type Foo +

Constructors

Foo

Deprecated: Foo +

constructor Foo +

Bar

Deprecated: Bar +

constructor Bar +

data One

Deprecated: One +

Constructors

One

Deprecated: One +

Two

Deprecated: Two +

diff --git a/html-test/tests/DeprecatedFunction.hs b/html-test/tests/DeprecatedFunction.hs new file mode 100644 index 00000000..8d626435 --- /dev/null +++ b/html-test/tests/DeprecatedFunction.hs @@ -0,0 +1,10 @@ +module DeprecatedFunction where + +-- | some documentation for foo +foo :: Int +foo = 23 +{-# DEPRECATED foo "use `bar` instead" #-} + +-- | some documentation for bar +bar :: Int +bar = 42 diff --git a/html-test/tests/DeprecatedFunction.html.ref b/html-test/tests/DeprecatedFunction.html.ref new file mode 100644 index 00000000..1fc678bb --- /dev/null +++ b/html-test/tests/DeprecatedFunction.html.ref @@ -0,0 +1,110 @@ + +DeprecatedFunction
Safe HaskellNone

DeprecatedFunction

Synopsis

Documentation

foo :: Int

Deprecated: use bar instead +

some documentation for foo +

bar :: Int

some documentation for bar +

diff --git a/html-test/tests/DeprecatedFunction2.hs b/html-test/tests/DeprecatedFunction2.hs new file mode 100644 index 00000000..bdbbf95c --- /dev/null +++ b/html-test/tests/DeprecatedFunction2.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction2 where + + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/html-test/tests/DeprecatedFunction2.html.ref b/html-test/tests/DeprecatedFunction2.html.ref new file mode 100644 index 00000000..b5068c8e --- /dev/null +++ b/html-test/tests/DeprecatedFunction2.html.ref @@ -0,0 +1,84 @@ + +DeprecatedFunction2
Safe HaskellNone

DeprecatedFunction2

Synopsis

Documentation

foo :: Int

Deprecated: use bar instead +

diff --git a/html-test/tests/DeprecatedFunction3.hs b/html-test/tests/DeprecatedFunction3.hs new file mode 100644 index 00000000..ca719bda --- /dev/null +++ b/html-test/tests/DeprecatedFunction3.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction3 where + + + +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/html-test/tests/DeprecatedFunction3.html.ref b/html-test/tests/DeprecatedFunction3.html.ref new file mode 100644 index 00000000..f24eb666 --- /dev/null +++ b/html-test/tests/DeprecatedFunction3.html.ref @@ -0,0 +1,84 @@ + +DeprecatedFunction3
Safe HaskellNone

DeprecatedFunction3

Synopsis

Documentation

foo :: Integer

Deprecated: use bar instead +

diff --git a/html-test/tests/DeprecatedModule.hs b/html-test/tests/DeprecatedModule.hs new file mode 100644 index 00000000..369dba4f --- /dev/null +++ b/html-test/tests/DeprecatedModule.hs @@ -0,0 +1,5 @@ +-- | Documentation for "DeprecatedModule". +module DeprecatedModule {-# DEPRECATED "Use \"Foo\" instead" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/DeprecatedModule.html.ref b/html-test/tests/DeprecatedModule.html.ref new file mode 100644 index 00000000..0ca4fafe --- /dev/null +++ b/html-test/tests/DeprecatedModule.html.ref @@ -0,0 +1,83 @@ + +DeprecatedModule
Safe HaskellNone

DeprecatedModule

Description

Deprecated: Use Foo instead +

Documentation for DeprecatedModule. +

Documentation

foo :: Int

diff --git a/html-test/tests/DeprecatedModule2.hs b/html-test/tests/DeprecatedModule2.hs new file mode 100644 index 00000000..94185297 --- /dev/null +++ b/html-test/tests/DeprecatedModule2.hs @@ -0,0 +1,4 @@ +module DeprecatedModule2 {-# DEPRECATED "Use Foo instead" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/DeprecatedModule2.html.ref b/html-test/tests/DeprecatedModule2.html.ref new file mode 100644 index 00000000..0a313ae9 --- /dev/null +++ b/html-test/tests/DeprecatedModule2.html.ref @@ -0,0 +1,76 @@ + +DeprecatedModule2
Safe HaskellNone

DeprecatedModule2

Description

Deprecated: Use Foo instead +

Documentation

foo :: Int

diff --git a/html-test/tests/DeprecatedNewtype.hs b/html-test/tests/DeprecatedNewtype.hs new file mode 100644 index 00000000..254f1f55 --- /dev/null +++ b/html-test/tests/DeprecatedNewtype.hs @@ -0,0 +1,10 @@ +module DeprecatedNewtype where + +-- | some documentation +newtype SomeNewType = SomeNewTypeConst String {- ^ constructor docu -} +{-# DEPRECATED SomeNewType "SomeNewType" #-} +{-# DEPRECATED SomeNewTypeConst "SomeNewTypeConst" #-} + +newtype SomeOtherNewType = SomeOtherNewTypeConst String +{-# DEPRECATED SomeOtherNewType "SomeOtherNewType" #-} +{-# DEPRECATED SomeOtherNewTypeConst "SomeOtherNewTypeConst" #-} diff --git a/html-test/tests/DeprecatedNewtype.html.ref b/html-test/tests/DeprecatedNewtype.html.ref new file mode 100644 index 00000000..521ffb92 --- /dev/null +++ b/html-test/tests/DeprecatedNewtype.html.ref @@ -0,0 +1,161 @@ + +DeprecatedNewtype
Safe HaskellNone

DeprecatedNewtype

Documentation

newtype SomeNewType

Deprecated: SomeNewType +

some documentation +

Constructors

SomeNewTypeConst String

Deprecated: SomeNewTypeConst +

constructor docu +

newtype SomeOtherNewType

Deprecated: SomeOtherNewType +

Constructors

SomeOtherNewTypeConst String

Deprecated: SomeOtherNewTypeConst +

diff --git a/html-test/tests/DeprecatedReExport.hs b/html-test/tests/DeprecatedReExport.hs new file mode 100644 index 00000000..f851e2ff --- /dev/null +++ b/html-test/tests/DeprecatedReExport.hs @@ -0,0 +1,16 @@ +-- | +-- What is tested here: +-- +-- * Deprecation messages are shown for re-exported items. +-- +module DeprecatedReExport ( +-- * Re-exported from an other module + foo +-- * Re-exported from an other package +-- | Not yet working, see +-- , isEmptyChan +, +) where + +import DeprecatedFunction +import Control.Concurrent.Chan diff --git a/html-test/tests/DeprecatedReExport.html.ref b/html-test/tests/DeprecatedReExport.html.ref new file mode 100644 index 00000000..611c181d --- /dev/null +++ b/html-test/tests/DeprecatedReExport.html.ref @@ -0,0 +1,133 @@ + +DeprecatedReExport
Safe HaskellNone

DeprecatedReExport

Description

What is tested here: +

  • Deprecation messages are shown for re-exported items. +

Synopsis

Re-exported from an other module +

foo :: Int

Deprecated: use bar instead +

some documentation for foo +

Re-exported from an other package +

Not yet working, see http://trac.haskell.org/haddock/ticket/223 + , isEmptyChan +

diff --git a/html-test/tests/DeprecatedRecord.hs b/html-test/tests/DeprecatedRecord.hs new file mode 100644 index 00000000..d44499e7 --- /dev/null +++ b/html-test/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/html-test/tests/DeprecatedRecord.html.ref b/html-test/tests/DeprecatedRecord.html.ref new file mode 100644 index 00000000..9ade8377 --- /dev/null +++ b/html-test/tests/DeprecatedRecord.html.ref @@ -0,0 +1,151 @@ + +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/html-test/tests/DeprecatedTypeFamily.hs b/html-test/tests/DeprecatedTypeFamily.hs new file mode 100644 index 00000000..70473bb8 --- /dev/null +++ b/html-test/tests/DeprecatedTypeFamily.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedTypeFamily where + +-- | some documentation +data family SomeTypeFamily k :: * -> * +{-# DEPRECATED SomeTypeFamily "SomeTypeFamily" #-} + +data family SomeOtherTypeFamily k :: * -> * +{-# DEPRECATED SomeOtherTypeFamily "SomeOtherTypeFamily" #-} diff --git a/html-test/tests/DeprecatedTypeFamily.html.ref b/html-test/tests/DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..ffc069a6 --- /dev/null +++ b/html-test/tests/DeprecatedTypeFamily.html.ref @@ -0,0 +1,108 @@ + +DeprecatedTypeFamily
Safe HaskellNone

DeprecatedTypeFamily

Synopsis

Documentation

data family SomeTypeFamily k :: * -> *

Deprecated: SomeTypeFamily +

some documentation +

data family SomeOtherTypeFamily k :: * -> *

Deprecated: SomeOtherTypeFamily +

diff --git a/html-test/tests/DeprecatedTypeSynonym.hs b/html-test/tests/DeprecatedTypeSynonym.hs new file mode 100644 index 00000000..34df47da --- /dev/null +++ b/html-test/tests/DeprecatedTypeSynonym.hs @@ -0,0 +1,9 @@ + +module DeprecatedTypeSynonym where + +-- | some documentation +type TypeSyn = String +{-# DEPRECATED TypeSyn "TypeSyn" #-} + +type OtherTypeSyn = String +{-# DEPRECATED OtherTypeSyn "OtherTypeSyn" #-} diff --git a/html-test/tests/DeprecatedTypeSynonym.html.ref b/html-test/tests/DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..665dcf5d --- /dev/null +++ b/html-test/tests/DeprecatedTypeSynonym.html.ref @@ -0,0 +1,116 @@ + +DeprecatedTypeSynonym
Safe HaskellNone

DeprecatedTypeSynonym

Synopsis

Documentation

type TypeSyn = String

Deprecated: TypeSyn +

some documentation +

type OtherTypeSyn = String

Deprecated: OtherTypeSyn +

diff --git a/html-test/tests/DeprecationMessageParseError.hs b/html-test/tests/DeprecationMessageParseError.hs new file mode 100644 index 00000000..2f8fb492 --- /dev/null +++ b/html-test/tests/DeprecationMessageParseError.hs @@ -0,0 +1,12 @@ +-- | +-- What is tested here: +-- +-- * If parsing of a deprecation message fails, the message is included +-- verbatim. +-- +module DeprecationMessageParseError where + +-- | some documentation for foo +foo :: Int +foo = 23 +{-# DEPRECATED foo "use @bar instead" #-} diff --git a/html-test/tests/DeprecationMessageParseError.html.ref b/html-test/tests/DeprecationMessageParseError.html.ref new file mode 100644 index 00000000..75f9bf54 --- /dev/null +++ b/html-test/tests/DeprecationMessageParseError.html.ref @@ -0,0 +1,101 @@ + +DeprecationMessageParseError
Safe HaskellNone

DeprecationMessageParseError

Description

What is tested here: +

  • If parsing of a deprecation message fails, the message is included + verbatim. +

Synopsis

Documentation

foo :: Int

Deprecated: use @bar instead

some documentation for foo +

diff --git a/html-test/tests/Examples.hs b/html-test/tests/Examples.hs new file mode 100644 index 00000000..c8c450f1 --- /dev/null +++ b/html-test/tests/Examples.hs @@ -0,0 +1,39 @@ +module Examples where + +-- | Fibonacci number of given 'Integer'. +-- +-- Examples: +-- +-- >>> fib 5 +-- 5 +-- >>> fib 10 +-- 55 +-- +-- >>> fib 10 +-- 55 +-- +-- One more Example: +-- +-- >>> fib 5 +-- 5 +-- +-- One more Example: +-- +-- >>> fib 5 +-- 5 +-- +-- Example with an import: +-- +-- >>> import Data.Char +-- >>> isSpace 'a' +-- False +-- +-- >>> putStrLn "foo\n\nbar" +-- foo +-- +-- bar +-- +fib :: Integer -> Integer +fib 0 = 0 +fib 1 = 1 +fib n = fib (n - 1) + fib (n - 2) diff --git a/html-test/tests/Examples.html.ref b/html-test/tests/Examples.html.ref new file mode 100644 index 00000000..7ebe7770 --- /dev/null +++ b/html-test/tests/Examples.html.ref @@ -0,0 +1,179 @@ + +Examples
Safe HaskellNone

Examples

Synopsis

Documentation

fib :: Integer -> Integer

Fibonacci number of given Integer. +

Examples: +

>>> fib 5
+5
+>>> fib 10
+55
+
>>> fib 10
+55
+

One more Example: +

>>> fib 5
+5
+

One more Example: +

>>> fib 5
+5
+

Example with an import: +

>>> import Data.Char
+>>> isSpace 'a'
+False
+
>>> putStrLn "foo\n\nbar"
+foo
+
+bar
+
diff --git a/html-test/tests/FunArgs.hs b/html-test/tests/FunArgs.hs new file mode 100644 index 00000000..b34d84b7 --- /dev/null +++ b/html-test/tests/FunArgs.hs @@ -0,0 +1,16 @@ +module FunArgs where + +f :: forall a. Ord a + => Int -- ^ First argument + -> a -- ^ Second argument + -> Bool -- ^ Third argument + -> (a -> a) -- ^ Fourth argument + -> () -- ^ Result +f = undefined + + +g :: a -- ^ First argument + -> b -- ^ Second argument + -> c -- ^ Third argument + -> d -- ^ Result +g = undefined diff --git a/html-test/tests/FunArgs.html.ref b/html-test/tests/FunArgs.html.ref new file mode 100644 index 00000000..6c87d1e6 --- /dev/null +++ b/html-test/tests/FunArgs.html.ref @@ -0,0 +1,176 @@ + +FunArgs
Safe HaskellNone

FunArgs

Documentation

f

Arguments

:: forall a . Ord a 
=> Int

First argument +

-> a

Second argument +

-> Bool

Third argument +

-> (a -> a)

Fourth argument +

-> ()

Result +

g

Arguments

:: a

First argument +

-> b

Second argument +

-> c

Third argument +

-> d

Result +

diff --git a/html-test/tests/GADTRecords.hs b/html-test/tests/GADTRecords.hs new file mode 100644 index 00000000..c77810ad --- /dev/null +++ b/html-test/tests/GADTRecords.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE GADTs #-} +module GADTRecords (H1(..)) where + +-- | h1 +data H1 a b where + C1 :: H1 a b + C2 :: Ord a => [a] -> H1 a a + C3 { field :: Int -- ^ hello docs + } :: H1 Int Int + C4 { field2 :: a -- ^ hello2 docs + } :: H1 Int a + diff --git a/html-test/tests/GADTRecords.html.ref b/html-test/tests/GADTRecords.html.ref new file mode 100644 index 00000000..e3fcd2fe --- /dev/null +++ b/html-test/tests/GADTRecords.html.ref @@ -0,0 +1,234 @@ + +GADTRecords
Safe HaskellNone

GADTRecords

Synopsis

Documentation

data H1 a b where

h1 +

Constructors

C1 :: H1 a b 
C2 :: Ord a => [a] -> H1 a a 
C3 :: Int -> H1 Int Int 

Fields

field :: Int

hello docs +

C4 :: a -> H1 Int a 

Fields

field2 :: a

hello2 docs +

diff --git a/html-test/tests/Hash.hs b/html-test/tests/Hash.hs new file mode 100644 index 00000000..343b69e9 --- /dev/null +++ b/html-test/tests/Hash.hs @@ -0,0 +1,51 @@ +{- | + Implementation of fixed-size hash tables, with a type + class for constructing hash values for structured types. +-} +module Hash ( + -- * The @HashTable@ type + HashTable, + + -- ** Operations on @HashTable@s + new, insert, lookup, + + -- * The @Hash@ class + Hash(..), + ) where + +import Data.Array +import Prelude hiding (lookup) + +-- | A hash table with keys of type @key@ and values of type @val@. +-- The type @key@ should be an instance of 'Eq'. +data HashTable key val = HashTable Int (Array Int [(key,val)]) + +-- | Builds a new hash table with a given size +new :: (Eq key, Hash key) => Int -> IO (HashTable key val) +new = undefined + +-- | Inserts a new element into the hash table +insert :: (Eq key, Hash key) => key -> val -> IO () +insert = undefined + +-- | Looks up a key in the hash table, returns @'Just' val@ if the key +-- was found, or 'Nothing' otherwise. +lookup :: Hash key => key -> IO (Maybe val) +lookup = undefined + +-- | A class of types which can be hashed. +class Hash a where + -- | hashes the value of type @a@ into an 'Int' + hash :: a -> Int + +instance Hash Int where + hash = id + +instance Hash Float where + hash = trunc + +instance (Hash a, Hash b) => Hash (a,b) where + hash (a,b) = hash a `xor` hash b + +trunc = undefined +xor = undefined diff --git a/html-test/tests/Hash.html.ref b/html-test/tests/Hash.html.ref new file mode 100644 index 00000000..b0cd183c --- /dev/null +++ b/html-test/tests/Hash.html.ref @@ -0,0 +1,337 @@ + +Hash
Safe HaskellNone

Hash

Description

Implementation of fixed-size hash tables, with a type + class for constructing hash values for structured types. +

Synopsis

The HashTable type +

data HashTable key val

A hash table with keys of type key and values of type val. + The type key should be an instance of Eq. +

Operations on HashTables +

new :: (Eq key, Hash key) => Int -> IO (HashTable key val)

Builds a new hash table with a given size +

insert :: (Eq key, Hash key) => key -> val -> IO ()

Inserts a new element into the hash table +

lookup :: Hash key => key -> IO (Maybe val)

Looks up a key in the hash table, returns Just val if the key + was found, or Nothing otherwise. +

The Hash class +

class Hash a where

A class of types which can be hashed. +

Methods

hash :: a -> Int

hashes the value of type a into an Int +

Instances

Hash Float 
Hash Int 
(Hash a, Hash b) => Hash (a, b) 
diff --git a/html-test/tests/Hidden.hs b/html-test/tests/Hidden.hs new file mode 100644 index 00000000..896da648 --- /dev/null +++ b/html-test/tests/Hidden.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_HADDOCK hide #-} + +module Hidden where + +hidden :: Int -> Int +hidden a = a diff --git a/html-test/tests/HiddenInstances.hs b/html-test/tests/HiddenInstances.hs new file mode 100644 index 00000000..99a6c2fd --- /dev/null +++ b/html-test/tests/HiddenInstances.hs @@ -0,0 +1,35 @@ +-- http://trac.haskell.org/haddock/ticket/37 +module HiddenInstances (VisibleClass, VisibleData) where + +-- | Should be visible +class VisibleClass a + +-- | Should *not* be visible +class HiddenClass a + +-- | Should *not* be visible +data HiddenData = HiddenData + +-- | Should be visible +data VisibleData = VisibleData + +-- | Should be visible +instance VisibleClass Int + +-- | Should be visible +instance VisibleClass VisibleData + +-- | Should be visible +instance Num VisibleData + +-- | Should *not* be visible +instance VisibleClass HiddenData + +-- | Should *not* be visible +instance HiddenClass Int + +-- | Should *not* be visible +instance HiddenClass VisibleData + +-- | Should *not* be visible +instance HiddenClass HiddenData diff --git a/html-test/tests/HiddenInstances.html.ref b/html-test/tests/HiddenInstances.html.ref new file mode 100644 index 00000000..999c114d --- /dev/null +++ b/html-test/tests/HiddenInstances.html.ref @@ -0,0 +1,169 @@ + +HiddenInstances
Safe HaskellNone

HiddenInstances

Synopsis

Documentation

class VisibleClass a

Should be visible +

Instances

VisibleClass Int

Should be visible +

VisibleClass VisibleData

Should be visible +

data VisibleData

Should be visible +

Instances

Num VisibleData

Should be visible +

VisibleClass VisibleData

Should be visible +

diff --git a/html-test/tests/HiddenInstancesA.hs b/html-test/tests/HiddenInstancesA.hs new file mode 100644 index 00000000..f1775208 --- /dev/null +++ b/html-test/tests/HiddenInstancesA.hs @@ -0,0 +1,17 @@ +{-# OPTIONS_HADDOCK hide #-} +module HiddenInstancesA where + +-- | Should be visible +class Foo a + +-- | Should be visible +data Bar + +-- | Should be visible +instance Foo Bar + +-- | Should *not* be visible +data Baz + +-- | Should *not* be visible +instance Foo Baz diff --git a/html-test/tests/HiddenInstancesB.hs b/html-test/tests/HiddenInstancesB.hs new file mode 100644 index 00000000..eabf0637 --- /dev/null +++ b/html-test/tests/HiddenInstancesB.hs @@ -0,0 +1,2 @@ +module HiddenInstancesB (Foo, Bar) where +import HiddenInstancesA diff --git a/html-test/tests/HiddenInstancesB.html.ref b/html-test/tests/HiddenInstancesB.html.ref new file mode 100644 index 00000000..207a5146 --- /dev/null +++ b/html-test/tests/HiddenInstancesB.html.ref @@ -0,0 +1,143 @@ + +HiddenInstancesB
Safe HaskellNone

HiddenInstancesB

Synopsis

Documentation

class Foo a

Should be visible +

Instances

Foo Bar

Should be visible +

data Bar

Should be visible +

Instances

Foo Bar

Should be visible +

diff --git a/html-test/tests/Hyperlinks.hs b/html-test/tests/Hyperlinks.hs new file mode 100644 index 00000000..34e64448 --- /dev/null +++ b/html-test/tests/Hyperlinks.hs @@ -0,0 +1,8 @@ +module Hyperlinks where + +-- | +-- A plain URL: +-- +-- A URL with a label: +foo :: Int +foo = 23 diff --git a/html-test/tests/Hyperlinks.html.ref b/html-test/tests/Hyperlinks.html.ref new file mode 100644 index 00000000..e7351a63 --- /dev/null +++ b/html-test/tests/Hyperlinks.html.ref @@ -0,0 +1,89 @@ + +Hyperlinks
Safe HaskellNone

Hyperlinks

Synopsis

Documentation

foo :: Int

A plain URL: http://example.com/ +

A URL with a label: some link +

diff --git a/html-test/tests/IgnoreExports.hs b/html-test/tests/IgnoreExports.hs new file mode 100644 index 00000000..0321ad02 --- /dev/null +++ b/html-test/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/html-test/tests/IgnoreExports.html.ref b/html-test/tests/IgnoreExports.html.ref new file mode 100644 index 00000000..c661b48c --- /dev/null +++ b/html-test/tests/IgnoreExports.html.ref @@ -0,0 +1,101 @@ + +IgnoreExports
Safe HaskellNone

IgnoreExports

Synopsis

Documentation

foo :: Int

documentation for foo +

bar :: Int

documentation for bar +

diff --git a/html-test/tests/ModuleWithWarning.hs b/html-test/tests/ModuleWithWarning.hs new file mode 100644 index 00000000..e64d9d7e --- /dev/null +++ b/html-test/tests/ModuleWithWarning.hs @@ -0,0 +1,5 @@ +-- | Documentation for "ModuleWithWarning". +module ModuleWithWarning {-# WARNING "This is an unstable interface. Prefer functions from \"Prelude\" instead!" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/ModuleWithWarning.html.ref b/html-test/tests/ModuleWithWarning.html.ref new file mode 100644 index 00000000..348f0822 --- /dev/null +++ b/html-test/tests/ModuleWithWarning.html.ref @@ -0,0 +1,83 @@ + +ModuleWithWarning
Safe HaskellNone

ModuleWithWarning

Description

Warning: This is an unstable interface. Prefer functions from Prelude instead! +

Documentation for ModuleWithWarning. +

Documentation

foo :: Int

diff --git a/html-test/tests/NamedDoc.hs b/html-test/tests/NamedDoc.hs new file mode 100644 index 00000000..7c04ba72 --- /dev/null +++ b/html-test/tests/NamedDoc.hs @@ -0,0 +1,4 @@ +module NamedDoc where + +-- $foo bar + diff --git a/html-test/tests/NamedDoc.html.ref b/html-test/tests/NamedDoc.html.ref new file mode 100644 index 00000000..d2b8ede1 --- /dev/null +++ b/html-test/tests/NamedDoc.html.ref @@ -0,0 +1,68 @@ + +NamedDoc
Safe HaskellNone

NamedDoc

Synopsis

    Documentation

    bar +

    diff --git a/html-test/tests/NoLayout.hs b/html-test/tests/NoLayout.hs new file mode 100644 index 00000000..19b38b1d --- /dev/null +++ b/html-test/tests/NoLayout.hs @@ -0,0 +1,12 @@ + +-- Haddock comments are parsed as separate declarations so we +-- need to insert a ';' when using them with explicit layout. +-- This should probably be changed. + +module NoLayout where { + -- | the function 'g' + ; + g :: Int; + g = undefined + } + diff --git a/html-test/tests/NoLayout.html.ref b/html-test/tests/NoLayout.html.ref new file mode 100644 index 00000000..871add05 --- /dev/null +++ b/html-test/tests/NoLayout.html.ref @@ -0,0 +1,86 @@ + +NoLayout
    Safe HaskellNone

    NoLayout

    Synopsis

    Documentation

    g :: Int

    the function g +

    diff --git a/html-test/tests/NonGreedy.hs b/html-test/tests/NonGreedy.hs new file mode 100644 index 00000000..f51b55f5 --- /dev/null +++ b/html-test/tests/NonGreedy.hs @@ -0,0 +1,5 @@ +module NonGreedy where + +-- | +f :: a +f = undefined diff --git a/html-test/tests/NonGreedy.html.ref b/html-test/tests/NonGreedy.html.ref new file mode 100644 index 00000000..23d3f695 --- /dev/null +++ b/html-test/tests/NonGreedy.html.ref @@ -0,0 +1,82 @@ + +NonGreedy
    Safe HaskellNone

    NonGreedy

    Synopsis

    • f :: a

    Documentation

    f :: a

    diff --git a/html-test/tests/Properties.hs b/html-test/tests/Properties.hs new file mode 100644 index 00000000..05930ece --- /dev/null +++ b/html-test/tests/Properties.hs @@ -0,0 +1,9 @@ +module Properties where + +-- | Fibonacci number of given 'Integer'. +-- +-- prop> fib n <= fib (n + 1) +fib :: Integer -> Integer +fib 0 = 0 +fib 1 = 1 +fib n = fib (n - 1) + fib (n - 2) diff --git a/html-test/tests/Properties.html.ref b/html-test/tests/Properties.html.ref new file mode 100644 index 00000000..1c4ce893 --- /dev/null +++ b/html-test/tests/Properties.html.ref @@ -0,0 +1,92 @@ + +Properties
    Safe HaskellNone

    Properties

    Synopsis

    Documentation

    fib :: Integer -> Integer

    Fibonacci number of given Integer. +

    fib n <= fib (n + 1)
    diff --git a/html-test/tests/PruneWithWarning.hs b/html-test/tests/PruneWithWarning.hs new file mode 100644 index 00000000..bfa55ea2 --- /dev/null +++ b/html-test/tests/PruneWithWarning.hs @@ -0,0 +1,15 @@ +{-# OPTIONS_HADDOCK prune #-} +-- | +-- What is tested here: +-- +-- * If a binding has a deprecation message but no documentation, it is pruned +-- when @OPTIONS_HADDOCK prune@ is used. +-- +module PruneWithWarning (foo, bar) where + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} + +bar :: Int +bar = 42 diff --git a/html-test/tests/PruneWithWarning.html.ref b/html-test/tests/PruneWithWarning.html.ref new file mode 100644 index 00000000..3c31fbdf --- /dev/null +++ b/html-test/tests/PruneWithWarning.html.ref @@ -0,0 +1,72 @@ + +PruneWithWarning
    Safe HaskellNone

    PruneWithWarning

    Description

    What is tested here: +

    • If a binding has a deprecation message but no documentation, it is pruned + when OPTIONS_HADDOCK prune is used. +
    diff --git a/html-test/tests/QuasiExpr.hs b/html-test/tests/QuasiExpr.hs new file mode 100644 index 00000000..970759ba --- /dev/null +++ b/html-test/tests/QuasiExpr.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- Used by QuasiQuote. Example taken from the GHC documentation. +module QuasiExpr where + +import Language.Haskell.TH +import Language.Haskell.TH.Quote + +data Expr = IntExpr Integer + | AntiIntExpr String + | BinopExpr BinOp Expr Expr + | AntiExpr String + deriving Show + +data BinOp = AddOp + | SubOp + | MulOp + | DivOp + deriving Show + +eval :: Expr -> Integer +eval (IntExpr n) = n +eval (BinopExpr op x y) = (opToFun op) (eval x) (eval y) + where + opToFun AddOp = (+) + opToFun SubOp = (-) + opToFun MulOp = (*) + opToFun DivOp = div + +expr = QuasiQuoter parseExprExp undefined undefined undefined + +-- cheating... +parseExprExp :: String -> Q Exp +parseExprExp _ = [| BinopExpr AddOp (IntExpr 1) (IntExpr 2) |] diff --git a/html-test/tests/QuasiExpr.html.ref b/html-test/tests/QuasiExpr.html.ref new file mode 100644 index 00000000..0a699f35 --- /dev/null +++ b/html-test/tests/QuasiExpr.html.ref @@ -0,0 +1,221 @@ + +QuasiExpr
    Safe HaskellNone

    QuasiExpr

    Documentation

    data BinOp

    Constructors

    AddOp 
    SubOp 
    MulOp 
    DivOp 

    Instances

    expr :: QuasiQuoter

    parseExprExp :: String -> Q Exp

    diff --git a/html-test/tests/QuasiQuote.hs b/html-test/tests/QuasiQuote.hs new file mode 100644 index 00000000..06762cf9 --- /dev/null +++ b/html-test/tests/QuasiQuote.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} + +-- example taken from the GHC documentation +module QuasiQuote where + +import QuasiExpr + +val :: Integer +val = eval [expr|1 + 2|] diff --git a/html-test/tests/QuasiQuote.html.ref b/html-test/tests/QuasiQuote.html.ref new file mode 100644 index 00000000..f61f2b84 --- /dev/null +++ b/html-test/tests/QuasiQuote.html.ref @@ -0,0 +1,65 @@ + +QuasiQuote
    Safe HaskellNone

    QuasiQuote

    Documentation

    diff --git a/html-test/tests/TH.hs b/html-test/tests/TH.hs new file mode 100644 index 00000000..f8178bcb --- /dev/null +++ b/html-test/tests/TH.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH where + +import Language.Haskell.TH + +decl :: Q [Dec] +decl = [d| f x = x|] diff --git a/html-test/tests/TH.html.ref b/html-test/tests/TH.html.ref new file mode 100644 index 00000000..086d6a4a --- /dev/null +++ b/html-test/tests/TH.html.ref @@ -0,0 +1,63 @@ + +TH
    Safe HaskellNone

    TH

    Documentation

    decl :: Q [Dec]

    diff --git a/html-test/tests/TH2.hs b/html-test/tests/TH2.hs new file mode 100644 index 00000000..ea85e547 --- /dev/null +++ b/html-test/tests/TH2.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH2 where + +import TH + +$( decl ) diff --git a/html-test/tests/TH2.html.ref b/html-test/tests/TH2.html.ref new file mode 100644 index 00000000..4d4a8914 --- /dev/null +++ b/html-test/tests/TH2.html.ref @@ -0,0 +1,63 @@ + +TH2
    Safe HaskellNone

    TH2

    Documentation

    f :: t -> t

    diff --git a/html-test/tests/Test.hs b/html-test/tests/Test.hs new file mode 100644 index 00000000..d352f029 --- /dev/null +++ b/html-test/tests/Test.hs @@ -0,0 +1,422 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Test +-- Copyright : (c) Simon Marlow 2002 +-- License : BSD-style +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- This module illustrates & tests most of the features of Haddock. +-- Testing references from the description: 'T', 'f', 'g', 'Visible.visible'. +-- +----------------------------------------------------------------------------- + +-- This is plain comment, ignored by Haddock. + +module Test ( + + -- Section headings are introduced with '-- *': + -- * Type declarations + + -- Subsection headings are introduced with '-- **' and so on. + -- ** Data types + T(..), T2, T3(..), T4(..), T5(..), T6(..), + N1(..), N2(..), N3(..), N4, N5(..), N6(..), N7(..), + + -- ** Records + R(..), R1(..), + + -- | test that we can export record selectors on their own: + p, q, u, + + -- * Class declarations + C(a,b), D(..), E, F(..), + + -- | Test that we can export a class method on its own: + a, + + -- * Function types + f, g, + + -- * Auxiliary stuff + + -- $aux1 + + -- $aux2 + + -- $aux3 + + -- $aux4 + + -- $aux5 + + -- $aux6 + + -- $aux7 + + -- $aux8 + + -- $aux9 + + -- $aux10 + + -- $aux11 + + -- $aux12 + + -- | This is some inline documentation in the export list + -- + -- > a code block using bird-tracks + -- > each line must begin with > (which isn't significant unless it + -- > is at the beginning of the line). + + -- * A hidden module + module Hidden, + + -- * A visible module + module Visible, + + {-| nested-style doc comments -} + + -- * Existential \/ Universal types + Ex(..), + + -- * Type signatures with argument docs + k, l, m, o, + + -- * A section + -- and without an intervening comma: + -- ** A subsection + +{-| + > a literal line + + $ a non /literal/ line $ +-} + + f', + + withType, withoutType + ) where + +import Hidden +import Visible +import Data.Maybe + +bla = Nothing + +-- | This comment applies to the /following/ declaration +-- and it continues until the next non-comment line +data T a b + = A Int (Maybe Float) -- ^ This comment describes the 'A' constructor + | -- | This comment describes the 'B' constructor + B (T a b, T Int Float) -- ^ + +-- | An abstract data declaration +data T2 a b = T2 a b + +-- | A data declaration with no documentation annotations on the constructors +data T3 a b = A1 a | B1 b + +-- A data declaration with no documentation annotations at all +data T4 a b = A2 a | B2 b + +-- A data declaration documentation on the constructors only +data T5 a b + = A3 a -- ^ documents 'A3' + | B3 b -- ^ documents 'B3' + +-- | Testing alternative comment styles +data T6 + -- | This is the doc for 'A4' + = A4 + | B4 + | -- ^ This is the doc for 'B4' + + -- | This is the doc for 'C4' + C4 + +-- | A newtype +newtype N1 a = N1 a + +-- | A newtype with a fieldname +newtype N2 a b = N2 {n :: a b} + +-- | A newtype with a fieldname, documentation on the field +newtype N3 a b = N3 {n3 :: a b -- ^ this is the 'n3' field + } + +-- | An abstract newtype - we show this one as data rather than newtype because +-- the difference isn\'t visible to the programmer for an abstract type. +newtype N4 a b = N4 a + +newtype N5 a b = N5 {n5 :: a b -- ^ no docs on the datatype or the constructor + } + +newtype N6 a b = N6 {n6 :: a b + } + -- ^ docs on the constructor only + +-- | docs on the newtype and the constructor +newtype N7 a b = N7 {n7 :: a b + } + -- ^ The 'N7' constructor + + +class (D a) => C a where + -- |this is a description of the 'a' method + a :: IO a + b :: [a] + -- ^ this is a description of the 'b' method + c :: a -- c is hidden in the export list + +-- ^ This comment applies to the /previous/ declaration (the 'C' class) + +class D a where + d :: T a b + e :: (a,a) +-- ^ This is a class declaration with no separate docs for the methods + +instance D Int where + d = undefined + e = undefined + +-- instance with a qualified class name +instance Test.D Float where + d = undefined + e = undefined + +class E a where + ee :: a +-- ^ This is a class declaration with no methods (or no methods exported) + +-- This is a class declaration with no documentation at all +class F a where + ff :: a + +-- | This is the documentation for the 'R' record, which has four fields, +-- 'p', 'q', 'r', and 's'. +data R = + -- | This is the 'C1' record constructor, with the following fields: + C1 { p :: Int -- ^ This comment applies to the 'p' field + , q :: forall a . a->a -- ^ This comment applies to the 'q' field + , -- | This comment applies to both 'r' and 's' + r,s :: Int + } + | C2 { t :: T1 -> (T2 Int Int)-> (T3 Bool Bool) -> (T4 Float Float) -> T5 () (), + u,v :: Int + } + -- ^ This is the 'C2' record constructor, also with some fields: + +-- | Testing different record commenting styles +data R1 + -- | This is the 'C3' record constructor + = C3 { + -- | The 's1' record selector + s1 :: Int + -- | The 's2' record selector + , s2 :: Int + , s3 :: Int -- NOTE: In the original examples/Test.hs in Haddock, there is an extra "," here. + -- Since GHC doesn't allow that, I have removed it in this file. + -- ^ The 's3' record selector + } + +-- These section headers are only used when there is no export list to +-- give the structure of the documentation: + +-- * This is a section header (level 1) +-- ** This is a section header (level 2) +-- *** This is a section header (level 3) + +{-| +In a comment string we can refer to identifiers in scope with +single quotes like this: 'T', and we can refer to modules by +using double quotes: "Foo". We can add emphasis /like this/. + + * This is a bulleted list + + - This is the next item (different kind of bullet) + + (1) This is an ordered list + + 2. This is the next item (different kind of bullet) + + [cat] a small, furry, domesticated mammal + + [pineapple] a fruit grown in the tropics + +@ + This is a block of code, which can include other markup: 'R' + formatting + is + significant +@ + +> this is another block of code + +We can also include URLs in documentation: . +-} + +f :: C a => a -> Int + +-- | we can export foreign declarations too +foreign import ccall g :: Int -> IO CInt + +-- | this doc string has a parse error in it: \' +h :: Int +h = 42 + + +-- $aux1 This is some documentation that is attached to a name ($aux1) +-- rather than a source declaration. The documentation may be +-- referred to in the export list using its name. +-- +-- @ code block in named doc @ + +-- $aux2 This is some documentation that is attached to a name ($aux2) + +-- $aux3 +-- @ code block on its own in named doc @ + +-- $aux4 +-- +-- @ code block on its own in named doc (after newline) @ + +{- $aux5 a nested, named doc comment + + with a paragraph, + + @ and a code block @ +-} + +-- some tests for various arrangements of code blocks: + +{- $aux6 +>test +>test1 + +@ test2 + test3 +@ +-} + +{- $aux7 +@ +test1 +test2 +@ +-} + +{- $aux8 +>test3 +>test4 +-} + +{- $aux9 +@ +test1 +test2 +@ + +>test3 +>test4 +-} + +{- $aux10 +>test3 +>test4 + +@ +test1 +test2 +@ +-} + +-- This one is currently wrong (Haddock 0.4). The @...@ part is +-- interpreted as part of the bird-tracked code block. +{- $aux11 +aux11: + +>test3 +>test4 + +@ +test1 +test2 +@ +-} + +-- $aux12 +-- > foo +-- +-- > bar +-- + +-- | A data-type using existential\/universal types +data Ex a + = forall b . C b => Ex1 b + | forall b . Ex2 b + | forall b . C a => Ex3 b -- NOTE: I have added "forall b" here make GHC accept this file + | Ex4 (forall a . a -> a) + +-- | This is a function with documentation for each argument +k :: T () () -- ^ This argument has type 'T' + -> (T2 Int Int) -- ^ This argument has type 'T2 Int Int' + -> (T3 Bool Bool -> T4 Float Float) -- ^ This argument has type @T3 Bool Bool -> T4 Float Float@ + -> T5 () () -- ^ This argument has a very long description that should + -- hopefully cause some wrapping to happen when it is finally + -- rendered by Haddock in the generated HTML page. + -> IO () -- ^ This is the result type + +-- This function has arg docs but no docs for the function itself +l :: (Int, Int, Float) -- ^ takes a triple + -> Int -- ^ returns an 'Int' + +-- | This function has some arg docs +m :: R + -> N1 () -- ^ one of the arguments + -> IO Int -- ^ and the return value + +-- | This function has some arg docs but not a return value doc + +-- can't use the original name ('n') with GHC +newn :: R -- ^ one of the arguments, an 'R' + -> N1 () -- ^ one of the arguments + -> IO Int +newn = undefined + + +-- | A foreign import with argument docs +foreign import ccall unsafe + o :: Float -- ^ The input float + -> IO Float -- ^ The output float + +-- | We should be able to escape this: \#\#\# + +-- p :: Int +-- can't use the above original definition with GHC +newp :: Int +newp = undefined + +-- | a function with a prime can be referred to as 'f'' +-- 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 + +data T1 +f = undefined +f' = undefined +type CInt = Int +k = undefined +l = undefined +m = undefined diff --git a/html-test/tests/Test.html.ref b/html-test/tests/Test.html.ref new file mode 100644 index 00000000..f2ef2b28 --- /dev/null +++ b/html-test/tests/Test.html.ref @@ -0,0 +1,2245 @@ + +Test
    Portabilityportable
    Stabilityprovisional
    Maintainerlibraries@haskell.org
    Safe HaskellNone

    Test

    Description

    This module illustrates & tests most of the features of Haddock. + Testing references from the description: T, f, g, visible. +

    Synopsis

    Type declarations +

    Data types +

    data T a b

    This comment applies to the following declaration + and it continues until the next non-comment line +

    Constructors

    A Int (Maybe Float)

    This comment describes the A constructor +

    B (T a b, T Int Float)

    This comment describes the B constructor +

    data T2 a b

    An abstract data declaration +

    data T3 a b

    A data declaration with no documentation annotations on the constructors +

    Constructors

    A1 a 
    B1 b 

    data T4 a b

    Constructors

    A2 a 
    B2 b 

    data T5 a b

    Constructors

    A3 a

    documents A3 +

    B3 b

    documents B3 +

    data T6

    Testing alternative comment styles +

    Constructors

    A4

    This is the doc for A4 +

    B4

    This is the doc for B4 +

    C4

    This is the doc for C4 +

    newtype N1 a

    A newtype +

    Constructors

    N1 a 

    newtype N2 a b

    A newtype with a fieldname +

    Constructors

    N2 

    Fields

    n :: a b
     

    newtype N3 a b

    A newtype with a fieldname, documentation on the field +

    Constructors

    N3 

    Fields

    n3 :: a b

    this is the n3 field +

    data N4 a b

    An abstract newtype - we show this one as data rather than newtype because + the difference isn't visible to the programmer for an abstract type. +

    newtype N5 a b

    Constructors

    N5 

    Fields

    n5 :: a b

    no docs on the datatype or the constructor +

    newtype N6 a b

    Constructors

    N6

    docs on the constructor only +

    Fields

    n6 :: a b
     

    newtype N7 a b

    docs on the newtype and the constructor +

    Constructors

    N7

    The N7 constructor +

    Fields

    n7 :: a b
     

    Records +

    data R

    This is the documentation for the R record, which has four fields, + p, q, r, and s. +

    Constructors

    C1

    This is the C1 record constructor, with the following fields: +

    Fields

    p :: Int

    This comment applies to the p field +

    q :: forall a. a -> a

    This comment applies to the q field +

    r :: Int

    This comment applies to both r and s +

    s :: Int

    This comment applies to both r and s +

    C2

    This is the C2 record constructor, also with some fields: +

    Fields

    t :: T1 -> T2 Int Int -> T3 Bool Bool -> T4 Float Float -> T5 () ()
     
    u :: Int
     
    v :: Int
     

    data R1

    Testing different record commenting styles +

    Constructors

    C3

    This is the C3 record constructor +

    Fields

    s1 :: Int

    The s1 record selector +

    s2 :: Int

    The s2 record selector +

    s3 :: Int

    The s3 record selector +

    test that we can export record selectors on their own: +

    Class declarations +

    class D a => C a where

    This comment applies to the previous declaration (the C class) +

    Methods

    a :: IO a

    this is a description of the a method +

    b :: [a]

    this is a description of the b method +

    class D a where

    This is a class declaration with no separate docs for the methods +

    Methods

    d :: T a b

    e :: (a, a)

    Instances

    class E a

    This is a class declaration with no methods (or no methods exported) +

    class F a where

    Methods

    ff :: a

    Test that we can export a class method on its own: +

    Function types +

    f :: C a => a -> Int

    In a comment string we can refer to identifiers in scope with +single quotes like this: T, and we can refer to modules by +using double quotes: Foo. We can add emphasis like this. +

    • This is a bulleted list +
    • This is the next item (different kind of bullet) +
    1. This is an ordered list +
    2. This is the next item (different kind of bullet) +
    cat
    a small, furry, domesticated mammal +
    pineapple
    a fruit grown in the tropics +
    +     This is a block of code, which can include other markup: R
    +     formatting
    +               is
    +                 significant
    +
     this is another block of code
    +

    We can also include URLs in documentation: http://www.haskell.org/. +

    g :: Int -> IO CInt

    we can export foreign declarations too +

    Auxiliary stuff +

    This is some documentation that is attached to a name ($aux1) + rather than a source declaration. The documentation may be + referred to in the export list using its name. +

     code block in named doc

    This is some documentation that is attached to a name ($aux2) +

     code block on its own in named doc
     code block on its own in named doc (after newline)

    a nested, named doc comment +

    with a paragraph, +

     and a code block
    test
    +test1
    +
     test2
    +  test3
    +
    +test1
    +test2
    +
    test3
    +test4
    +
    +test1
    +test2
    +
    test3
    +test4
    +
    test3
    +test4
    +
    +test1
    +test2
    +

    aux11: +

    test3
    +test4
    +
    +test1
    +test2
    +
     foo
    +
     bar
    +

    This is some inline documentation in the export list +

     a code block using bird-tracks
    + each line must begin with > (which isn't significant unless it
    + is at the beginning of the line).
    +

    A hidden module +

    hidden :: Int -> Int

    A visible module +

    module Visible

    nested-style doc comments +

    Existential / Universal types +

    data Ex a

    A data-type using existential/universal types +

    Constructors

    forall b . C b => Ex1 b 
    forall b . Ex2 b 
    forall b . C a => Ex3 b 
    Ex4 (forall a. a -> a) 

    Type signatures with argument docs +

    k

    Arguments

    :: T () ()

    This argument has type T +

    -> T2 Int Int

    This argument has type 'T2 Int Int' +

    -> (T3 Bool Bool -> T4 Float Float)

    This argument has type T3 Bool Bool -> T4 Float Float +

    -> T5 () ()

    This argument has a very long description that should + hopefully cause some wrapping to happen when it is finally + rendered by Haddock in the generated HTML page. +

    -> IO ()

    This is the result type +

    This is a function with documentation for each argument +

    l

    Arguments

    :: (Int, Int, Float)

    takes a triple +

    -> Int

    returns an Int +

    m

    Arguments

    :: R 
    -> N1 ()

    one of the arguments +

    -> IO Int

    and the return value +

    This function has some arg docs +

    o

    Arguments

    :: Float

    The input float +

    -> IO Float

    The output float +

    A foreign import with argument docs +

    A section +

    A subsection +

     a literal line
    +

    $ a non literal line $ +

    f' :: Int

    a function with a prime can be referred to as f' + 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 +

    diff --git a/html-test/tests/Ticket112.hs b/html-test/tests/Ticket112.hs new file mode 100644 index 00000000..c9cd5117 --- /dev/null +++ b/html-test/tests/Ticket112.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE MagicHash #-} + +module Ticket112 where + +import GHC.Prim + +-- | ...given a raw 'Addr#' to the string, and the length of the string. +f :: a +f = undefined diff --git a/html-test/tests/Ticket112.html.ref b/html-test/tests/Ticket112.html.ref new file mode 100644 index 00000000..c5c61703 --- /dev/null +++ b/html-test/tests/Ticket112.html.ref @@ -0,0 +1,82 @@ + +Ticket112
    Safe HaskellNone

    Ticket112

    Synopsis

    • f :: a

    Documentation

    f :: a

    ...given a raw Addr# to the string, and the length of the string. +

    diff --git a/html-test/tests/Ticket61.hs b/html-test/tests/Ticket61.hs new file mode 100644 index 00000000..26ca287f --- /dev/null +++ b/html-test/tests/Ticket61.hs @@ -0,0 +1,3 @@ +module Ticket61 (module Ticket61_Hidden) where + +import Ticket61_Hidden diff --git a/html-test/tests/Ticket61.html.ref b/html-test/tests/Ticket61.html.ref new file mode 100644 index 00000000..8c22488b --- /dev/null +++ b/html-test/tests/Ticket61.html.ref @@ -0,0 +1,80 @@ + +Ticket61
    Safe HaskellNone

    Ticket61

    Documentation

    class C a where

    Methods

    f :: a

    A comment about f +

    diff --git a/html-test/tests/Ticket61_Hidden.hs b/html-test/tests/Ticket61_Hidden.hs new file mode 100644 index 00000000..583c10cd --- /dev/null +++ b/html-test/tests/Ticket61_Hidden.hs @@ -0,0 +1,7 @@ +{-# OPTIONS_HADDOCK hide #-} + +module Ticket61_Hidden where + +class C a where + -- | A comment about f + f :: a diff --git a/html-test/tests/Ticket75.hs b/html-test/tests/Ticket75.hs new file mode 100644 index 00000000..94a2f115 --- /dev/null +++ b/html-test/tests/Ticket75.hs @@ -0,0 +1,7 @@ +module Ticket75 where + +data a :- b = Q + +-- | A reference to ':-' +f :: Int +f = undefined diff --git a/html-test/tests/Ticket75.html.ref b/html-test/tests/Ticket75.html.ref new file mode 100644 index 00000000..cd510ea5 --- /dev/null +++ b/html-test/tests/Ticket75.html.ref @@ -0,0 +1,116 @@ + +Ticket75
    Safe HaskellNone

    Ticket75

    Synopsis

    Documentation

    data a :- b

    Constructors

    Q 

    f :: Int

    A reference to :- +

    diff --git a/html-test/tests/TypeFamilies.hs b/html-test/tests/TypeFamilies.hs new file mode 100644 index 00000000..561f95fd --- /dev/null +++ b/html-test/tests/TypeFamilies.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE TypeFamilies #-} + +module TypeFamilies where + +-- | Type family G +type family G a :: * + +-- | A class with an associated type +class A a where + -- | An associated type + data B a :: * -> * + -- | A method + f :: B a Int + +-- | Doc for family +type family F a + + +-- | Doc for G Int +type instance G Int = Bool +type instance G Float = Int + + +instance A Int where + data B Int x = Con x + f = Con 3 + +g = Con 5 diff --git a/html-test/tests/TypeFamilies.html.ref b/html-test/tests/TypeFamilies.html.ref new file mode 100644 index 00000000..196d60ec --- /dev/null +++ b/html-test/tests/TypeFamilies.html.ref @@ -0,0 +1,212 @@ + +TypeFamilies
    Safe HaskellNone

    TypeFamilies

    Synopsis

    Documentation

    type family G a :: *

    Type family G +

    class A a where

    A class with an associated type +

    Associated Types

    data B a :: * -> *

    An associated type +

    Methods

    f :: B a Int

    A method +

    Instances

    A Int 

    type family F a

    Doc for family +

    diff --git a/html-test/tests/TypeOperators.hs b/html-test/tests/TypeOperators.hs new file mode 100644 index 00000000..edbb9344 --- /dev/null +++ b/html-test/tests/TypeOperators.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TypeOperators #-} +module TypeOperators ( + -- * stuff + (:-:), + (:+:), + Op, + O(..), + biO, +) where + +data a :-: b + +data (a :+: b) c + +data a `Op` b + +newtype (g `O` f) a = O { unO :: g (f a) } + +biO :: (g `O` f) a +biO = undefined diff --git a/html-test/tests/TypeOperators.html.ref b/html-test/tests/TypeOperators.html.ref new file mode 100644 index 00000000..2b18727f --- /dev/null +++ b/html-test/tests/TypeOperators.html.ref @@ -0,0 +1,185 @@ + +TypeOperators
    Safe HaskellNone

    TypeOperators

    Contents

    Synopsis

    • data a :-: b
    • data (a :+: b) c
    • data Op a b
    • newtype O g f a = O {}
    • biO :: (g `O` f) a

    stuff +

    data a :-: b

    data (a :+: b) c

    data Op a b

    newtype O g f a

    Constructors

    O 

    Fields

    unO :: g (f a)
     

    biO :: (g `O` f) a

    diff --git a/html-test/tests/Unicode.hs.disabled b/html-test/tests/Unicode.hs.disabled new file mode 100644 index 00000000..d5bbf445 --- /dev/null +++ b/html-test/tests/Unicode.hs.disabled @@ -0,0 +1,6 @@ +module Unicode where + +-- | γλώσσα +x :: Int +x = 1 + diff --git a/html-test/tests/Unicode.html.ref b/html-test/tests/Unicode.html.ref new file mode 100644 index 00000000..13ef6c1e --- /dev/null +++ b/html-test/tests/Unicode.html.ref @@ -0,0 +1,82 @@ + +Unicode
    Safe HaskellNone

    Unicode

    Synopsis

    Documentation

    x :: Int

    γλώσσα +

    diff --git a/html-test/tests/Visible.hs b/html-test/tests/Visible.hs new file mode 100644 index 00000000..cad71931 --- /dev/null +++ b/html-test/tests/Visible.hs @@ -0,0 +1,3 @@ +module Visible where +visible :: Int -> Int +visible a = a diff --git a/html-test/tests/Visible.html.ref b/html-test/tests/Visible.html.ref new file mode 100644 index 00000000..de8b8d80 --- /dev/null +++ b/html-test/tests/Visible.html.ref @@ -0,0 +1,67 @@ + +Visible
    Safe HaskellNone

    Visible

    Documentation

    diff --git a/html-test/tests/frames.html.ref b/html-test/tests/frames.html.ref new file mode 100644 index 00000000..1b4e38d4 --- /dev/null +++ b/html-test/tests/frames.html.ref @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/html-test/tests/mini_A.html.ref b/html-test/tests/mini_A.html.ref new file mode 100644 index 00000000..cbe50e41 --- /dev/null +++ b/html-test/tests/mini_A.html.ref @@ -0,0 +1,59 @@ + +A

    A

    diff --git a/html-test/tests/mini_AdvanceTypes.html.ref b/html-test/tests/mini_AdvanceTypes.html.ref new file mode 100644 index 00000000..59d8dcb1 --- /dev/null +++ b/html-test/tests/mini_AdvanceTypes.html.ref @@ -0,0 +1,33 @@ + +AdvanceTypes

    AdvanceTypes

    data Pattern

    diff --git a/html-test/tests/mini_B.html.ref b/html-test/tests/mini_B.html.ref new file mode 100644 index 00000000..211a7deb --- /dev/null +++ b/html-test/tests/mini_B.html.ref @@ -0,0 +1,45 @@ + +B

    B

    diff --git a/html-test/tests/mini_Bug1.html.ref b/html-test/tests/mini_Bug1.html.ref new file mode 100644 index 00000000..adf81c73 --- /dev/null +++ b/html-test/tests/mini_Bug1.html.ref @@ -0,0 +1,33 @@ + +Bug1

    Bug1

    data T

    diff --git a/html-test/tests/mini_Bug2.html.ref b/html-test/tests/mini_Bug2.html.ref new file mode 100644 index 00000000..b673e459 --- /dev/null +++ b/html-test/tests/mini_Bug2.html.ref @@ -0,0 +1,31 @@ + +Bug2

    Bug2

    diff --git a/html-test/tests/mini_Bug3.html.ref b/html-test/tests/mini_Bug3.html.ref new file mode 100644 index 00000000..af4cc445 --- /dev/null +++ b/html-test/tests/mini_Bug3.html.ref @@ -0,0 +1,31 @@ + +Bug3

    Bug3

    diff --git a/html-test/tests/mini_Bug4.html.ref b/html-test/tests/mini_Bug4.html.ref new file mode 100644 index 00000000..b403e94a --- /dev/null +++ b/html-test/tests/mini_Bug4.html.ref @@ -0,0 +1,31 @@ + +Bug4

    Bug4

    diff --git a/html-test/tests/mini_Bug6.html.ref b/html-test/tests/mini_Bug6.html.ref new file mode 100644 index 00000000..5c5c1119 --- /dev/null +++ b/html-test/tests/mini_Bug6.html.ref @@ -0,0 +1,65 @@ + +Bug6

    Bug6

    data A

    data B

    data C

    data D

    data E

    diff --git a/html-test/tests/mini_Bug7.html.ref b/html-test/tests/mini_Bug7.html.ref new file mode 100644 index 00000000..1bec82ee --- /dev/null +++ b/html-test/tests/mini_Bug7.html.ref @@ -0,0 +1,41 @@ + +Bug7

    Bug7

    data Foo

    class Bar x y

    diff --git a/html-test/tests/mini_Bug8.html.ref b/html-test/tests/mini_Bug8.html.ref new file mode 100644 index 00000000..070dbcf8 --- /dev/null +++ b/html-test/tests/mini_Bug8.html.ref @@ -0,0 +1,63 @@ + +Bug8

    Bug8

    diff --git a/html-test/tests/mini_BugDeprecated.html.ref b/html-test/tests/mini_BugDeprecated.html.ref new file mode 100644 index 00000000..f0410137 --- /dev/null +++ b/html-test/tests/mini_BugDeprecated.html.ref @@ -0,0 +1,61 @@ + +BugDeprecated

    BugDeprecated

    diff --git a/html-test/tests/mini_BugExportHeadings.html.ref b/html-test/tests/mini_BugExportHeadings.html.ref new file mode 100644 index 00000000..b481720d --- /dev/null +++ b/html-test/tests/mini_BugExportHeadings.html.ref @@ -0,0 +1,79 @@ + +BugExportHeadings

    BugExportHeadings

    Foo +

    Bar +

    Baz +

    One +

    Two +

    Three +

    diff --git a/html-test/tests/mini_Bugs.html.ref b/html-test/tests/mini_Bugs.html.ref new file mode 100644 index 00000000..3c758375 --- /dev/null +++ b/html-test/tests/mini_Bugs.html.ref @@ -0,0 +1,33 @@ + +Bugs

    Bugs

    data A a

    diff --git a/html-test/tests/mini_CrossPackageDocs.html.ref b/html-test/tests/mini_CrossPackageDocs.html.ref new file mode 100644 index 00000000..4c0588ba --- /dev/null +++ b/html-test/tests/mini_CrossPackageDocs.html.ref @@ -0,0 +1,45 @@ + +CrossPackageDocs

    CrossPackageDocs

    diff --git a/html-test/tests/mini_DeprecatedClass.html.ref b/html-test/tests/mini_DeprecatedClass.html.ref new file mode 100644 index 00000000..3923c1ff --- /dev/null +++ b/html-test/tests/mini_DeprecatedClass.html.ref @@ -0,0 +1,41 @@ + +DeprecatedClass

    DeprecatedClass

    class SomeClass a

    diff --git a/html-test/tests/mini_DeprecatedData.html.ref b/html-test/tests/mini_DeprecatedData.html.ref new file mode 100644 index 00000000..8ef20113 --- /dev/null +++ b/html-test/tests/mini_DeprecatedData.html.ref @@ -0,0 +1,41 @@ + +DeprecatedData

    DeprecatedData

    data Foo

    data One

    diff --git a/html-test/tests/mini_DeprecatedFunction.html.ref b/html-test/tests/mini_DeprecatedFunction.html.ref new file mode 100644 index 00000000..9bb90dac --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction.html.ref @@ -0,0 +1,37 @@ + +DeprecatedFunction

    DeprecatedFunction

    diff --git a/html-test/tests/mini_DeprecatedFunction2.html.ref b/html-test/tests/mini_DeprecatedFunction2.html.ref new file mode 100644 index 00000000..a03991a9 --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction2.html.ref @@ -0,0 +1,31 @@ + +DeprecatedFunction2

    DeprecatedFunction2

    diff --git a/html-test/tests/mini_DeprecatedFunction3.html.ref b/html-test/tests/mini_DeprecatedFunction3.html.ref new file mode 100644 index 00000000..4ea60339 --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction3.html.ref @@ -0,0 +1,31 @@ + +DeprecatedFunction3

    DeprecatedFunction3

    diff --git a/html-test/tests/mini_DeprecatedModule.html.ref b/html-test/tests/mini_DeprecatedModule.html.ref new file mode 100644 index 00000000..bfdef611 --- /dev/null +++ b/html-test/tests/mini_DeprecatedModule.html.ref @@ -0,0 +1,31 @@ + +DeprecatedModule

    DeprecatedModule

    diff --git a/html-test/tests/mini_DeprecatedModule2.html.ref b/html-test/tests/mini_DeprecatedModule2.html.ref new file mode 100644 index 00000000..dbcc43b9 --- /dev/null +++ b/html-test/tests/mini_DeprecatedModule2.html.ref @@ -0,0 +1,31 @@ + +DeprecatedModule2

    DeprecatedModule2

    diff --git a/html-test/tests/mini_DeprecatedNewtype.html.ref b/html-test/tests/mini_DeprecatedNewtype.html.ref new file mode 100644 index 00000000..a913525f --- /dev/null +++ b/html-test/tests/mini_DeprecatedNewtype.html.ref @@ -0,0 +1,41 @@ + +DeprecatedNewtype

    DeprecatedNewtype

    diff --git a/html-test/tests/mini_DeprecatedReExport.html.ref b/html-test/tests/mini_DeprecatedReExport.html.ref new file mode 100644 index 00000000..8316dda5 --- /dev/null +++ b/html-test/tests/mini_DeprecatedReExport.html.ref @@ -0,0 +1,37 @@ + +DeprecatedReExport

    DeprecatedReExport

    Re-exported from an other module +

    Re-exported from an other package +

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

    DeprecatedRecord

    data Foo

    diff --git a/html-test/tests/mini_DeprecatedTypeFamily.html.ref b/html-test/tests/mini_DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..c87d9637 --- /dev/null +++ b/html-test/tests/mini_DeprecatedTypeFamily.html.ref @@ -0,0 +1,41 @@ + +DeprecatedTypeFamily

    DeprecatedTypeFamily

    data family SomeTypeFamily k :: * -> *

    data family SomeOtherTypeFamily k :: * -> *

    diff --git a/html-test/tests/mini_DeprecatedTypeSynonym.html.ref b/html-test/tests/mini_DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..5ade100d --- /dev/null +++ b/html-test/tests/mini_DeprecatedTypeSynonym.html.ref @@ -0,0 +1,41 @@ + +DeprecatedTypeSynonym

    DeprecatedTypeSynonym

    diff --git a/html-test/tests/mini_DeprecationMessageParseError.html.ref b/html-test/tests/mini_DeprecationMessageParseError.html.ref new file mode 100644 index 00000000..e52f487f --- /dev/null +++ b/html-test/tests/mini_DeprecationMessageParseError.html.ref @@ -0,0 +1,31 @@ + +DeprecationMessageParseError

    DeprecationMessageParseError

    diff --git a/html-test/tests/mini_Examples.html.ref b/html-test/tests/mini_Examples.html.ref new file mode 100644 index 00000000..c99c2c48 --- /dev/null +++ b/html-test/tests/mini_Examples.html.ref @@ -0,0 +1,31 @@ + +Examples

    Examples

    diff --git a/html-test/tests/mini_FunArgs.html.ref b/html-test/tests/mini_FunArgs.html.ref new file mode 100644 index 00000000..89729720 --- /dev/null +++ b/html-test/tests/mini_FunArgs.html.ref @@ -0,0 +1,37 @@ + +FunArgs

    FunArgs

    diff --git a/html-test/tests/mini_GADTRecords.html.ref b/html-test/tests/mini_GADTRecords.html.ref new file mode 100644 index 00000000..a8b838f0 --- /dev/null +++ b/html-test/tests/mini_GADTRecords.html.ref @@ -0,0 +1,33 @@ + +GADTRecords

    GADTRecords

    data H1 a b

    diff --git a/html-test/tests/mini_Hash.html.ref b/html-test/tests/mini_Hash.html.ref new file mode 100644 index 00000000..1e6ad1a9 --- /dev/null +++ b/html-test/tests/mini_Hash.html.ref @@ -0,0 +1,74 @@ + +Hash

    Hash

    The HashTable type +

    data HashTable key val

    Operations on HashTables +

    The Hash class +

    class Hash a

    diff --git a/html-test/tests/mini_HiddenInstances.html.ref b/html-test/tests/mini_HiddenInstances.html.ref new file mode 100644 index 00000000..0f1a2e04 --- /dev/null +++ b/html-test/tests/mini_HiddenInstances.html.ref @@ -0,0 +1,41 @@ + +HiddenInstances

    HiddenInstances

    diff --git a/html-test/tests/mini_HiddenInstancesB.html.ref b/html-test/tests/mini_HiddenInstancesB.html.ref new file mode 100644 index 00000000..3ce4f6a9 --- /dev/null +++ b/html-test/tests/mini_HiddenInstancesB.html.ref @@ -0,0 +1,41 @@ + +HiddenInstancesB

    HiddenInstancesB

    class Foo a

    data Bar

    diff --git a/html-test/tests/mini_Hyperlinks.html.ref b/html-test/tests/mini_Hyperlinks.html.ref new file mode 100644 index 00000000..f0c7d65a --- /dev/null +++ b/html-test/tests/mini_Hyperlinks.html.ref @@ -0,0 +1,31 @@ + +Hyperlinks

    Hyperlinks

    diff --git a/html-test/tests/mini_IgnoreExports.html.ref b/html-test/tests/mini_IgnoreExports.html.ref new file mode 100644 index 00000000..a420e65a --- /dev/null +++ b/html-test/tests/mini_IgnoreExports.html.ref @@ -0,0 +1,37 @@ + +IgnoreExports

    IgnoreExports

    diff --git a/html-test/tests/mini_ModuleWithWarning.html.ref b/html-test/tests/mini_ModuleWithWarning.html.ref new file mode 100644 index 00000000..19315a14 --- /dev/null +++ b/html-test/tests/mini_ModuleWithWarning.html.ref @@ -0,0 +1,31 @@ + +ModuleWithWarning

    ModuleWithWarning

    diff --git a/html-test/tests/mini_NamedDoc.html.ref b/html-test/tests/mini_NamedDoc.html.ref new file mode 100644 index 00000000..066bbc61 --- /dev/null +++ b/html-test/tests/mini_NamedDoc.html.ref @@ -0,0 +1,25 @@ + +NamedDoc

    NamedDoc

    diff --git a/html-test/tests/mini_NoLayout.html.ref b/html-test/tests/mini_NoLayout.html.ref new file mode 100644 index 00000000..19562d70 --- /dev/null +++ b/html-test/tests/mini_NoLayout.html.ref @@ -0,0 +1,31 @@ + +NoLayout

    NoLayout

    diff --git a/html-test/tests/mini_NonGreedy.html.ref b/html-test/tests/mini_NonGreedy.html.ref new file mode 100644 index 00000000..698c368e --- /dev/null +++ b/html-test/tests/mini_NonGreedy.html.ref @@ -0,0 +1,31 @@ + +NonGreedy

    NonGreedy

    diff --git a/html-test/tests/mini_Properties.html.ref b/html-test/tests/mini_Properties.html.ref new file mode 100644 index 00000000..5f538dfd --- /dev/null +++ b/html-test/tests/mini_Properties.html.ref @@ -0,0 +1,31 @@ + +Properties

    Properties

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

    PruneWithWarning

    diff --git a/html-test/tests/mini_QuasiExpr.html.ref b/html-test/tests/mini_QuasiExpr.html.ref new file mode 100644 index 00000000..7dd9b829 --- /dev/null +++ b/html-test/tests/mini_QuasiExpr.html.ref @@ -0,0 +1,59 @@ + +QuasiExpr

    QuasiExpr

    diff --git a/html-test/tests/mini_QuasiQuote.html.ref b/html-test/tests/mini_QuasiQuote.html.ref new file mode 100644 index 00000000..5dac6acc --- /dev/null +++ b/html-test/tests/mini_QuasiQuote.html.ref @@ -0,0 +1,31 @@ + +QuasiQuote

    QuasiQuote

    diff --git a/html-test/tests/mini_TH.html.ref b/html-test/tests/mini_TH.html.ref new file mode 100644 index 00000000..d2ddbabc --- /dev/null +++ b/html-test/tests/mini_TH.html.ref @@ -0,0 +1,31 @@ + +TH

    TH

    diff --git a/html-test/tests/mini_TH2.html.ref b/html-test/tests/mini_TH2.html.ref new file mode 100644 index 00000000..2c9f1340 --- /dev/null +++ b/html-test/tests/mini_TH2.html.ref @@ -0,0 +1,31 @@ + +TH2

    TH2

    diff --git a/html-test/tests/mini_Test.html.ref b/html-test/tests/mini_Test.html.ref new file mode 100644 index 00000000..26db2c0f --- /dev/null +++ b/html-test/tests/mini_Test.html.ref @@ -0,0 +1,269 @@ + +Test

    Test

    Type declarations +

    Data types +

    data T a b

    data T2 a b

    data T3 a b

    data T4 a b

    data T5 a b

    data T6

    data N1 a

    data N2 a b

    data N3 a b

    data N4 a b

    data N5 a b

    data N6 a b

    data N7 a b

    Records +

    data R

    data R1

    Class declarations +

    class C a

    class D a

    class E a

    class F a

    Function types +

    Auxiliary stuff +

    A hidden module +

    A visible module +

    Existential / Universal types +

    data Ex a

    Type signatures with argument docs +

    A section +

    A subsection +

    diff --git a/html-test/tests/mini_Ticket112.html.ref b/html-test/tests/mini_Ticket112.html.ref new file mode 100644 index 00000000..68a0a5e5 --- /dev/null +++ b/html-test/tests/mini_Ticket112.html.ref @@ -0,0 +1,31 @@ + +Ticket112

    Ticket112

    diff --git a/html-test/tests/mini_Ticket61.html.ref b/html-test/tests/mini_Ticket61.html.ref new file mode 100644 index 00000000..a73fefca --- /dev/null +++ b/html-test/tests/mini_Ticket61.html.ref @@ -0,0 +1,33 @@ + +Ticket61

    Ticket61

    class C a

    diff --git a/html-test/tests/mini_Ticket75.html.ref b/html-test/tests/mini_Ticket75.html.ref new file mode 100644 index 00000000..75ce882c --- /dev/null +++ b/html-test/tests/mini_Ticket75.html.ref @@ -0,0 +1,39 @@ + +Ticket75

    Ticket75

    data a :- b

    diff --git a/html-test/tests/mini_TypeFamilies.html.ref b/html-test/tests/mini_TypeFamilies.html.ref new file mode 100644 index 00000000..0cf39c88 --- /dev/null +++ b/html-test/tests/mini_TypeFamilies.html.ref @@ -0,0 +1,55 @@ + +TypeFamilies

    TypeFamilies

    type family G a :: *

    class A a

    type family F a

    diff --git a/html-test/tests/mini_TypeOperators.html.ref b/html-test/tests/mini_TypeOperators.html.ref new file mode 100644 index 00000000..86b6beec --- /dev/null +++ b/html-test/tests/mini_TypeOperators.html.ref @@ -0,0 +1,66 @@ + +TypeOperators

    TypeOperators

    stuff +

    data a :-: b

    data (a :+: b) c

    data Op a b

    data O g f a

    diff --git a/html-test/tests/mini_Unicode.html.ref b/html-test/tests/mini_Unicode.html.ref new file mode 100644 index 00000000..55336980 --- /dev/null +++ b/html-test/tests/mini_Unicode.html.ref @@ -0,0 +1,31 @@ + +Unicode

    Unicode

    diff --git a/html-test/tests/mini_Visible.html.ref b/html-test/tests/mini_Visible.html.ref new file mode 100644 index 00000000..976a30c5 --- /dev/null +++ b/html-test/tests/mini_Visible.html.ref @@ -0,0 +1,31 @@ + +Visible

    Visible

    diff --git a/tests/html-tests/README b/tests/html-tests/README deleted file mode 100644 index 9afb10e7..00000000 --- a/tests/html-tests/README +++ /dev/null @@ -1,24 +0,0 @@ -This is a testsuite for Haddock that uses the concept of "golden files". That -is, it compares output files against a set of reference files. - -To add a new test: - - 1) Create a module in the "tests" directory. - - 2) Run "cabal test". You should now have output/.html. The test - passes since there is no reference file to compare with. - - 3) To make a reference file from the output file, do - runhaskell accept.hs - -Tips and tricks: - -To "accept" all output files (copy them to reference files), run - runhaskell accept.hs - -You can run all tests despite failing tests, like so - cabal test --test-option=all - -You can pass extra options to haddock like so - cabal test --test-options='all --title="All Tests"' - diff --git a/tests/html-tests/accept.hs b/tests/html-tests/accept.hs deleted file mode 100644 index 45b32078..00000000 --- a/tests/html-tests/accept.hs +++ /dev/null @@ -1,43 +0,0 @@ -import System.Cmd -import System.Environment -import System.FilePath -import System.Exit -import System.Directory -import Data.List -import Control.Monad -import Control.Applicative - - -main = do - args <- getArgs - dir <- getCurrentDirectory - contents <- filter (`notElem` ignore) <$> 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 ] - where - ignore = [ - "doc-index.html" - , "index-frames.html" - , "index.html" - ] - - -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 diff --git a/tests/html-tests/runtests.hs b/tests/html-tests/runtests.hs deleted file mode 100644 index 759f7495..00000000 --- a/tests/html-tests/runtests.hs +++ /dev/null @@ -1,152 +0,0 @@ -import Prelude hiding (mod) -import Control.Monad -import Control.Applicative -import Data.List -import Data.Maybe -import Distribution.InstalledPackageInfo -import Distribution.Package (PackageName (..)) -import Distribution.Simple.Compiler -import Distribution.Simple.GHC -import Distribution.Simple.PackageIndex -import Distribution.Simple.Program -import Distribution.Simple.Utils -import Distribution.Verbosity -import System.IO -import System.Cmd -import System.Directory -import System.Environment -import System.Exit -import System.FilePath -import System.Process (ProcessHandle, runProcess, waitForProcess) - - -packageRoot, dataDir, haddockPath, testSuiteRoot, testDir, outDir :: FilePath -packageRoot = "." -dataDir = packageRoot "resources" -haddockPath = packageRoot "dist" "build" "haddock" "haddock" -testSuiteRoot = packageRoot "tests" "html-tests" -testDir = testSuiteRoot "tests" -outDir = testSuiteRoot "output" - - -main :: IO () -main = do - test - putStrLn "All tests passed!" - - -test :: IO () -test = do - x <- doesFileExist haddockPath - unless x $ die "you need to run 'cabal build' successfully first" - - contents <- getDirectoryContents testDir - args <- getArgs - let (opts, spec) = span ("-" `isPrefixOf`) args - let mods = - case spec of - y:_ | y /= "all" -> [y ++ ".hs"] - _ -> filter ((==) ".hs" . takeExtension) contents - - let mods' = map (testDir ) mods - - -- add haddock_datadir to environment for subprocesses - env <- Just . (:) ("haddock_datadir", dataDir) <$> getEnvironment - - putStrLn "" - putStrLn "Haddock version: " - h1 <- runProcess haddockPath ["--version"] Nothing - env Nothing Nothing Nothing - wait h1 "*** Running `haddock --version' failed!" - putStrLn "" - putStrLn "GHC version: " - h2 <- runProcess haddockPath ["--ghc-version"] Nothing - env Nothing Nothing Nothing - wait h2 "*** Running `haddock --ghc-version' failed!" - putStrLn "" - - -- TODO: maybe do something more clever here using haddock.cabal - ghcPath <- fmap init $ rawSystemStdout normal haddockPath ["--print-ghc-path"] - (_, conf) <- configure normal (Just ghcPath) Nothing defaultProgramConfiguration - pkgIndex <- getInstalledPackages normal [GlobalPackageDB] conf - let mkDep pkgName = - fromMaybe (error "Couldn't find test dependencies") $ do - let pkgs = lookupPackageName pkgIndex (PackageName pkgName) - (_, pkgs') <- listToMaybe pkgs - pkg <- listToMaybe pkgs' - ifacePath <- listToMaybe (haddockInterfaces pkg) - htmlPath <- listToMaybe (haddockHTMLs pkg) - return ("-i " ++ htmlPath ++ "," ++ ifacePath) - - let base = mkDep "base" - process = mkDep "process" - ghcprim = mkDep "ghc-prim" - - putStrLn "Running tests..." - handle <- runProcess haddockPath - (["-w", "-o", outDir, "-h", "--pretty-html", "--optghc=-fglasgow-exts" - , "--optghc=-w", base, process, ghcprim] ++ opts ++ mods') - Nothing env Nothing - Nothing Nothing - - wait handle "*** Haddock run failed! Exiting." - check mods (if not (null args) && args !! 0 == "all" then False else True) - where - wait :: ProcessHandle -> String -> IO () - wait h msg = do - r <- waitForProcess h - unless (r == ExitSuccess) $ do - hPutStrLn stderr msg - exitFailure - -check :: [FilePath] -> Bool -> IO () -check modules strict = do - forM_ modules $ \mod -> do - let outfile = outDir dropExtension mod ++ ".html" - let reffile = testDir dropExtension mod ++ ".html.ref" - b <- doesFileExist reffile - if b - then do - copyFile reffile (outDir takeFileName reffile) - out <- readFile outfile - ref <- readFile reffile - if not $ haddockEq out ref - then do - putStrLn $ "Output for " ++ mod ++ " has changed! Exiting with diff:" - let ref' = stripLinks ref - out' = stripLinks out - let reffile' = outDir takeFileName reffile ++ ".nolinks" - outfile' = outDir takeFileName outfile ++ ".nolinks" - writeFile reffile' ref' - writeFile outfile' out' - r <- programOnPath "colordiff" - code <- if r - then system $ "colordiff " ++ reffile' ++ " " ++ outfile' - else system $ "diff " ++ reffile' ++ " " ++ outfile' - if strict then exitFailure else return () - unless (code == ExitSuccess) $ do - hPutStrLn stderr "*** Running diff failed!" - exitFailure - else do - putStrLn $ "Pass: " ++ mod - else do - putStrLn $ "Pass: " ++ mod ++ " (no .ref file)" - - -haddockEq :: String -> String -> Bool -haddockEq file1 file2 = stripLinks file1 == stripLinks file2 - -stripLinks :: String -> String -stripLinks str = - let prefix = " prefix ++ stripLinks (dropWhile (/= '"') str') - Nothing -> - case str of - [] -> [] - x : xs -> x : stripLinks xs - -programOnPath :: FilePath -> IO Bool -programOnPath p = do - result <- findProgramLocation silent p - return (isJust result) diff --git a/tests/html-tests/tests/A.hs b/tests/html-tests/tests/A.hs deleted file mode 100644 index 606b0865..00000000 --- a/tests/html-tests/tests/A.hs +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 328fec02..00000000 --- a/tests/html-tests/tests/A.html.ref +++ /dev/null @@ -1,183 +0,0 @@ - -A
    Safe HaskellNone

    A

    Synopsis

    Documentation

    data A

    Constructors

    A 

    test2 :: 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 -

    diff --git a/tests/html-tests/tests/AdvanceTypes.hs b/tests/html-tests/tests/AdvanceTypes.hs deleted file mode 100644 index 939fdf07..00000000 --- a/tests/html-tests/tests/AdvanceTypes.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE TypeOperators #-} -module AdvanceTypes where - -data Pattern :: [*] -> * where - Nil :: Pattern '[] - Cons :: Maybe h -> Pattern t -> Pattern (h ': t) diff --git a/tests/html-tests/tests/AdvanceTypes.html.ref b/tests/html-tests/tests/AdvanceTypes.html.ref deleted file mode 100644 index bac545be..00000000 --- a/tests/html-tests/tests/AdvanceTypes.html.ref +++ /dev/null @@ -1,97 +0,0 @@ - -AdvanceTypes
    Safe HaskellNone

    AdvanceTypes

    Documentation

    data Pattern where

    Constructors

    Nil :: Pattern `[]` 
    Cons :: Maybe h -> Pattern t -> Pattern (h : t) 
    diff --git a/tests/html-tests/tests/B.hs b/tests/html-tests/tests/B.hs deleted file mode 100644 index 5fd69acd..00000000 --- a/tests/html-tests/tests/B.hs +++ /dev/null @@ -1,8 +0,0 @@ -module B ( module A, test, reExport, X(..) ) where -import A ( A(..), test2, reExport, X(..) ) - --- | This link shouldn't work: 'other'. --- These links should work: 'A.other', 'Data.List.sortBy', 'test2', 'A.test2', 'Data.Maybe.fromMaybe'. --- Module link: "Prelude". -test :: Int -test = 1 diff --git a/tests/html-tests/tests/B.html.ref b/tests/html-tests/tests/B.html.ref deleted file mode 100644 index 410bc75b..00000000 --- a/tests/html-tests/tests/B.html.ref +++ /dev/null @@ -1,175 +0,0 @@ - -B
    Safe HaskellNone

    B

    Synopsis

    Documentation

    module A

    test :: Int

    This link shouldn't work: other. - These links should work: other, sortBy, test2, test2, fromMaybe. - Module link: Prelude. -

    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 -

    diff --git a/tests/html-tests/tests/Bug1.hs b/tests/html-tests/tests/Bug1.hs deleted file mode 100644 index af1ed4d3..00000000 --- a/tests/html-tests/tests/Bug1.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Bug1 where - --- | We should have different anchors for constructors and types\/classes. This --- hyperlink should point to the type constructor by default: 'T'. -data T = T - diff --git a/tests/html-tests/tests/Bug1.html.ref b/tests/html-tests/tests/Bug1.html.ref deleted file mode 100644 index f8a86948..00000000 --- a/tests/html-tests/tests/Bug1.html.ref +++ /dev/null @@ -1,103 +0,0 @@ - -Bug1
    Safe HaskellNone

    Bug1

    Synopsis

    • data T = T

    Documentation

    data T

    We should have different anchors for constructors and types/classes. This - hyperlink should point to the type constructor by default: T. -

    Constructors

    T 
    diff --git a/tests/html-tests/tests/Bug2.hs b/tests/html-tests/tests/Bug2.hs deleted file mode 100644 index 9121922e..00000000 --- a/tests/html-tests/tests/Bug2.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Bug2 ( x ) where -import B -x :: A -x = A diff --git a/tests/html-tests/tests/Bug2.html.ref b/tests/html-tests/tests/Bug2.html.ref deleted file mode 100644 index 813035a6..00000000 --- a/tests/html-tests/tests/Bug2.html.ref +++ /dev/null @@ -1,65 +0,0 @@ - -Bug2
    Safe HaskellNone

    Bug2

    Documentation

    x :: A

    diff --git a/tests/html-tests/tests/Bug3.hs b/tests/html-tests/tests/Bug3.hs deleted file mode 100644 index 67e57892..00000000 --- a/tests/html-tests/tests/Bug3.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Bug3 where - --- | /multi-line --- emphasis/ -foo :: Int -foo = undefined diff --git a/tests/html-tests/tests/Bug3.html.ref b/tests/html-tests/tests/Bug3.html.ref deleted file mode 100644 index 76d4e730..00000000 --- a/tests/html-tests/tests/Bug3.html.ref +++ /dev/null @@ -1,83 +0,0 @@ - -Bug3
    Safe HaskellNone

    Bug3

    Synopsis

    Documentation

    foo :: Int

    /multi-line - emphasis/ -

    diff --git a/tests/html-tests/tests/Bug4.hs b/tests/html-tests/tests/Bug4.hs deleted file mode 100644 index 425a77aa..00000000 --- a/tests/html-tests/tests/Bug4.hs +++ /dev/null @@ -1,5 +0,0 @@ -module Bug4 where --- | don't use apostrophe's in the wrong place's -foo :: Int -foo = undefined - diff --git a/tests/html-tests/tests/Bug4.html.ref b/tests/html-tests/tests/Bug4.html.ref deleted file mode 100644 index 9e852978..00000000 --- a/tests/html-tests/tests/Bug4.html.ref +++ /dev/null @@ -1,82 +0,0 @@ - -Bug4
    Safe HaskellNone

    Bug4

    Synopsis

    Documentation

    foo :: Int

    don't use apostrophe's in the wrong place's -

    diff --git a/tests/html-tests/tests/Bug6.hs b/tests/html-tests/tests/Bug6.hs deleted file mode 100644 index 17411f31..00000000 --- a/tests/html-tests/tests/Bug6.hs +++ /dev/null @@ -1,23 +0,0 @@ --- | Exporting records. -module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where - --- | --- This record is exported without its field -data A = A { a :: Int } - --- | --- .. with its field, but the field is named separately in the export list --- (the field isn't documented separately since it is already documented here) -data B = B { b :: Int } - --- | --- .. with fields names as subordinate names in the export -data C = C { c1 :: Int, c2 :: Int } - --- | --- .. with only some of the fields exported (we can't handle this one - --- how do we render the declaration?) -data D = D { d1 :: Int, d2 :: Int } - --- | a newtype with a field -newtype E = E { e :: Int } diff --git a/tests/html-tests/tests/Bug6.html.ref b/tests/html-tests/tests/Bug6.html.ref deleted file mode 100644 index 606e45e3..00000000 --- a/tests/html-tests/tests/Bug6.html.ref +++ /dev/null @@ -1,335 +0,0 @@ - -Bug6
    Safe HaskellNone

    Bug6

    Description

    Exporting records. -

    Synopsis

    Documentation

    data A

    This record is exported without its field -

    Constructors

    A Int 

    data B

    .. with its field, but the field is named separately in the export list - (the field isn't documented separately since it is already documented here) -

    Constructors

    B 

    Fields

    b :: Int
     

    data C

    .. with fields names as subordinate names in the export -

    Constructors

    C 

    Fields

    c1 :: Int
     
    c2 :: Int
     

    data D

    .. with only some of the fields exported (we can't handle this one - - how do we render the declaration?) -

    Constructors

    D Int Int 

    newtype E

    a newtype with a field -

    Constructors

    E Int 
    diff --git a/tests/html-tests/tests/Bug7.hs b/tests/html-tests/tests/Bug7.hs deleted file mode 100644 index 8cf57914..00000000 --- a/tests/html-tests/tests/Bug7.hs +++ /dev/null @@ -1,12 +0,0 @@ --- | This module caused a duplicate instance in the documentation for the Foo --- type. -module Bug7 where - --- | The Foo datatype -data Foo = Foo - --- | The Bar class -class Bar x y - --- | Just one instance -instance Bar Foo Foo diff --git a/tests/html-tests/tests/Bug7.html.ref b/tests/html-tests/tests/Bug7.html.ref deleted file mode 100644 index 8ac72b16..00000000 --- a/tests/html-tests/tests/Bug7.html.ref +++ /dev/null @@ -1,173 +0,0 @@ - -Bug7
    Safe HaskellNone

    Bug7

    Description

    This module caused a duplicate instance in the documentation for the Foo - type. -

    Synopsis

    Documentation

    data Foo

    The Foo datatype -

    Constructors

    Foo 

    Instances

    Bar Foo Foo

    Just one instance -

    class Bar x y

    The Bar class -

    Instances

    Bar Foo Foo

    Just one instance -

    diff --git a/tests/html-tests/tests/Bug8.hs b/tests/html-tests/tests/Bug8.hs deleted file mode 100644 index 18df63c8..00000000 --- a/tests/html-tests/tests/Bug8.hs +++ /dev/null @@ -1,14 +0,0 @@ -module Bug8 where - -infix --> -infix ---> - -data Typ = Type (String,[Typ]) - | TFree (String, [String]) - -x --> y = Type("fun",[s,t]) -(--->) = flip $ foldr (-->) - -s = undefined -t = undefined -main = undefined diff --git a/tests/html-tests/tests/Bug8.html.ref b/tests/html-tests/tests/Bug8.html.ref deleted file mode 100644 index 469151f1..00000000 --- a/tests/html-tests/tests/Bug8.html.ref +++ /dev/null @@ -1,131 +0,0 @@ - -Bug8
    Safe HaskellNone

    Bug8

    Documentation

    data Typ

    Constructors

    Type (String, [Typ]) 
    TFree (String, [String]) 

    (-->) :: t -> t1 -> Typ

    (--->) :: [a] -> Typ -> Typ

    s :: a

    t :: a

    main :: a

    diff --git a/tests/html-tests/tests/BugDeprecated.hs b/tests/html-tests/tests/BugDeprecated.hs deleted file mode 100644 index 0f7ac2eb..00000000 --- a/tests/html-tests/tests/BugDeprecated.hs +++ /dev/null @@ -1,18 +0,0 @@ -module BugDeprecated where - -foo, bar, baz :: Int -foo = 23 -bar = 23 -baz = 23 -{-# DEPRECATED foo "for foo" #-} -{-# DEPRECATED bar "for bar" #-} -{-# DEPRECATED baz "for baz" #-} - --- | some documentation for one, two and three -one, two, three :: Int -one = 23 -two = 23 -three = 23 -{-# DEPRECATED one "for one" #-} -{-# DEPRECATED two "for two" #-} -{-# DEPRECATED three "for three" #-} diff --git a/tests/html-tests/tests/BugDeprecated.html.ref b/tests/html-tests/tests/BugDeprecated.html.ref deleted file mode 100644 index 913b189d..00000000 --- a/tests/html-tests/tests/BugDeprecated.html.ref +++ /dev/null @@ -1,198 +0,0 @@ - -BugDeprecated
    Safe HaskellNone

    BugDeprecated

    Synopsis

    Documentation

    foo :: Int

    Deprecated: for foo -

    baz :: Int

    Deprecated: for baz -

    bar :: Int

    Deprecated: for bar -

    one :: Int

    Deprecated: for one -

    some documentation for one, two and three -

    three :: Int

    Deprecated: for three -

    some documentation for one, two and three -

    two :: Int

    Deprecated: for two -

    some documentation for one, two and three -

    diff --git a/tests/html-tests/tests/BugExportHeadings.hs b/tests/html-tests/tests/BugExportHeadings.hs deleted file mode 100644 index a5493a08..00000000 --- a/tests/html-tests/tests/BugExportHeadings.hs +++ /dev/null @@ -1,29 +0,0 @@ --- test for #192 -module BugExportHeadings ( --- * Foo - foo --- * Bar -, bar --- * Baz -, baz - --- * One -, one --- * Two -, two --- * Three -, three -) where - -foo, bar, baz :: Int -foo = 23 -bar = 23 -baz = 23 - -one, two, three :: Int -one = 23 -two = 23 -three = 23 -{-# DEPRECATED one "for one" #-} -{-# DEPRECATED two "for two" #-} -{-# DEPRECATED three "for three" #-} diff --git a/tests/html-tests/tests/BugExportHeadings.html.ref b/tests/html-tests/tests/BugExportHeadings.html.ref deleted file mode 100644 index 457e2c50..00000000 --- a/tests/html-tests/tests/BugExportHeadings.html.ref +++ /dev/null @@ -1,220 +0,0 @@ - -BugExportHeadings
    Safe HaskellNone

    BugExportHeadings

    Synopsis

    Foo -

    foo :: Int

    Bar -

    bar :: Int

    Baz -

    baz :: Int

    One -

    one :: Int

    Deprecated: for one -

    Two -

    two :: Int

    Deprecated: for two -

    Three -

    three :: Int

    Deprecated: for three -

    diff --git a/tests/html-tests/tests/Bugs.hs b/tests/html-tests/tests/Bugs.hs deleted file mode 100644 index 8e1f0079..00000000 --- a/tests/html-tests/tests/Bugs.hs +++ /dev/null @@ -1,3 +0,0 @@ -module Bugs where - -data A a = A a (a -> Int) diff --git a/tests/html-tests/tests/Bugs.html.ref b/tests/html-tests/tests/Bugs.html.ref deleted file mode 100644 index c5a4ca9d..00000000 --- a/tests/html-tests/tests/Bugs.html.ref +++ /dev/null @@ -1,81 +0,0 @@ - -Bugs
    Safe HaskellNone

    Bugs

    Documentation

    data A a

    Constructors

    A a (a -> Int) 
    diff --git a/tests/html-tests/tests/CrossPackageDocs.hs b/tests/html-tests/tests/CrossPackageDocs.hs deleted file mode 100644 index 4d529f79..00000000 --- a/tests/html-tests/tests/CrossPackageDocs.hs +++ /dev/null @@ -1,4 +0,0 @@ -module CrossPackageDocs (map, IsString(..), runInteractiveProcess) where - -import System.Process -import Data.String diff --git a/tests/html-tests/tests/CrossPackageDocs.html.ref b/tests/html-tests/tests/CrossPackageDocs.html.ref deleted file mode 100644 index fea3d0cc..00000000 --- a/tests/html-tests/tests/CrossPackageDocs.html.ref +++ /dev/null @@ -1,298 +0,0 @@ - -CrossPackageDocs
    Safe HaskellNone

    CrossPackageDocs

    Synopsis

    Documentation

    map :: (a -> b) -> [a] -> [b]

    map f xs is the list obtained by applying f to each element - of xs, i.e., -

     map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
    - map f [x1, x2, ...] == [f x1, f x2, ...]
    -

    class IsString a where

    Class for string-like datastructures; used by the overloaded string - extension (-foverloaded-strings in GHC). -

    Methods

    fromString :: String -> a

    Instances

    runInteractiveProcess

    Arguments

    :: FilePath

    Filename of the executable (see proc for details) -

    -> [String]

    Arguments to pass to the executable -

    -> Maybe FilePath

    Optional path to the working directory -

    -> Maybe [(String, String)]

    Optional environment (otherwise inherit) -

    -> IO (Handle, Handle, Handle, ProcessHandle) 

    Runs a raw command, and returns Handles that may be used to communicate - with the process via its stdin, stdout and stderr respectively. -

    For example, to start a process and feed a string to its stdin: -

       (inp,out,err,pid) <- runInteractiveProcess "..."
    -   forkIO (hPutStr inp str)
    -

    The Handles are initially in binary mode; if you need them to be - in text mode then use hSetBinaryMode. -

    diff --git a/tests/html-tests/tests/DeprecatedClass.hs b/tests/html-tests/tests/DeprecatedClass.hs deleted file mode 100644 index 018904ab..00000000 --- a/tests/html-tests/tests/DeprecatedClass.hs +++ /dev/null @@ -1,15 +0,0 @@ -module DeprecatedClass where - --- | some class -class SomeClass a where - -- | documentation for foo - foo :: a -> a - -{-# DEPRECATED SomeClass "SomeClass" #-} -{-# DEPRECATED foo "foo" #-} - -class SomeOtherClass a where - bar :: a -> a - -{-# DEPRECATED SomeOtherClass "SomeOtherClass" #-} -{-# DEPRECATED bar "bar" #-} diff --git a/tests/html-tests/tests/DeprecatedClass.html.ref b/tests/html-tests/tests/DeprecatedClass.html.ref deleted file mode 100644 index d716c1d8..00000000 --- a/tests/html-tests/tests/DeprecatedClass.html.ref +++ /dev/null @@ -1,161 +0,0 @@ - -DeprecatedClass
    Safe HaskellNone

    DeprecatedClass

    Synopsis

    Documentation

    class SomeClass a where

    Deprecated: SomeClass -

    some class -

    Methods

    foo :: a -> a

    Deprecated: foo -

    documentation for foo -

    class SomeOtherClass a where

    Deprecated: SomeOtherClass -

    Methods

    bar :: a -> a

    Deprecated: bar -

    diff --git a/tests/html-tests/tests/DeprecatedData.hs b/tests/html-tests/tests/DeprecatedData.hs deleted file mode 100644 index c40ba122..00000000 --- a/tests/html-tests/tests/DeprecatedData.hs +++ /dev/null @@ -1,15 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module DeprecatedData where - --- | type Foo -data Foo = Foo -- ^ constructor Foo - | Bar -- ^ constructor Bar - -{-# DEPRECATED Foo "Foo" #-} -{-# DEPRECATED Bar "Bar" #-} - -data One = One - | Two - -{-# DEPRECATED One "One" #-} -{-# DEPRECATED Two "Two" #-} diff --git a/tests/html-tests/tests/DeprecatedData.html.ref b/tests/html-tests/tests/DeprecatedData.html.ref deleted file mode 100644 index 24758345..00000000 --- a/tests/html-tests/tests/DeprecatedData.html.ref +++ /dev/null @@ -1,198 +0,0 @@ - -DeprecatedData
    Safe HaskellNone

    DeprecatedData

    Synopsis

    Documentation

    data Foo

    Deprecated: Foo -

    type Foo -

    Constructors

    Foo

    Deprecated: Foo -

    constructor Foo -

    Bar

    Deprecated: Bar -

    constructor Bar -

    data One

    Deprecated: One -

    Constructors

    One

    Deprecated: One -

    Two

    Deprecated: Two -

    diff --git a/tests/html-tests/tests/DeprecatedFunction.hs b/tests/html-tests/tests/DeprecatedFunction.hs deleted file mode 100644 index 8d626435..00000000 --- a/tests/html-tests/tests/DeprecatedFunction.hs +++ /dev/null @@ -1,10 +0,0 @@ -module DeprecatedFunction where - --- | some documentation for foo -foo :: Int -foo = 23 -{-# DEPRECATED foo "use `bar` instead" #-} - --- | some documentation for bar -bar :: Int -bar = 42 diff --git a/tests/html-tests/tests/DeprecatedFunction.html.ref b/tests/html-tests/tests/DeprecatedFunction.html.ref deleted file mode 100644 index 1fc678bb..00000000 --- a/tests/html-tests/tests/DeprecatedFunction.html.ref +++ /dev/null @@ -1,110 +0,0 @@ - -DeprecatedFunction
    Safe HaskellNone

    DeprecatedFunction

    Synopsis

    Documentation

    foo :: Int

    Deprecated: use bar instead -

    some documentation for foo -

    bar :: Int

    some documentation for bar -

    diff --git a/tests/html-tests/tests/DeprecatedFunction2.hs b/tests/html-tests/tests/DeprecatedFunction2.hs deleted file mode 100644 index bdbbf95c..00000000 --- a/tests/html-tests/tests/DeprecatedFunction2.hs +++ /dev/null @@ -1,6 +0,0 @@ -module DeprecatedFunction2 where - - -foo :: Int -foo = 23 -{-# DEPRECATED foo "use bar instead" #-} diff --git a/tests/html-tests/tests/DeprecatedFunction2.html.ref b/tests/html-tests/tests/DeprecatedFunction2.html.ref deleted file mode 100644 index b5068c8e..00000000 --- a/tests/html-tests/tests/DeprecatedFunction2.html.ref +++ /dev/null @@ -1,84 +0,0 @@ - -DeprecatedFunction2
    Safe HaskellNone

    DeprecatedFunction2

    Synopsis

    Documentation

    foo :: Int

    Deprecated: use bar instead -

    diff --git a/tests/html-tests/tests/DeprecatedFunction3.hs b/tests/html-tests/tests/DeprecatedFunction3.hs deleted file mode 100644 index ca719bda..00000000 --- a/tests/html-tests/tests/DeprecatedFunction3.hs +++ /dev/null @@ -1,6 +0,0 @@ -module DeprecatedFunction3 where - - - -foo = 23 -{-# DEPRECATED foo "use bar instead" #-} diff --git a/tests/html-tests/tests/DeprecatedFunction3.html.ref b/tests/html-tests/tests/DeprecatedFunction3.html.ref deleted file mode 100644 index f24eb666..00000000 --- a/tests/html-tests/tests/DeprecatedFunction3.html.ref +++ /dev/null @@ -1,84 +0,0 @@ - -DeprecatedFunction3
    Safe HaskellNone

    DeprecatedFunction3

    Synopsis

    Documentation

    foo :: Integer

    Deprecated: use bar instead -

    diff --git a/tests/html-tests/tests/DeprecatedModule.hs b/tests/html-tests/tests/DeprecatedModule.hs deleted file mode 100644 index 369dba4f..00000000 --- a/tests/html-tests/tests/DeprecatedModule.hs +++ /dev/null @@ -1,5 +0,0 @@ --- | Documentation for "DeprecatedModule". -module DeprecatedModule {-# DEPRECATED "Use \"Foo\" instead" #-} where - -foo :: Int -foo = 23 diff --git a/tests/html-tests/tests/DeprecatedModule.html.ref b/tests/html-tests/tests/DeprecatedModule.html.ref deleted file mode 100644 index 0ca4fafe..00000000 --- a/tests/html-tests/tests/DeprecatedModule.html.ref +++ /dev/null @@ -1,83 +0,0 @@ - -DeprecatedModule
    Safe HaskellNone

    DeprecatedModule

    Description

    Deprecated: Use Foo instead -

    Documentation for DeprecatedModule. -

    Documentation

    foo :: Int

    diff --git a/tests/html-tests/tests/DeprecatedModule2.hs b/tests/html-tests/tests/DeprecatedModule2.hs deleted file mode 100644 index 94185297..00000000 --- a/tests/html-tests/tests/DeprecatedModule2.hs +++ /dev/null @@ -1,4 +0,0 @@ -module DeprecatedModule2 {-# DEPRECATED "Use Foo instead" #-} where - -foo :: Int -foo = 23 diff --git a/tests/html-tests/tests/DeprecatedModule2.html.ref b/tests/html-tests/tests/DeprecatedModule2.html.ref deleted file mode 100644 index 0a313ae9..00000000 --- a/tests/html-tests/tests/DeprecatedModule2.html.ref +++ /dev/null @@ -1,76 +0,0 @@ - -DeprecatedModule2
    Safe HaskellNone

    DeprecatedModule2

    Description

    Deprecated: Use Foo instead -

    Documentation

    foo :: Int

    diff --git a/tests/html-tests/tests/DeprecatedNewtype.hs b/tests/html-tests/tests/DeprecatedNewtype.hs deleted file mode 100644 index 254f1f55..00000000 --- a/tests/html-tests/tests/DeprecatedNewtype.hs +++ /dev/null @@ -1,10 +0,0 @@ -module DeprecatedNewtype where - --- | some documentation -newtype SomeNewType = SomeNewTypeConst String {- ^ constructor docu -} -{-# DEPRECATED SomeNewType "SomeNewType" #-} -{-# DEPRECATED SomeNewTypeConst "SomeNewTypeConst" #-} - -newtype SomeOtherNewType = SomeOtherNewTypeConst String -{-# DEPRECATED SomeOtherNewType "SomeOtherNewType" #-} -{-# DEPRECATED SomeOtherNewTypeConst "SomeOtherNewTypeConst" #-} diff --git a/tests/html-tests/tests/DeprecatedNewtype.html.ref b/tests/html-tests/tests/DeprecatedNewtype.html.ref deleted file mode 100644 index 521ffb92..00000000 --- a/tests/html-tests/tests/DeprecatedNewtype.html.ref +++ /dev/null @@ -1,161 +0,0 @@ - -DeprecatedNewtype
    Safe HaskellNone

    DeprecatedNewtype

    Documentation

    newtype SomeNewType

    Deprecated: SomeNewType -

    some documentation -

    Constructors

    SomeNewTypeConst String

    Deprecated: SomeNewTypeConst -

    constructor docu -

    newtype SomeOtherNewType

    Deprecated: SomeOtherNewType -

    Constructors

    SomeOtherNewTypeConst String

    Deprecated: SomeOtherNewTypeConst -

    diff --git a/tests/html-tests/tests/DeprecatedReExport.hs b/tests/html-tests/tests/DeprecatedReExport.hs deleted file mode 100644 index f851e2ff..00000000 --- a/tests/html-tests/tests/DeprecatedReExport.hs +++ /dev/null @@ -1,16 +0,0 @@ --- | --- What is tested here: --- --- * Deprecation messages are shown for re-exported items. --- -module DeprecatedReExport ( --- * Re-exported from an other module - foo --- * Re-exported from an other package --- | Not yet working, see --- , isEmptyChan -, -) where - -import DeprecatedFunction -import Control.Concurrent.Chan diff --git a/tests/html-tests/tests/DeprecatedReExport.html.ref b/tests/html-tests/tests/DeprecatedReExport.html.ref deleted file mode 100644 index 611c181d..00000000 --- a/tests/html-tests/tests/DeprecatedReExport.html.ref +++ /dev/null @@ -1,133 +0,0 @@ - -DeprecatedReExport
    Safe HaskellNone

    DeprecatedReExport

    Description

    What is tested here: -

    • Deprecation messages are shown for re-exported items. -

    Synopsis

    Re-exported from an other module -

    foo :: Int

    Deprecated: use bar instead -

    some documentation for foo -

    Re-exported from an other package -

    Not yet working, see http://trac.haskell.org/haddock/ticket/223 - , isEmptyChan -

    diff --git a/tests/html-tests/tests/DeprecatedRecord.hs b/tests/html-tests/tests/DeprecatedRecord.hs deleted file mode 100644 index d44499e7..00000000 --- a/tests/html-tests/tests/DeprecatedRecord.hs +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 9ade8377..00000000 --- a/tests/html-tests/tests/DeprecatedRecord.html.ref +++ /dev/null @@ -1,151 +0,0 @@ - -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/DeprecatedTypeFamily.hs b/tests/html-tests/tests/DeprecatedTypeFamily.hs deleted file mode 100644 index 70473bb8..00000000 --- a/tests/html-tests/tests/DeprecatedTypeFamily.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module DeprecatedTypeFamily where - --- | some documentation -data family SomeTypeFamily k :: * -> * -{-# DEPRECATED SomeTypeFamily "SomeTypeFamily" #-} - -data family SomeOtherTypeFamily k :: * -> * -{-# DEPRECATED SomeOtherTypeFamily "SomeOtherTypeFamily" #-} diff --git a/tests/html-tests/tests/DeprecatedTypeFamily.html.ref b/tests/html-tests/tests/DeprecatedTypeFamily.html.ref deleted file mode 100644 index ffc069a6..00000000 --- a/tests/html-tests/tests/DeprecatedTypeFamily.html.ref +++ /dev/null @@ -1,108 +0,0 @@ - -DeprecatedTypeFamily
    Safe HaskellNone

    DeprecatedTypeFamily

    Synopsis

    Documentation

    data family SomeTypeFamily k :: * -> *

    Deprecated: SomeTypeFamily -

    some documentation -

    data family SomeOtherTypeFamily k :: * -> *

    Deprecated: SomeOtherTypeFamily -

    diff --git a/tests/html-tests/tests/DeprecatedTypeSynonym.hs b/tests/html-tests/tests/DeprecatedTypeSynonym.hs deleted file mode 100644 index 34df47da..00000000 --- a/tests/html-tests/tests/DeprecatedTypeSynonym.hs +++ /dev/null @@ -1,9 +0,0 @@ - -module DeprecatedTypeSynonym where - --- | some documentation -type TypeSyn = String -{-# DEPRECATED TypeSyn "TypeSyn" #-} - -type OtherTypeSyn = String -{-# DEPRECATED OtherTypeSyn "OtherTypeSyn" #-} diff --git a/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref b/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref deleted file mode 100644 index 665dcf5d..00000000 --- a/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref +++ /dev/null @@ -1,116 +0,0 @@ - -DeprecatedTypeSynonym
    Safe HaskellNone

    DeprecatedTypeSynonym

    Synopsis

    Documentation

    type TypeSyn = String

    Deprecated: TypeSyn -

    some documentation -

    type OtherTypeSyn = String

    Deprecated: OtherTypeSyn -

    diff --git a/tests/html-tests/tests/DeprecationMessageParseError.hs b/tests/html-tests/tests/DeprecationMessageParseError.hs deleted file mode 100644 index 2f8fb492..00000000 --- a/tests/html-tests/tests/DeprecationMessageParseError.hs +++ /dev/null @@ -1,12 +0,0 @@ --- | --- What is tested here: --- --- * If parsing of a deprecation message fails, the message is included --- verbatim. --- -module DeprecationMessageParseError where - --- | some documentation for foo -foo :: Int -foo = 23 -{-# DEPRECATED foo "use @bar instead" #-} diff --git a/tests/html-tests/tests/DeprecationMessageParseError.html.ref b/tests/html-tests/tests/DeprecationMessageParseError.html.ref deleted file mode 100644 index 75f9bf54..00000000 --- a/tests/html-tests/tests/DeprecationMessageParseError.html.ref +++ /dev/null @@ -1,101 +0,0 @@ - -DeprecationMessageParseError
    Safe HaskellNone

    DeprecationMessageParseError

    Description

    What is tested here: -

    • If parsing of a deprecation message fails, the message is included - verbatim. -

    Synopsis

    Documentation

    foo :: Int

    Deprecated: use @bar instead

    some documentation for foo -

    diff --git a/tests/html-tests/tests/Examples.hs b/tests/html-tests/tests/Examples.hs deleted file mode 100644 index c8c450f1..00000000 --- a/tests/html-tests/tests/Examples.hs +++ /dev/null @@ -1,39 +0,0 @@ -module Examples where - --- | Fibonacci number of given 'Integer'. --- --- Examples: --- --- >>> fib 5 --- 5 --- >>> fib 10 --- 55 --- --- >>> fib 10 --- 55 --- --- One more Example: --- --- >>> fib 5 --- 5 --- --- One more Example: --- --- >>> fib 5 --- 5 --- --- Example with an import: --- --- >>> import Data.Char --- >>> isSpace 'a' --- False --- --- >>> putStrLn "foo\n\nbar" --- foo --- --- bar --- -fib :: Integer -> Integer -fib 0 = 0 -fib 1 = 1 -fib n = fib (n - 1) + fib (n - 2) diff --git a/tests/html-tests/tests/Examples.html.ref b/tests/html-tests/tests/Examples.html.ref deleted file mode 100644 index 7ebe7770..00000000 --- a/tests/html-tests/tests/Examples.html.ref +++ /dev/null @@ -1,179 +0,0 @@ - -Examples
    Safe HaskellNone

    Examples

    Synopsis

    Documentation

    fib :: Integer -> Integer

    Fibonacci number of given Integer. -

    Examples: -

    >>> fib 5
    -5
    ->>> fib 10
    -55
    -
    >>> fib 10
    -55
    -

    One more Example: -

    >>> fib 5
    -5
    -

    One more Example: -

    >>> fib 5
    -5
    -

    Example with an import: -

    >>> import Data.Char
    ->>> isSpace 'a'
    -False
    -
    >>> putStrLn "foo\n\nbar"
    -foo
    -
    -bar
    -
    diff --git a/tests/html-tests/tests/FunArgs.hs b/tests/html-tests/tests/FunArgs.hs deleted file mode 100644 index b34d84b7..00000000 --- a/tests/html-tests/tests/FunArgs.hs +++ /dev/null @@ -1,16 +0,0 @@ -module FunArgs where - -f :: forall a. Ord a - => Int -- ^ First argument - -> a -- ^ Second argument - -> Bool -- ^ Third argument - -> (a -> a) -- ^ Fourth argument - -> () -- ^ Result -f = undefined - - -g :: a -- ^ First argument - -> b -- ^ Second argument - -> c -- ^ Third argument - -> d -- ^ Result -g = undefined diff --git a/tests/html-tests/tests/FunArgs.html.ref b/tests/html-tests/tests/FunArgs.html.ref deleted file mode 100644 index 6c87d1e6..00000000 --- a/tests/html-tests/tests/FunArgs.html.ref +++ /dev/null @@ -1,176 +0,0 @@ - -FunArgs
    Safe HaskellNone

    FunArgs

    Documentation

    f

    Arguments

    :: forall a . Ord a 
    => Int

    First argument -

    -> a

    Second argument -

    -> Bool

    Third argument -

    -> (a -> a)

    Fourth argument -

    -> ()

    Result -

    g

    Arguments

    :: a

    First argument -

    -> b

    Second argument -

    -> c

    Third argument -

    -> d

    Result -

    diff --git a/tests/html-tests/tests/GADTRecords.hs b/tests/html-tests/tests/GADTRecords.hs deleted file mode 100644 index c77810ad..00000000 --- a/tests/html-tests/tests/GADTRecords.hs +++ /dev/null @@ -1,12 +0,0 @@ -{-# LANGUAGE GADTs #-} -module GADTRecords (H1(..)) where - --- | h1 -data H1 a b where - C1 :: H1 a b - C2 :: Ord a => [a] -> H1 a a - C3 { field :: Int -- ^ hello docs - } :: H1 Int Int - C4 { field2 :: a -- ^ hello2 docs - } :: H1 Int a - diff --git a/tests/html-tests/tests/GADTRecords.html.ref b/tests/html-tests/tests/GADTRecords.html.ref deleted file mode 100644 index e3fcd2fe..00000000 --- a/tests/html-tests/tests/GADTRecords.html.ref +++ /dev/null @@ -1,234 +0,0 @@ - -GADTRecords
    Safe HaskellNone

    GADTRecords

    Synopsis

    Documentation

    data H1 a b where

    h1 -

    Constructors

    C1 :: H1 a b 
    C2 :: Ord a => [a] -> H1 a a 
    C3 :: Int -> H1 Int Int 

    Fields

    field :: Int

    hello docs -

    C4 :: a -> H1 Int a 

    Fields

    field2 :: a

    hello2 docs -

    diff --git a/tests/html-tests/tests/Hash.hs b/tests/html-tests/tests/Hash.hs deleted file mode 100644 index 343b69e9..00000000 --- a/tests/html-tests/tests/Hash.hs +++ /dev/null @@ -1,51 +0,0 @@ -{- | - Implementation of fixed-size hash tables, with a type - class for constructing hash values for structured types. --} -module Hash ( - -- * The @HashTable@ type - HashTable, - - -- ** Operations on @HashTable@s - new, insert, lookup, - - -- * The @Hash@ class - Hash(..), - ) where - -import Data.Array -import Prelude hiding (lookup) - --- | A hash table with keys of type @key@ and values of type @val@. --- The type @key@ should be an instance of 'Eq'. -data HashTable key val = HashTable Int (Array Int [(key,val)]) - --- | Builds a new hash table with a given size -new :: (Eq key, Hash key) => Int -> IO (HashTable key val) -new = undefined - --- | Inserts a new element into the hash table -insert :: (Eq key, Hash key) => key -> val -> IO () -insert = undefined - --- | Looks up a key in the hash table, returns @'Just' val@ if the key --- was found, or 'Nothing' otherwise. -lookup :: Hash key => key -> IO (Maybe val) -lookup = undefined - --- | A class of types which can be hashed. -class Hash a where - -- | hashes the value of type @a@ into an 'Int' - hash :: a -> Int - -instance Hash Int where - hash = id - -instance Hash Float where - hash = trunc - -instance (Hash a, Hash b) => Hash (a,b) where - hash (a,b) = hash a `xor` hash b - -trunc = undefined -xor = undefined diff --git a/tests/html-tests/tests/Hash.html.ref b/tests/html-tests/tests/Hash.html.ref deleted file mode 100644 index b0cd183c..00000000 --- a/tests/html-tests/tests/Hash.html.ref +++ /dev/null @@ -1,337 +0,0 @@ - -Hash
    Safe HaskellNone

    Hash

    Description

    Implementation of fixed-size hash tables, with a type - class for constructing hash values for structured types. -

    Synopsis

    The HashTable type -

    data HashTable key val

    A hash table with keys of type key and values of type val. - The type key should be an instance of Eq. -

    Operations on HashTables -

    new :: (Eq key, Hash key) => Int -> IO (HashTable key val)

    Builds a new hash table with a given size -

    insert :: (Eq key, Hash key) => key -> val -> IO ()

    Inserts a new element into the hash table -

    lookup :: Hash key => key -> IO (Maybe val)

    Looks up a key in the hash table, returns Just val if the key - was found, or Nothing otherwise. -

    The Hash class -

    class Hash a where

    A class of types which can be hashed. -

    Methods

    hash :: a -> Int

    hashes the value of type a into an Int -

    Instances

    Hash Float 
    Hash Int 
    (Hash a, Hash b) => Hash (a, b) 
    diff --git a/tests/html-tests/tests/Hidden.hs b/tests/html-tests/tests/Hidden.hs deleted file mode 100644 index 896da648..00000000 --- a/tests/html-tests/tests/Hidden.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# OPTIONS_HADDOCK hide #-} - -module Hidden where - -hidden :: Int -> Int -hidden a = a diff --git a/tests/html-tests/tests/HiddenInstances.hs b/tests/html-tests/tests/HiddenInstances.hs deleted file mode 100644 index 99a6c2fd..00000000 --- a/tests/html-tests/tests/HiddenInstances.hs +++ /dev/null @@ -1,35 +0,0 @@ --- http://trac.haskell.org/haddock/ticket/37 -module HiddenInstances (VisibleClass, VisibleData) where - --- | Should be visible -class VisibleClass a - --- | Should *not* be visible -class HiddenClass a - --- | Should *not* be visible -data HiddenData = HiddenData - --- | Should be visible -data VisibleData = VisibleData - --- | Should be visible -instance VisibleClass Int - --- | Should be visible -instance VisibleClass VisibleData - --- | Should be visible -instance Num VisibleData - --- | Should *not* be visible -instance VisibleClass HiddenData - --- | Should *not* be visible -instance HiddenClass Int - --- | Should *not* be visible -instance HiddenClass VisibleData - --- | Should *not* be visible -instance HiddenClass HiddenData diff --git a/tests/html-tests/tests/HiddenInstances.html.ref b/tests/html-tests/tests/HiddenInstances.html.ref deleted file mode 100644 index 999c114d..00000000 --- a/tests/html-tests/tests/HiddenInstances.html.ref +++ /dev/null @@ -1,169 +0,0 @@ - -HiddenInstances
    Safe HaskellNone

    HiddenInstances

    Synopsis

    Documentation

    class VisibleClass a

    Should be visible -

    Instances

    VisibleClass Int

    Should be visible -

    VisibleClass VisibleData

    Should be visible -

    data VisibleData

    Should be visible -

    Instances

    Num VisibleData

    Should be visible -

    VisibleClass VisibleData

    Should be visible -

    diff --git a/tests/html-tests/tests/HiddenInstancesA.hs b/tests/html-tests/tests/HiddenInstancesA.hs deleted file mode 100644 index f1775208..00000000 --- a/tests/html-tests/tests/HiddenInstancesA.hs +++ /dev/null @@ -1,17 +0,0 @@ -{-# OPTIONS_HADDOCK hide #-} -module HiddenInstancesA where - --- | Should be visible -class Foo a - --- | Should be visible -data Bar - --- | Should be visible -instance Foo Bar - --- | Should *not* be visible -data Baz - --- | Should *not* be visible -instance Foo Baz diff --git a/tests/html-tests/tests/HiddenInstancesB.hs b/tests/html-tests/tests/HiddenInstancesB.hs deleted file mode 100644 index eabf0637..00000000 --- a/tests/html-tests/tests/HiddenInstancesB.hs +++ /dev/null @@ -1,2 +0,0 @@ -module HiddenInstancesB (Foo, Bar) where -import HiddenInstancesA diff --git a/tests/html-tests/tests/HiddenInstancesB.html.ref b/tests/html-tests/tests/HiddenInstancesB.html.ref deleted file mode 100644 index 207a5146..00000000 --- a/tests/html-tests/tests/HiddenInstancesB.html.ref +++ /dev/null @@ -1,143 +0,0 @@ - -HiddenInstancesB
    Safe HaskellNone

    HiddenInstancesB

    Synopsis

    Documentation

    class Foo a

    Should be visible -

    Instances

    Foo Bar

    Should be visible -

    data Bar

    Should be visible -

    Instances

    Foo Bar

    Should be visible -

    diff --git a/tests/html-tests/tests/Hyperlinks.hs b/tests/html-tests/tests/Hyperlinks.hs deleted file mode 100644 index 34e64448..00000000 --- a/tests/html-tests/tests/Hyperlinks.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Hyperlinks where - --- | --- A plain URL: --- --- A URL with a label: -foo :: Int -foo = 23 diff --git a/tests/html-tests/tests/Hyperlinks.html.ref b/tests/html-tests/tests/Hyperlinks.html.ref deleted file mode 100644 index e7351a63..00000000 --- a/tests/html-tests/tests/Hyperlinks.html.ref +++ /dev/null @@ -1,89 +0,0 @@ - -Hyperlinks
    Safe HaskellNone

    Hyperlinks

    Synopsis

    Documentation

    foo :: Int

    A plain URL: http://example.com/ -

    A URL with a label: some link -

    diff --git a/tests/html-tests/tests/IgnoreExports.hs b/tests/html-tests/tests/IgnoreExports.hs deleted file mode 100644 index 0321ad02..00000000 --- a/tests/html-tests/tests/IgnoreExports.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# 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 deleted file mode 100644 index c661b48c..00000000 --- a/tests/html-tests/tests/IgnoreExports.html.ref +++ /dev/null @@ -1,101 +0,0 @@ - -IgnoreExports
    Safe HaskellNone

    IgnoreExports

    Synopsis

    Documentation

    foo :: Int

    documentation for foo -

    bar :: Int

    documentation for bar -

    diff --git a/tests/html-tests/tests/ModuleWithWarning.hs b/tests/html-tests/tests/ModuleWithWarning.hs deleted file mode 100644 index e64d9d7e..00000000 --- a/tests/html-tests/tests/ModuleWithWarning.hs +++ /dev/null @@ -1,5 +0,0 @@ --- | Documentation for "ModuleWithWarning". -module ModuleWithWarning {-# WARNING "This is an unstable interface. Prefer functions from \"Prelude\" instead!" #-} where - -foo :: Int -foo = 23 diff --git a/tests/html-tests/tests/ModuleWithWarning.html.ref b/tests/html-tests/tests/ModuleWithWarning.html.ref deleted file mode 100644 index 348f0822..00000000 --- a/tests/html-tests/tests/ModuleWithWarning.html.ref +++ /dev/null @@ -1,83 +0,0 @@ - -ModuleWithWarning
    Safe HaskellNone

    ModuleWithWarning

    Description

    Warning: This is an unstable interface. Prefer functions from Prelude instead! -

    Documentation for ModuleWithWarning. -

    Documentation

    foo :: Int

    diff --git a/tests/html-tests/tests/NamedDoc.hs b/tests/html-tests/tests/NamedDoc.hs deleted file mode 100644 index 7c04ba72..00000000 --- a/tests/html-tests/tests/NamedDoc.hs +++ /dev/null @@ -1,4 +0,0 @@ -module NamedDoc where - --- $foo bar - diff --git a/tests/html-tests/tests/NamedDoc.html.ref b/tests/html-tests/tests/NamedDoc.html.ref deleted file mode 100644 index d2b8ede1..00000000 --- a/tests/html-tests/tests/NamedDoc.html.ref +++ /dev/null @@ -1,68 +0,0 @@ - -NamedDoc
    Safe HaskellNone

    NamedDoc

    Synopsis

      Documentation

      bar -

      diff --git a/tests/html-tests/tests/NoLayout.hs b/tests/html-tests/tests/NoLayout.hs deleted file mode 100644 index 19b38b1d..00000000 --- a/tests/html-tests/tests/NoLayout.hs +++ /dev/null @@ -1,12 +0,0 @@ - --- Haddock comments are parsed as separate declarations so we --- need to insert a ';' when using them with explicit layout. --- This should probably be changed. - -module NoLayout where { - -- | the function 'g' - ; - g :: Int; - g = undefined - } - diff --git a/tests/html-tests/tests/NoLayout.html.ref b/tests/html-tests/tests/NoLayout.html.ref deleted file mode 100644 index 871add05..00000000 --- a/tests/html-tests/tests/NoLayout.html.ref +++ /dev/null @@ -1,86 +0,0 @@ - -NoLayout
      Safe HaskellNone

      NoLayout

      Synopsis

      Documentation

      g :: Int

      the function g -

      diff --git a/tests/html-tests/tests/NonGreedy.hs b/tests/html-tests/tests/NonGreedy.hs deleted file mode 100644 index f51b55f5..00000000 --- a/tests/html-tests/tests/NonGreedy.hs +++ /dev/null @@ -1,5 +0,0 @@ -module NonGreedy where - --- | -f :: a -f = undefined diff --git a/tests/html-tests/tests/NonGreedy.html.ref b/tests/html-tests/tests/NonGreedy.html.ref deleted file mode 100644 index 23d3f695..00000000 --- a/tests/html-tests/tests/NonGreedy.html.ref +++ /dev/null @@ -1,82 +0,0 @@ - -NonGreedy
      Safe HaskellNone

      NonGreedy

      Synopsis

      • f :: a

      Documentation

      f :: a

      diff --git a/tests/html-tests/tests/Properties.hs b/tests/html-tests/tests/Properties.hs deleted file mode 100644 index 05930ece..00000000 --- a/tests/html-tests/tests/Properties.hs +++ /dev/null @@ -1,9 +0,0 @@ -module Properties where - --- | Fibonacci number of given 'Integer'. --- --- prop> fib n <= fib (n + 1) -fib :: Integer -> Integer -fib 0 = 0 -fib 1 = 1 -fib n = fib (n - 1) + fib (n - 2) diff --git a/tests/html-tests/tests/Properties.html.ref b/tests/html-tests/tests/Properties.html.ref deleted file mode 100644 index 1c4ce893..00000000 --- a/tests/html-tests/tests/Properties.html.ref +++ /dev/null @@ -1,92 +0,0 @@ - -Properties
      Safe HaskellNone

      Properties

      Synopsis

      Documentation

      fib :: Integer -> Integer

      Fibonacci number of given Integer. -

      fib n <= fib (n + 1)
      diff --git a/tests/html-tests/tests/PruneWithWarning.hs b/tests/html-tests/tests/PruneWithWarning.hs deleted file mode 100644 index bfa55ea2..00000000 --- a/tests/html-tests/tests/PruneWithWarning.hs +++ /dev/null @@ -1,15 +0,0 @@ -{-# OPTIONS_HADDOCK prune #-} --- | --- What is tested here: --- --- * If a binding has a deprecation message but no documentation, it is pruned --- when @OPTIONS_HADDOCK prune@ is used. --- -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 deleted file mode 100644 index 3c31fbdf..00000000 --- a/tests/html-tests/tests/PruneWithWarning.html.ref +++ /dev/null @@ -1,72 +0,0 @@ - -PruneWithWarning
      Safe HaskellNone

      PruneWithWarning

      Description

      What is tested here: -

      • If a binding has a deprecation message but no documentation, it is pruned - when OPTIONS_HADDOCK prune is used. -
      diff --git a/tests/html-tests/tests/QuasiExpr.hs b/tests/html-tests/tests/QuasiExpr.hs deleted file mode 100644 index 970759ba..00000000 --- a/tests/html-tests/tests/QuasiExpr.hs +++ /dev/null @@ -1,34 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - --- Used by QuasiQuote. Example taken from the GHC documentation. -module QuasiExpr where - -import Language.Haskell.TH -import Language.Haskell.TH.Quote - -data Expr = IntExpr Integer - | AntiIntExpr String - | BinopExpr BinOp Expr Expr - | AntiExpr String - deriving Show - -data BinOp = AddOp - | SubOp - | MulOp - | DivOp - deriving Show - -eval :: Expr -> Integer -eval (IntExpr n) = n -eval (BinopExpr op x y) = (opToFun op) (eval x) (eval y) - where - opToFun AddOp = (+) - opToFun SubOp = (-) - opToFun MulOp = (*) - opToFun DivOp = div - -expr = QuasiQuoter parseExprExp undefined undefined undefined - --- cheating... -parseExprExp :: String -> Q Exp -parseExprExp _ = [| BinopExpr AddOp (IntExpr 1) (IntExpr 2) |] diff --git a/tests/html-tests/tests/QuasiExpr.html.ref b/tests/html-tests/tests/QuasiExpr.html.ref deleted file mode 100644 index 0a699f35..00000000 --- a/tests/html-tests/tests/QuasiExpr.html.ref +++ /dev/null @@ -1,221 +0,0 @@ - -QuasiExpr
      Safe HaskellNone

      QuasiExpr

      Documentation

      data BinOp

      Constructors

      AddOp 
      SubOp 
      MulOp 
      DivOp 

      Instances

      expr :: QuasiQuoter

      parseExprExp :: String -> Q Exp

      diff --git a/tests/html-tests/tests/QuasiQuote.hs b/tests/html-tests/tests/QuasiQuote.hs deleted file mode 100644 index 06762cf9..00000000 --- a/tests/html-tests/tests/QuasiQuote.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} - --- example taken from the GHC documentation -module QuasiQuote where - -import QuasiExpr - -val :: Integer -val = eval [expr|1 + 2|] diff --git a/tests/html-tests/tests/QuasiQuote.html.ref b/tests/html-tests/tests/QuasiQuote.html.ref deleted file mode 100644 index f61f2b84..00000000 --- a/tests/html-tests/tests/QuasiQuote.html.ref +++ /dev/null @@ -1,65 +0,0 @@ - -QuasiQuote
      Safe HaskellNone

      QuasiQuote

      Documentation

      diff --git a/tests/html-tests/tests/TH.hs b/tests/html-tests/tests/TH.hs deleted file mode 100644 index f8178bcb..00000000 --- a/tests/html-tests/tests/TH.hs +++ /dev/null @@ -1,8 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - -module TH where - -import Language.Haskell.TH - -decl :: Q [Dec] -decl = [d| f x = x|] diff --git a/tests/html-tests/tests/TH.html.ref b/tests/html-tests/tests/TH.html.ref deleted file mode 100644 index 086d6a4a..00000000 --- a/tests/html-tests/tests/TH.html.ref +++ /dev/null @@ -1,63 +0,0 @@ - -TH
      Safe HaskellNone

      TH

      Documentation

      decl :: Q [Dec]

      diff --git a/tests/html-tests/tests/TH2.hs b/tests/html-tests/tests/TH2.hs deleted file mode 100644 index ea85e547..00000000 --- a/tests/html-tests/tests/TH2.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - -module TH2 where - -import TH - -$( decl ) diff --git a/tests/html-tests/tests/TH2.html.ref b/tests/html-tests/tests/TH2.html.ref deleted file mode 100644 index 4d4a8914..00000000 --- a/tests/html-tests/tests/TH2.html.ref +++ /dev/null @@ -1,63 +0,0 @@ - -TH2
      Safe HaskellNone

      TH2

      Documentation

      f :: t -> t

      diff --git a/tests/html-tests/tests/Test.hs b/tests/html-tests/tests/Test.hs deleted file mode 100644 index d352f029..00000000 --- a/tests/html-tests/tests/Test.hs +++ /dev/null @@ -1,422 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Test --- Copyright : (c) Simon Marlow 2002 --- License : BSD-style --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- This module illustrates & tests most of the features of Haddock. --- Testing references from the description: 'T', 'f', 'g', 'Visible.visible'. --- ------------------------------------------------------------------------------ - --- This is plain comment, ignored by Haddock. - -module Test ( - - -- Section headings are introduced with '-- *': - -- * Type declarations - - -- Subsection headings are introduced with '-- **' and so on. - -- ** Data types - T(..), T2, T3(..), T4(..), T5(..), T6(..), - N1(..), N2(..), N3(..), N4, N5(..), N6(..), N7(..), - - -- ** Records - R(..), R1(..), - - -- | test that we can export record selectors on their own: - p, q, u, - - -- * Class declarations - C(a,b), D(..), E, F(..), - - -- | Test that we can export a class method on its own: - a, - - -- * Function types - f, g, - - -- * Auxiliary stuff - - -- $aux1 - - -- $aux2 - - -- $aux3 - - -- $aux4 - - -- $aux5 - - -- $aux6 - - -- $aux7 - - -- $aux8 - - -- $aux9 - - -- $aux10 - - -- $aux11 - - -- $aux12 - - -- | This is some inline documentation in the export list - -- - -- > a code block using bird-tracks - -- > each line must begin with > (which isn't significant unless it - -- > is at the beginning of the line). - - -- * A hidden module - module Hidden, - - -- * A visible module - module Visible, - - {-| nested-style doc comments -} - - -- * Existential \/ Universal types - Ex(..), - - -- * Type signatures with argument docs - k, l, m, o, - - -- * A section - -- and without an intervening comma: - -- ** A subsection - -{-| - > a literal line - - $ a non /literal/ line $ --} - - f', - - withType, withoutType - ) where - -import Hidden -import Visible -import Data.Maybe - -bla = Nothing - --- | This comment applies to the /following/ declaration --- and it continues until the next non-comment line -data T a b - = A Int (Maybe Float) -- ^ This comment describes the 'A' constructor - | -- | This comment describes the 'B' constructor - B (T a b, T Int Float) -- ^ - --- | An abstract data declaration -data T2 a b = T2 a b - --- | A data declaration with no documentation annotations on the constructors -data T3 a b = A1 a | B1 b - --- A data declaration with no documentation annotations at all -data T4 a b = A2 a | B2 b - --- A data declaration documentation on the constructors only -data T5 a b - = A3 a -- ^ documents 'A3' - | B3 b -- ^ documents 'B3' - --- | Testing alternative comment styles -data T6 - -- | This is the doc for 'A4' - = A4 - | B4 - | -- ^ This is the doc for 'B4' - - -- | This is the doc for 'C4' - C4 - --- | A newtype -newtype N1 a = N1 a - --- | A newtype with a fieldname -newtype N2 a b = N2 {n :: a b} - --- | A newtype with a fieldname, documentation on the field -newtype N3 a b = N3 {n3 :: a b -- ^ this is the 'n3' field - } - --- | An abstract newtype - we show this one as data rather than newtype because --- the difference isn\'t visible to the programmer for an abstract type. -newtype N4 a b = N4 a - -newtype N5 a b = N5 {n5 :: a b -- ^ no docs on the datatype or the constructor - } - -newtype N6 a b = N6 {n6 :: a b - } - -- ^ docs on the constructor only - --- | docs on the newtype and the constructor -newtype N7 a b = N7 {n7 :: a b - } - -- ^ The 'N7' constructor - - -class (D a) => C a where - -- |this is a description of the 'a' method - a :: IO a - b :: [a] - -- ^ this is a description of the 'b' method - c :: a -- c is hidden in the export list - --- ^ This comment applies to the /previous/ declaration (the 'C' class) - -class D a where - d :: T a b - e :: (a,a) --- ^ This is a class declaration with no separate docs for the methods - -instance D Int where - d = undefined - e = undefined - --- instance with a qualified class name -instance Test.D Float where - d = undefined - e = undefined - -class E a where - ee :: a --- ^ This is a class declaration with no methods (or no methods exported) - --- This is a class declaration with no documentation at all -class F a where - ff :: a - --- | This is the documentation for the 'R' record, which has four fields, --- 'p', 'q', 'r', and 's'. -data R = - -- | This is the 'C1' record constructor, with the following fields: - C1 { p :: Int -- ^ This comment applies to the 'p' field - , q :: forall a . a->a -- ^ This comment applies to the 'q' field - , -- | This comment applies to both 'r' and 's' - r,s :: Int - } - | C2 { t :: T1 -> (T2 Int Int)-> (T3 Bool Bool) -> (T4 Float Float) -> T5 () (), - u,v :: Int - } - -- ^ This is the 'C2' record constructor, also with some fields: - --- | Testing different record commenting styles -data R1 - -- | This is the 'C3' record constructor - = C3 { - -- | The 's1' record selector - s1 :: Int - -- | The 's2' record selector - , s2 :: Int - , s3 :: Int -- NOTE: In the original examples/Test.hs in Haddock, there is an extra "," here. - -- Since GHC doesn't allow that, I have removed it in this file. - -- ^ The 's3' record selector - } - --- These section headers are only used when there is no export list to --- give the structure of the documentation: - --- * This is a section header (level 1) --- ** This is a section header (level 2) --- *** This is a section header (level 3) - -{-| -In a comment string we can refer to identifiers in scope with -single quotes like this: 'T', and we can refer to modules by -using double quotes: "Foo". We can add emphasis /like this/. - - * This is a bulleted list - - - This is the next item (different kind of bullet) - - (1) This is an ordered list - - 2. This is the next item (different kind of bullet) - - [cat] a small, furry, domesticated mammal - - [pineapple] a fruit grown in the tropics - -@ - This is a block of code, which can include other markup: 'R' - formatting - is - significant -@ - -> this is another block of code - -We can also include URLs in documentation: . --} - -f :: C a => a -> Int - --- | we can export foreign declarations too -foreign import ccall g :: Int -> IO CInt - --- | this doc string has a parse error in it: \' -h :: Int -h = 42 - - --- $aux1 This is some documentation that is attached to a name ($aux1) --- rather than a source declaration. The documentation may be --- referred to in the export list using its name. --- --- @ code block in named doc @ - --- $aux2 This is some documentation that is attached to a name ($aux2) - --- $aux3 --- @ code block on its own in named doc @ - --- $aux4 --- --- @ code block on its own in named doc (after newline) @ - -{- $aux5 a nested, named doc comment - - with a paragraph, - - @ and a code block @ --} - --- some tests for various arrangements of code blocks: - -{- $aux6 ->test ->test1 - -@ test2 - test3 -@ --} - -{- $aux7 -@ -test1 -test2 -@ --} - -{- $aux8 ->test3 ->test4 --} - -{- $aux9 -@ -test1 -test2 -@ - ->test3 ->test4 --} - -{- $aux10 ->test3 ->test4 - -@ -test1 -test2 -@ --} - --- This one is currently wrong (Haddock 0.4). The @...@ part is --- interpreted as part of the bird-tracked code block. -{- $aux11 -aux11: - ->test3 ->test4 - -@ -test1 -test2 -@ --} - --- $aux12 --- > foo --- --- > bar --- - --- | A data-type using existential\/universal types -data Ex a - = forall b . C b => Ex1 b - | forall b . Ex2 b - | forall b . C a => Ex3 b -- NOTE: I have added "forall b" here make GHC accept this file - | Ex4 (forall a . a -> a) - --- | This is a function with documentation for each argument -k :: T () () -- ^ This argument has type 'T' - -> (T2 Int Int) -- ^ This argument has type 'T2 Int Int' - -> (T3 Bool Bool -> T4 Float Float) -- ^ This argument has type @T3 Bool Bool -> T4 Float Float@ - -> T5 () () -- ^ This argument has a very long description that should - -- hopefully cause some wrapping to happen when it is finally - -- rendered by Haddock in the generated HTML page. - -> IO () -- ^ This is the result type - --- This function has arg docs but no docs for the function itself -l :: (Int, Int, Float) -- ^ takes a triple - -> Int -- ^ returns an 'Int' - --- | This function has some arg docs -m :: R - -> N1 () -- ^ one of the arguments - -> IO Int -- ^ and the return value - --- | This function has some arg docs but not a return value doc - --- can't use the original name ('n') with GHC -newn :: R -- ^ one of the arguments, an 'R' - -> N1 () -- ^ one of the arguments - -> IO Int -newn = undefined - - --- | A foreign import with argument docs -foreign import ccall unsafe - o :: Float -- ^ The input float - -> IO Float -- ^ The output float - --- | We should be able to escape this: \#\#\# - --- p :: Int --- can't use the above original definition with GHC -newp :: Int -newp = undefined - --- | a function with a prime can be referred to as 'f'' --- 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 - -data T1 -f = undefined -f' = undefined -type CInt = Int -k = undefined -l = undefined -m = undefined diff --git a/tests/html-tests/tests/Test.html.ref b/tests/html-tests/tests/Test.html.ref deleted file mode 100644 index f2ef2b28..00000000 --- a/tests/html-tests/tests/Test.html.ref +++ /dev/null @@ -1,2245 +0,0 @@ - -Test
      Portabilityportable
      Stabilityprovisional
      Maintainerlibraries@haskell.org
      Safe HaskellNone

      Test

      Description

      This module illustrates & tests most of the features of Haddock. - Testing references from the description: T, f, g, visible. -

      Synopsis

      Type declarations -

      Data types -

      data T a b

      This comment applies to the following declaration - and it continues until the next non-comment line -

      Constructors

      A Int (Maybe Float)

      This comment describes the A constructor -

      B (T a b, T Int Float)

      This comment describes the B constructor -

      data T2 a b

      An abstract data declaration -

      data T3 a b

      A data declaration with no documentation annotations on the constructors -

      Constructors

      A1 a 
      B1 b 

      data T4 a b

      Constructors

      A2 a 
      B2 b 

      data T5 a b

      Constructors

      A3 a

      documents A3 -

      B3 b

      documents B3 -

      data T6

      Testing alternative comment styles -

      Constructors

      A4

      This is the doc for A4 -

      B4

      This is the doc for B4 -

      C4

      This is the doc for C4 -

      newtype N1 a

      A newtype -

      Constructors

      N1 a 

      newtype N2 a b

      A newtype with a fieldname -

      Constructors

      N2 

      Fields

      n :: a b
       

      newtype N3 a b

      A newtype with a fieldname, documentation on the field -

      Constructors

      N3 

      Fields

      n3 :: a b

      this is the n3 field -

      data N4 a b

      An abstract newtype - we show this one as data rather than newtype because - the difference isn't visible to the programmer for an abstract type. -

      newtype N5 a b

      Constructors

      N5 

      Fields

      n5 :: a b

      no docs on the datatype or the constructor -

      newtype N6 a b

      Constructors

      N6

      docs on the constructor only -

      Fields

      n6 :: a b
       

      newtype N7 a b

      docs on the newtype and the constructor -

      Constructors

      N7

      The N7 constructor -

      Fields

      n7 :: a b
       

      Records -

      data R

      This is the documentation for the R record, which has four fields, - p, q, r, and s. -

      Constructors

      C1

      This is the C1 record constructor, with the following fields: -

      Fields

      p :: Int

      This comment applies to the p field -

      q :: forall a. a -> a

      This comment applies to the q field -

      r :: Int

      This comment applies to both r and s -

      s :: Int

      This comment applies to both r and s -

      C2

      This is the C2 record constructor, also with some fields: -

      Fields

      t :: T1 -> T2 Int Int -> T3 Bool Bool -> T4 Float Float -> T5 () ()
       
      u :: Int
       
      v :: Int
       

      data R1

      Testing different record commenting styles -

      Constructors

      C3

      This is the C3 record constructor -

      Fields

      s1 :: Int

      The s1 record selector -

      s2 :: Int

      The s2 record selector -

      s3 :: Int

      The s3 record selector -

      test that we can export record selectors on their own: -

      Class declarations -

      class D a => C a where

      This comment applies to the previous declaration (the C class) -

      Methods

      a :: IO a

      this is a description of the a method -

      b :: [a]

      this is a description of the b method -

      class D a where

      This is a class declaration with no separate docs for the methods -

      Methods

      d :: T a b

      e :: (a, a)

      Instances

      class E a

      This is a class declaration with no methods (or no methods exported) -

      class F a where

      Methods

      ff :: a

      Test that we can export a class method on its own: -

      Function types -

      f :: C a => a -> Int

      In a comment string we can refer to identifiers in scope with -single quotes like this: T, and we can refer to modules by -using double quotes: Foo. We can add emphasis like this. -

      • This is a bulleted list -
      • This is the next item (different kind of bullet) -
      1. This is an ordered list -
      2. This is the next item (different kind of bullet) -
      cat
      a small, furry, domesticated mammal -
      pineapple
      a fruit grown in the tropics -
      -     This is a block of code, which can include other markup: R
      -     formatting
      -               is
      -                 significant
      -
       this is another block of code
      -

      We can also include URLs in documentation: http://www.haskell.org/. -

      g :: Int -> IO CInt

      we can export foreign declarations too -

      Auxiliary stuff -

      This is some documentation that is attached to a name ($aux1) - rather than a source declaration. The documentation may be - referred to in the export list using its name. -

       code block in named doc

      This is some documentation that is attached to a name ($aux2) -

       code block on its own in named doc
       code block on its own in named doc (after newline)

      a nested, named doc comment -

      with a paragraph, -

       and a code block
      test
      -test1
      -
       test2
      -  test3
      -
      -test1
      -test2
      -
      test3
      -test4
      -
      -test1
      -test2
      -
      test3
      -test4
      -
      test3
      -test4
      -
      -test1
      -test2
      -

      aux11: -

      test3
      -test4
      -
      -test1
      -test2
      -
       foo
      -
       bar
      -

      This is some inline documentation in the export list -

       a code block using bird-tracks
      - each line must begin with > (which isn't significant unless it
      - is at the beginning of the line).
      -

      A hidden module -

      hidden :: Int -> Int

      A visible module -

      module Visible

      nested-style doc comments -

      Existential / Universal types -

      data Ex a

      A data-type using existential/universal types -

      Constructors

      forall b . C b => Ex1 b 
      forall b . Ex2 b 
      forall b . C a => Ex3 b 
      Ex4 (forall a. a -> a) 

      Type signatures with argument docs -

      k

      Arguments

      :: T () ()

      This argument has type T -

      -> T2 Int Int

      This argument has type 'T2 Int Int' -

      -> (T3 Bool Bool -> T4 Float Float)

      This argument has type T3 Bool Bool -> T4 Float Float -

      -> T5 () ()

      This argument has a very long description that should - hopefully cause some wrapping to happen when it is finally - rendered by Haddock in the generated HTML page. -

      -> IO ()

      This is the result type -

      This is a function with documentation for each argument -

      l

      Arguments

      :: (Int, Int, Float)

      takes a triple -

      -> Int

      returns an Int -

      m

      Arguments

      :: R 
      -> N1 ()

      one of the arguments -

      -> IO Int

      and the return value -

      This function has some arg docs -

      o

      Arguments

      :: Float

      The input float -

      -> IO Float

      The output float -

      A foreign import with argument docs -

      A section -

      A subsection -

       a literal line
      -

      $ a non literal line $ -

      f' :: Int

      a function with a prime can be referred to as f' - 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 -

      diff --git a/tests/html-tests/tests/Ticket112.hs b/tests/html-tests/tests/Ticket112.hs deleted file mode 100644 index c9cd5117..00000000 --- a/tests/html-tests/tests/Ticket112.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE MagicHash #-} - -module Ticket112 where - -import GHC.Prim - --- | ...given a raw 'Addr#' to the string, and the length of the string. -f :: a -f = undefined diff --git a/tests/html-tests/tests/Ticket112.html.ref b/tests/html-tests/tests/Ticket112.html.ref deleted file mode 100644 index c5c61703..00000000 --- a/tests/html-tests/tests/Ticket112.html.ref +++ /dev/null @@ -1,82 +0,0 @@ - -Ticket112
      Safe HaskellNone

      Ticket112

      Synopsis

      • f :: a

      Documentation

      f :: a

      ...given a raw Addr# to the string, and the length of the string. -

      diff --git a/tests/html-tests/tests/Ticket61.hs b/tests/html-tests/tests/Ticket61.hs deleted file mode 100644 index 26ca287f..00000000 --- a/tests/html-tests/tests/Ticket61.hs +++ /dev/null @@ -1,3 +0,0 @@ -module Ticket61 (module Ticket61_Hidden) where - -import Ticket61_Hidden diff --git a/tests/html-tests/tests/Ticket61.html.ref b/tests/html-tests/tests/Ticket61.html.ref deleted file mode 100644 index 8c22488b..00000000 --- a/tests/html-tests/tests/Ticket61.html.ref +++ /dev/null @@ -1,80 +0,0 @@ - -Ticket61
      Safe HaskellNone

      Ticket61

      Documentation

      class C a where

      Methods

      f :: a

      A comment about f -

      diff --git a/tests/html-tests/tests/Ticket61_Hidden.hs b/tests/html-tests/tests/Ticket61_Hidden.hs deleted file mode 100644 index 583c10cd..00000000 --- a/tests/html-tests/tests/Ticket61_Hidden.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# OPTIONS_HADDOCK hide #-} - -module Ticket61_Hidden where - -class C a where - -- | A comment about f - f :: a diff --git a/tests/html-tests/tests/Ticket75.hs b/tests/html-tests/tests/Ticket75.hs deleted file mode 100644 index 94a2f115..00000000 --- a/tests/html-tests/tests/Ticket75.hs +++ /dev/null @@ -1,7 +0,0 @@ -module Ticket75 where - -data a :- b = Q - --- | A reference to ':-' -f :: Int -f = undefined diff --git a/tests/html-tests/tests/Ticket75.html.ref b/tests/html-tests/tests/Ticket75.html.ref deleted file mode 100644 index cd510ea5..00000000 --- a/tests/html-tests/tests/Ticket75.html.ref +++ /dev/null @@ -1,116 +0,0 @@ - -Ticket75
      Safe HaskellNone

      Ticket75

      Synopsis

      Documentation

      data a :- b

      Constructors

      Q 

      f :: Int

      A reference to :- -

      diff --git a/tests/html-tests/tests/TypeFamilies.hs b/tests/html-tests/tests/TypeFamilies.hs deleted file mode 100644 index 561f95fd..00000000 --- a/tests/html-tests/tests/TypeFamilies.hs +++ /dev/null @@ -1,28 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} - -module TypeFamilies where - --- | Type family G -type family G a :: * - --- | A class with an associated type -class A a where - -- | An associated type - data B a :: * -> * - -- | A method - f :: B a Int - --- | Doc for family -type family F a - - --- | Doc for G Int -type instance G Int = Bool -type instance G Float = Int - - -instance A Int where - data B Int x = Con x - f = Con 3 - -g = Con 5 diff --git a/tests/html-tests/tests/TypeFamilies.html.ref b/tests/html-tests/tests/TypeFamilies.html.ref deleted file mode 100644 index 196d60ec..00000000 --- a/tests/html-tests/tests/TypeFamilies.html.ref +++ /dev/null @@ -1,212 +0,0 @@ - -TypeFamilies
      Safe HaskellNone

      TypeFamilies

      Synopsis

      Documentation

      type family G a :: *

      Type family G -

      class A a where

      A class with an associated type -

      Associated Types

      data B a :: * -> *

      An associated type -

      Methods

      f :: B a Int

      A method -

      Instances

      A Int 

      type family F a

      Doc for family -

      diff --git a/tests/html-tests/tests/TypeOperators.hs b/tests/html-tests/tests/TypeOperators.hs deleted file mode 100644 index edbb9344..00000000 --- a/tests/html-tests/tests/TypeOperators.hs +++ /dev/null @@ -1,20 +0,0 @@ -{-# LANGUAGE TypeOperators #-} -module TypeOperators ( - -- * stuff - (:-:), - (:+:), - Op, - O(..), - biO, -) where - -data a :-: b - -data (a :+: b) c - -data a `Op` b - -newtype (g `O` f) a = O { unO :: g (f a) } - -biO :: (g `O` f) a -biO = undefined diff --git a/tests/html-tests/tests/TypeOperators.html.ref b/tests/html-tests/tests/TypeOperators.html.ref deleted file mode 100644 index 2b18727f..00000000 --- a/tests/html-tests/tests/TypeOperators.html.ref +++ /dev/null @@ -1,185 +0,0 @@ - -TypeOperators
      Safe HaskellNone

      TypeOperators

      Contents

      Synopsis

      • data a :-: b
      • data (a :+: b) c
      • data Op a b
      • newtype O g f a = O {}
      • biO :: (g `O` f) a

      stuff -

      data a :-: b

      data (a :+: b) c

      data Op a b

      newtype O g f a

      Constructors

      O 

      Fields

      unO :: g (f a)
       

      biO :: (g `O` f) a

      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 - diff --git a/tests/html-tests/tests/Unicode.html.ref b/tests/html-tests/tests/Unicode.html.ref deleted file mode 100644 index 13ef6c1e..00000000 --- a/tests/html-tests/tests/Unicode.html.ref +++ /dev/null @@ -1,82 +0,0 @@ - -Unicode
      Safe HaskellNone

      Unicode

      Synopsis

      Documentation

      x :: Int

      γλώσσα -

      diff --git a/tests/html-tests/tests/Visible.hs b/tests/html-tests/tests/Visible.hs deleted file mode 100644 index cad71931..00000000 --- a/tests/html-tests/tests/Visible.hs +++ /dev/null @@ -1,3 +0,0 @@ -module Visible where -visible :: Int -> Int -visible a = a diff --git a/tests/html-tests/tests/Visible.html.ref b/tests/html-tests/tests/Visible.html.ref deleted file mode 100644 index de8b8d80..00000000 --- a/tests/html-tests/tests/Visible.html.ref +++ /dev/null @@ -1,67 +0,0 @@ - -Visible
      Safe HaskellNone

      Visible

      Documentation

      diff --git a/tests/html-tests/tests/frames.html.ref b/tests/html-tests/tests/frames.html.ref deleted file mode 100644 index 1b4e38d4..00000000 --- a/tests/html-tests/tests/frames.html.ref +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tests/html-tests/tests/mini_A.html.ref b/tests/html-tests/tests/mini_A.html.ref deleted file mode 100644 index cbe50e41..00000000 --- a/tests/html-tests/tests/mini_A.html.ref +++ /dev/null @@ -1,59 +0,0 @@ - -A

      A

      diff --git a/tests/html-tests/tests/mini_AdvanceTypes.html.ref b/tests/html-tests/tests/mini_AdvanceTypes.html.ref deleted file mode 100644 index 59d8dcb1..00000000 --- a/tests/html-tests/tests/mini_AdvanceTypes.html.ref +++ /dev/null @@ -1,33 +0,0 @@ - -AdvanceTypes

      AdvanceTypes

      data Pattern

      diff --git a/tests/html-tests/tests/mini_B.html.ref b/tests/html-tests/tests/mini_B.html.ref deleted file mode 100644 index 211a7deb..00000000 --- a/tests/html-tests/tests/mini_B.html.ref +++ /dev/null @@ -1,45 +0,0 @@ - -B

      B

      diff --git a/tests/html-tests/tests/mini_Bug1.html.ref b/tests/html-tests/tests/mini_Bug1.html.ref deleted file mode 100644 index adf81c73..00000000 --- a/tests/html-tests/tests/mini_Bug1.html.ref +++ /dev/null @@ -1,33 +0,0 @@ - -Bug1

      Bug1

      data T

      diff --git a/tests/html-tests/tests/mini_Bug2.html.ref b/tests/html-tests/tests/mini_Bug2.html.ref deleted file mode 100644 index b673e459..00000000 --- a/tests/html-tests/tests/mini_Bug2.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Bug2

      Bug2

      diff --git a/tests/html-tests/tests/mini_Bug3.html.ref b/tests/html-tests/tests/mini_Bug3.html.ref deleted file mode 100644 index af4cc445..00000000 --- a/tests/html-tests/tests/mini_Bug3.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Bug3

      Bug3

      diff --git a/tests/html-tests/tests/mini_Bug4.html.ref b/tests/html-tests/tests/mini_Bug4.html.ref deleted file mode 100644 index b403e94a..00000000 --- a/tests/html-tests/tests/mini_Bug4.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Bug4

      Bug4

      diff --git a/tests/html-tests/tests/mini_Bug6.html.ref b/tests/html-tests/tests/mini_Bug6.html.ref deleted file mode 100644 index 5c5c1119..00000000 --- a/tests/html-tests/tests/mini_Bug6.html.ref +++ /dev/null @@ -1,65 +0,0 @@ - -Bug6

      Bug6

      data A

      data B

      data C

      data D

      data E

      diff --git a/tests/html-tests/tests/mini_Bug7.html.ref b/tests/html-tests/tests/mini_Bug7.html.ref deleted file mode 100644 index 1bec82ee..00000000 --- a/tests/html-tests/tests/mini_Bug7.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -Bug7

      Bug7

      data Foo

      class Bar x y

      diff --git a/tests/html-tests/tests/mini_Bug8.html.ref b/tests/html-tests/tests/mini_Bug8.html.ref deleted file mode 100644 index 070dbcf8..00000000 --- a/tests/html-tests/tests/mini_Bug8.html.ref +++ /dev/null @@ -1,63 +0,0 @@ - -Bug8

      Bug8

      diff --git a/tests/html-tests/tests/mini_BugDeprecated.html.ref b/tests/html-tests/tests/mini_BugDeprecated.html.ref deleted file mode 100644 index f0410137..00000000 --- a/tests/html-tests/tests/mini_BugDeprecated.html.ref +++ /dev/null @@ -1,61 +0,0 @@ - -BugDeprecated

      BugDeprecated

      diff --git a/tests/html-tests/tests/mini_BugExportHeadings.html.ref b/tests/html-tests/tests/mini_BugExportHeadings.html.ref deleted file mode 100644 index b481720d..00000000 --- a/tests/html-tests/tests/mini_BugExportHeadings.html.ref +++ /dev/null @@ -1,79 +0,0 @@ - -BugExportHeadings

      BugExportHeadings

      Foo -

      Bar -

      Baz -

      One -

      Two -

      Three -

      diff --git a/tests/html-tests/tests/mini_Bugs.html.ref b/tests/html-tests/tests/mini_Bugs.html.ref deleted file mode 100644 index 3c758375..00000000 --- a/tests/html-tests/tests/mini_Bugs.html.ref +++ /dev/null @@ -1,33 +0,0 @@ - -Bugs

      Bugs

      data A a

      diff --git a/tests/html-tests/tests/mini_CrossPackageDocs.html.ref b/tests/html-tests/tests/mini_CrossPackageDocs.html.ref deleted file mode 100644 index 4c0588ba..00000000 --- a/tests/html-tests/tests/mini_CrossPackageDocs.html.ref +++ /dev/null @@ -1,45 +0,0 @@ - -CrossPackageDocs

      CrossPackageDocs

      diff --git a/tests/html-tests/tests/mini_DeprecatedClass.html.ref b/tests/html-tests/tests/mini_DeprecatedClass.html.ref deleted file mode 100644 index 3923c1ff..00000000 --- a/tests/html-tests/tests/mini_DeprecatedClass.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -DeprecatedClass

      DeprecatedClass

      class SomeClass a

      diff --git a/tests/html-tests/tests/mini_DeprecatedData.html.ref b/tests/html-tests/tests/mini_DeprecatedData.html.ref deleted file mode 100644 index 8ef20113..00000000 --- a/tests/html-tests/tests/mini_DeprecatedData.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -DeprecatedData

      DeprecatedData

      data Foo

      data One

      diff --git a/tests/html-tests/tests/mini_DeprecatedFunction.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction.html.ref deleted file mode 100644 index 9bb90dac..00000000 --- a/tests/html-tests/tests/mini_DeprecatedFunction.html.ref +++ /dev/null @@ -1,37 +0,0 @@ - -DeprecatedFunction

      DeprecatedFunction

      diff --git a/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref deleted file mode 100644 index a03991a9..00000000 --- a/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -DeprecatedFunction2

      DeprecatedFunction2

      diff --git a/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref deleted file mode 100644 index 4ea60339..00000000 --- a/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -DeprecatedFunction3

      DeprecatedFunction3

      diff --git a/tests/html-tests/tests/mini_DeprecatedModule.html.ref b/tests/html-tests/tests/mini_DeprecatedModule.html.ref deleted file mode 100644 index bfdef611..00000000 --- a/tests/html-tests/tests/mini_DeprecatedModule.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -DeprecatedModule

      DeprecatedModule

      diff --git a/tests/html-tests/tests/mini_DeprecatedModule2.html.ref b/tests/html-tests/tests/mini_DeprecatedModule2.html.ref deleted file mode 100644 index dbcc43b9..00000000 --- a/tests/html-tests/tests/mini_DeprecatedModule2.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -DeprecatedModule2

      DeprecatedModule2

      diff --git a/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref b/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref deleted file mode 100644 index a913525f..00000000 --- a/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -DeprecatedNewtype

      DeprecatedNewtype

      diff --git a/tests/html-tests/tests/mini_DeprecatedReExport.html.ref b/tests/html-tests/tests/mini_DeprecatedReExport.html.ref deleted file mode 100644 index 8316dda5..00000000 --- a/tests/html-tests/tests/mini_DeprecatedReExport.html.ref +++ /dev/null @@ -1,37 +0,0 @@ - -DeprecatedReExport

      DeprecatedReExport

      Re-exported from an other module -

      Re-exported from an other package -

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

      DeprecatedRecord

      data Foo

      diff --git a/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref b/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref deleted file mode 100644 index c87d9637..00000000 --- a/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -DeprecatedTypeFamily

      DeprecatedTypeFamily

      data family SomeTypeFamily k :: * -> *

      data family SomeOtherTypeFamily k :: * -> *

      diff --git a/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref b/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref deleted file mode 100644 index 5ade100d..00000000 --- a/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -DeprecatedTypeSynonym

      DeprecatedTypeSynonym

      diff --git a/tests/html-tests/tests/mini_DeprecationMessageParseError.html.ref b/tests/html-tests/tests/mini_DeprecationMessageParseError.html.ref deleted file mode 100644 index e52f487f..00000000 --- a/tests/html-tests/tests/mini_DeprecationMessageParseError.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -DeprecationMessageParseError

      DeprecationMessageParseError

      diff --git a/tests/html-tests/tests/mini_Examples.html.ref b/tests/html-tests/tests/mini_Examples.html.ref deleted file mode 100644 index c99c2c48..00000000 --- a/tests/html-tests/tests/mini_Examples.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Examples

      Examples

      diff --git a/tests/html-tests/tests/mini_FunArgs.html.ref b/tests/html-tests/tests/mini_FunArgs.html.ref deleted file mode 100644 index 89729720..00000000 --- a/tests/html-tests/tests/mini_FunArgs.html.ref +++ /dev/null @@ -1,37 +0,0 @@ - -FunArgs

      FunArgs

      diff --git a/tests/html-tests/tests/mini_GADTRecords.html.ref b/tests/html-tests/tests/mini_GADTRecords.html.ref deleted file mode 100644 index a8b838f0..00000000 --- a/tests/html-tests/tests/mini_GADTRecords.html.ref +++ /dev/null @@ -1,33 +0,0 @@ - -GADTRecords

      GADTRecords

      data H1 a b

      diff --git a/tests/html-tests/tests/mini_Hash.html.ref b/tests/html-tests/tests/mini_Hash.html.ref deleted file mode 100644 index 1e6ad1a9..00000000 --- a/tests/html-tests/tests/mini_Hash.html.ref +++ /dev/null @@ -1,74 +0,0 @@ - -Hash

      Hash

      The HashTable type -

      data HashTable key val

      Operations on HashTables -

      The Hash class -

      class Hash a

      diff --git a/tests/html-tests/tests/mini_HiddenInstances.html.ref b/tests/html-tests/tests/mini_HiddenInstances.html.ref deleted file mode 100644 index 0f1a2e04..00000000 --- a/tests/html-tests/tests/mini_HiddenInstances.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -HiddenInstances

      HiddenInstances

      diff --git a/tests/html-tests/tests/mini_HiddenInstancesB.html.ref b/tests/html-tests/tests/mini_HiddenInstancesB.html.ref deleted file mode 100644 index 3ce4f6a9..00000000 --- a/tests/html-tests/tests/mini_HiddenInstancesB.html.ref +++ /dev/null @@ -1,41 +0,0 @@ - -HiddenInstancesB

      HiddenInstancesB

      class Foo a

      data Bar

      diff --git a/tests/html-tests/tests/mini_Hyperlinks.html.ref b/tests/html-tests/tests/mini_Hyperlinks.html.ref deleted file mode 100644 index f0c7d65a..00000000 --- a/tests/html-tests/tests/mini_Hyperlinks.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Hyperlinks

      Hyperlinks

      diff --git a/tests/html-tests/tests/mini_IgnoreExports.html.ref b/tests/html-tests/tests/mini_IgnoreExports.html.ref deleted file mode 100644 index a420e65a..00000000 --- a/tests/html-tests/tests/mini_IgnoreExports.html.ref +++ /dev/null @@ -1,37 +0,0 @@ - -IgnoreExports

      IgnoreExports

      diff --git a/tests/html-tests/tests/mini_ModuleWithWarning.html.ref b/tests/html-tests/tests/mini_ModuleWithWarning.html.ref deleted file mode 100644 index 19315a14..00000000 --- a/tests/html-tests/tests/mini_ModuleWithWarning.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -ModuleWithWarning

      ModuleWithWarning

      diff --git a/tests/html-tests/tests/mini_NamedDoc.html.ref b/tests/html-tests/tests/mini_NamedDoc.html.ref deleted file mode 100644 index 066bbc61..00000000 --- a/tests/html-tests/tests/mini_NamedDoc.html.ref +++ /dev/null @@ -1,25 +0,0 @@ - -NamedDoc

      NamedDoc

      diff --git a/tests/html-tests/tests/mini_NoLayout.html.ref b/tests/html-tests/tests/mini_NoLayout.html.ref deleted file mode 100644 index 19562d70..00000000 --- a/tests/html-tests/tests/mini_NoLayout.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -NoLayout

      NoLayout

      diff --git a/tests/html-tests/tests/mini_NonGreedy.html.ref b/tests/html-tests/tests/mini_NonGreedy.html.ref deleted file mode 100644 index 698c368e..00000000 --- a/tests/html-tests/tests/mini_NonGreedy.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -NonGreedy

      NonGreedy

      diff --git a/tests/html-tests/tests/mini_Properties.html.ref b/tests/html-tests/tests/mini_Properties.html.ref deleted file mode 100644 index 5f538dfd..00000000 --- a/tests/html-tests/tests/mini_Properties.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Properties

      Properties

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

      PruneWithWarning

      diff --git a/tests/html-tests/tests/mini_QuasiExpr.html.ref b/tests/html-tests/tests/mini_QuasiExpr.html.ref deleted file mode 100644 index 7dd9b829..00000000 --- a/tests/html-tests/tests/mini_QuasiExpr.html.ref +++ /dev/null @@ -1,59 +0,0 @@ - -QuasiExpr

      QuasiExpr

      diff --git a/tests/html-tests/tests/mini_QuasiQuote.html.ref b/tests/html-tests/tests/mini_QuasiQuote.html.ref deleted file mode 100644 index 5dac6acc..00000000 --- a/tests/html-tests/tests/mini_QuasiQuote.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -QuasiQuote

      QuasiQuote

      diff --git a/tests/html-tests/tests/mini_TH.html.ref b/tests/html-tests/tests/mini_TH.html.ref deleted file mode 100644 index d2ddbabc..00000000 --- a/tests/html-tests/tests/mini_TH.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -TH

      TH

      diff --git a/tests/html-tests/tests/mini_TH2.html.ref b/tests/html-tests/tests/mini_TH2.html.ref deleted file mode 100644 index 2c9f1340..00000000 --- a/tests/html-tests/tests/mini_TH2.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -TH2

      TH2

      diff --git a/tests/html-tests/tests/mini_Test.html.ref b/tests/html-tests/tests/mini_Test.html.ref deleted file mode 100644 index 26db2c0f..00000000 --- a/tests/html-tests/tests/mini_Test.html.ref +++ /dev/null @@ -1,269 +0,0 @@ - -Test

      Test

      Type declarations -

      Data types -

      data T a b

      data T2 a b

      data T3 a b

      data T4 a b

      data T5 a b

      data T6

      data N1 a

      data N2 a b

      data N3 a b

      data N4 a b

      data N5 a b

      data N6 a b

      data N7 a b

      Records -

      data R

      data R1

      Class declarations -

      class C a

      class D a

      class E a

      class F a

      Function types -

      Auxiliary stuff -

      A hidden module -

      A visible module -

      Existential / Universal types -

      data Ex a

      Type signatures with argument docs -

      A section -

      A subsection -

      diff --git a/tests/html-tests/tests/mini_Ticket112.html.ref b/tests/html-tests/tests/mini_Ticket112.html.ref deleted file mode 100644 index 68a0a5e5..00000000 --- a/tests/html-tests/tests/mini_Ticket112.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Ticket112

      Ticket112

      diff --git a/tests/html-tests/tests/mini_Ticket61.html.ref b/tests/html-tests/tests/mini_Ticket61.html.ref deleted file mode 100644 index a73fefca..00000000 --- a/tests/html-tests/tests/mini_Ticket61.html.ref +++ /dev/null @@ -1,33 +0,0 @@ - -Ticket61

      Ticket61

      class C a

      diff --git a/tests/html-tests/tests/mini_Ticket75.html.ref b/tests/html-tests/tests/mini_Ticket75.html.ref deleted file mode 100644 index 75ce882c..00000000 --- a/tests/html-tests/tests/mini_Ticket75.html.ref +++ /dev/null @@ -1,39 +0,0 @@ - -Ticket75

      Ticket75

      data a :- b

      diff --git a/tests/html-tests/tests/mini_TypeFamilies.html.ref b/tests/html-tests/tests/mini_TypeFamilies.html.ref deleted file mode 100644 index 0cf39c88..00000000 --- a/tests/html-tests/tests/mini_TypeFamilies.html.ref +++ /dev/null @@ -1,55 +0,0 @@ - -TypeFamilies

      TypeFamilies

      type family G a :: *

      class A a

      type family F a

      diff --git a/tests/html-tests/tests/mini_TypeOperators.html.ref b/tests/html-tests/tests/mini_TypeOperators.html.ref deleted file mode 100644 index 86b6beec..00000000 --- a/tests/html-tests/tests/mini_TypeOperators.html.ref +++ /dev/null @@ -1,66 +0,0 @@ - -TypeOperators

      TypeOperators

      stuff -

      data a :-: b

      data (a :+: b) c

      data Op a b

      data O g f a

      diff --git a/tests/html-tests/tests/mini_Unicode.html.ref b/tests/html-tests/tests/mini_Unicode.html.ref deleted file mode 100644 index 55336980..00000000 --- a/tests/html-tests/tests/mini_Unicode.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Unicode

      Unicode

      diff --git a/tests/html-tests/tests/mini_Visible.html.ref b/tests/html-tests/tests/mini_Visible.html.ref deleted file mode 100644 index 976a30c5..00000000 --- a/tests/html-tests/tests/mini_Visible.html.ref +++ /dev/null @@ -1,31 +0,0 @@ - -Visible

      Visible

      -- cgit v1.2.3