haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 242 forks source link

Port HTML backend to Lucid #1598

Closed AriFordsham closed 1 year ago

AriFordsham commented 1 year ago

Haddock generates HTML using xhtml, which is both unmaintained and slow.

This ports to Lucid, which is a maintained, performance-oriented replacement.

Lucid (transitively) contains one out-of-boot dependency, blaze-markup, but will allow removal of xhtml from boot (assuming Haddock is the only user of boot xhtml?). This increases the total number of boot libraries by one, but allows removing an unmaintained one.

I assume there's some process to go through to get the change in boot libraries to happen.

According to the test suite it seems to be correct, but may be missing further testing, and has not been benchmarked.

Still to be done:

AriFordsham commented 1 year ago

There are definitely bugs to iron out; here is the diff between old and new outputs, after running through prettier:

Diff ``` diff old/Bold.html new/Bold.html 62c62,63 <
  • Bold in a list
  • --- > Bold > in a list diff old/Bug1004.html new/Bug1004.html 106,108c106 < < < --- > 177,179c175 < < < --- > 218,220c214 < < < --- > 273,275c267 < < < --- > 297c289 < foldMap' :: --- > foldMap' :: 309,311c301,304 < foldr' :: (a -> b -> b) -> b < -> Product f g a < -> b # --- > foldr' :: (a -> b -> b) > -> b -> > Product f g a -> b > # 319,321c312,315 < foldl' :: (b -> a -> b) -> b < -> Product f g a < -> b # --- > foldl' :: (b -> a -> b) > -> b -> > Product f g a -> b > # 405,407c399 < < < --- > 447,449c439 < < < --- > 490,492c480 < < < --- > 599,601c587 < < < --- > 664,666c650 < < < --- > 732,734c716 < < < --- > 788,790c770 < < < --- > 855,857c835 < < < --- > 901,903c879 < < < --- > 954,956c930 < < < --- > 1004,1006c978 < < < --- > 1093,1094c1065,1066 < gmapQl :: (r -> r' -> r) -> r < -> (forall d. --- > gmapQl :: (r -> r' -> r) > -> r -> (forall d. 1096,1097c1068,1070 < r') -> Product f g < a -> r # --- > r') -> > Product f g a -> r > # 1101,1102c1074,1075 < forall r r'. (r' -> r < -> r) -> r -> ( forall r r'. (r' > -> r -> r) -> r -> ( -> r') -> 1181,1183c1154 < < < --- > 1236,1238c1207 < < < --- > 1287,1289c1256 < < < --- > 1356,1358c1323 < < < --- > 1423,1425c1388 < < < --- > 1479,1481c1442 < < < --- > 1527,1529c1488 < < < --- > 1610,1612c1569 < < < --- > 1626c1583 < D1 (' D1 ('False) (C1 (' "base" ' >False >) (C1 (' "Pair" 'False) ( 'False) (MetaSel ('Nothing < :: Maybe < Symbol) ' ('MetaSel > ('Nothing :: > Maybe > Symbol) 'NoSourceStrictness < 'DecidedLazy) (Rec1 ' >NoSourceStrictness:*: < S1 (' 'DecidedLazy) > (Rec1 f) > :*: > S1 ('Nothing :: --- > ('Nothing :: 1671c1625 < Symbol) ' Symbol) 'NoSourceStrictness < 'DecidedLazy) (Rec1 ' >NoSourceStrictness 'DecidedLazy) > (Rec1 g))) 1706,1708c1658 < < < --- > 1721c1671,1672 < f g a) = D1 (' f g a) = > D1 ('False) (C1 (' "base" ' >False >) (C1 (' "Pair" 'False) ( 'False) (MetaSel ('Nothing < :: Maybe < Symbol) ' ('MetaSel > ('Nothing :: > Maybe > Symbol) 'NoSourceStrictness < 'DecidedLazy) (Rec0 ' >NoSourceStrictness:*: < S1 (' 'DecidedLazy) > (Rec0 (f a)) > :*: > S1 ('Nothing :: --- > ('Nothing :: 1766c1714 < Symbol) ' Symbol) 'NoSourceStrictness < 'DecidedLazy) (Rec0 ' >NoSourceStrictness 'DecidedLazy) > (Rec0 (g a)))) diff old/Bug1033.html new/Bug1033.html 83,85c83 < < < --- > 136,138c134 < < < --- > 148c144 < D1 (' D1 ('False) (C1 (' "Foo" "Bug1033" "main" > 'False) (MetaCons >C1 ('MetaCons > "Foo" 'False) ( 'False) (

    Header with foo link

    >

    Header with foo link

    < < --- > diff old/Bug1103.html new/Bug1103.html 78,80c78 < < < --- > 113,115c111 < < < --- > 168,170c164 < < < --- > 198,200c192 < < < --- > 233,235c225 < < < --- > 268,270c258 < < < --- > 318,320c306 < < < --- > 348,350c334 < < < --- > 379,381c363 < < < --- > 409,411c391 < < < --- > 444,446c424 < < < --- > diff old/Bug195.html new/Bug195.html 57,59c57 < < < --- > 65,66c63,66 < >someField :: < () >someField :: () >
    >

    Doc for someField of A

    >

    Doc for someField of A

    75c74,77 < :: () :: () >
    >

    Doc for someOtherField of A

    >
    <

    Doc for someOtherField of A

    <
    88,90c87 < < < --- > 96,97c93,96 < >someField :: < () >someField :: () >
    >

    Doc for someField of A

    >

    Doc for someField of A

    106c104,107 < :: () :: () >
    >

    Doc for someOtherField of A

    >
    <

    Doc for someOtherField of A

    < 119,121c117 < < < --- > 127,128c123,126 < >someField :: < () >someField :: () >
    >

    Doc for someField of A

    >

    Doc for someField of A

    137c134,137 < :: () :: () >
    >

    Doc for someOtherField of A

    >
    <

    Doc for someOtherField of A

    < diff old/Bug201.html new/Bug201.html 85c85 < because there's a space before closing @ --- > because there's a space before closing @ diff old/Bug253.html new/Bug253.html 57,60c57,60 < This module tests that if we're trying to link to a < qualified identifier that's not in scope, we get an anchor < as if it was a variable. Previous behaviour was to treat it as a < type constructor so issue like #253 arose. Also see --- > This module tests that if we're trying to link to a > qualified identifier that's not in scope, we get an > anchor as if it was a variable. Previous behaviour was to treat it > as a type constructor so issue like #253 arose. Also see diff old/Bug26.html new/Bug26.html 47c47 <

    This module tests the ‘@since …’ annotation.

    --- >

    This module tests the ‘@since …’ annotation.

    131,133c131 < < < --- > diff old/Bug294.html new/Bug294.html 75,77c75 < < < --- > 87c85,87 < ProblemCtor' --- > >ProblemCtor' > 107,109c107 < < < --- > 138c136 < problemField' :: DO --- > problemField' :: DO 180,182c178 < < < --- > 232,234c228 < < < --- > 244c238,240 < ProblemCtor' --- > >ProblemCtor' > 257c253 < TO' t :: * --- > TO' t :: * 278c274 < TO' a TO' a < < --- > 293c287 < TO' a = --- > TO' a = diff old/Bug298.html new/Bug298.html 57,59c57 <
  • < (⋆^) :: a -> a -> a <
  • --- >
  • (⋆^) :: a -> a -> a
  • 86c84 < (⋆^) :: a -> a -> a --- > (⋆^) :: a -> a -> a 100c98 < ⋆^ ⋆^ < ExF: < --- >

    ExF:

    79,84c74 <

    < ExG: <

    --- >

    ExG:

    87,94c77,80 <
    >>> a
    < b
    ---
    >               
                     class="screen"
    >               >>>> a
    > b
    96,103c82,85
    <               
    >>> c
    < d
    ---
    >               
                     class="screen"
    >               >>>> c
    > d
    diff old/Bug4.html new/Bug4.html
    63c63
    <             

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

    --- >

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

    diff old/Bug458.html new/Bug458.html 49c49 < (⊆) :: () -> () -> () --- > (⊆) :: () -> () -> () 58c58 < (⊆) :: () -> () -> () --- > (⊆) :: () -> () -> () 65c65 < > >⊆ < < --- > 146,148c144 < < < --- > 183,185c179 < < < --- > 194c188 < X = '[ X = '['-'. '-' or ']' can be < matched by including them as the first character(s) in the list. < Never matches path separators: [/] matches nothing < at all. Named character classes can also be matched: < [:x:] within [] specifies the class < named x, which matches certain predefined < characters. See below for a full list. --- > '-'. '-' or > ']' can be matched by including them as the > first character(s) in the list. Never matches path separators: > [/] matches nothing at all. Named character classes > can also be matched: [:x:] within > [] specifies the class named x, which > matches certain predefined characters. See below for a full > list. diff old/Bug548.html new/Bug548.html 63,65c63 < < < --- > 72c70,71 < a b c a b c >
     
      109,111c107 < < < --- > 176,178c172 < < < --- > 229,231c223 < < < --- > 296,298c288 < < < --- > 338,340c328 < < < --- > 407,409c395 < < < --- > 424c410 <
    D1 (' D1 ('True) (C1 (' "base" ' >True >) (C1 (' "WrapArrow" ' href="#" > title="GHC.Generics" 439c428 < 'True) ( 'True) (MetaSel ('Just < "unwrapArrow") ' ('MetaSel > ('Just > "unwrapArrow") 'NoSourceStrictness < 'DecidedLazy) (Rec1 ' >NoSourceStrictness 'DecidedLazy) > (Rec1 (a b)))) 484,486c468 < < < --- > 499c481,482 < a b c) = D1 (' a b c) = > D1 ('True) (C1 (' "base" ' >True >) (C1 (' "WrapArrow" ' href="#" > title="GHC.Generics" 514c500 < 'True) ( 'True) (MetaSel ('Just < "unwrapArrow") ' ('MetaSel > ('Just > "unwrapArrow") 'NoSourceStrictness < 'DecidedLazy) (Rec0 ' >NoSourceStrictness 'DecidedLazy) > (Rec0 (a b c)))) diff old/Bug6.html new/Bug6.html 120,121c120,121 < list (the field isn't documented separately since it is already < documented here) --- > list (the field isn't documented separately since it is > already documented here) 159,161c159 < < < --- > 168c166,167 < Int Int >
     
      175c173,174 < Int Int >
     
      193,194c191,192 < .. with only some of the fields exported (we can't handle this one < - how do we render the declaration?) --- > .. with only some of the fields exported (we can't handle this > one - how do we render the declaration?) diff old/Bug613.html new/Bug613.html 105,107c105 < < < --- > 142,144c140 < < < --- > 175c171 < This ensures that the renamer doesn't create a new conflict --- > This ensures that the renamer doesn't create a new conflict 216,218c212 < < < --- > diff old/Bug679.html new/Bug679.html 88,90c88 < < < --- > 153,155c151 < < < --- > diff old/Bug7.html new/Bug7.html 108,110c108 < < < --- > 154,156c152 < < < --- > diff old/Bug85.html new/Bug85.html 78c78 < Baz' :: --- > Baz' :: diff old/Bug923.html new/Bug923.html 54c54 < T (' T ('T (' T ('(,) a :: --- > ('(,) a :: 127,129c127 < < < --- > 139c137 < T (' T ('T (' a) -> T ('T (' T ('T (' a) -> T ('See 'case', 'of', '--' compared to 'Q.case', 'Q.of', 'Q.--'

    --- >

    > See 'case', 'of', '--' compared to > 'Q.case', 'Q.of', 'Q.--' >

    diff old/Bug953.html new/Bug953.html 50c50 <
    Foo' --- > Foo' 54c54 < Bar' --- > Bar' 68,73c68 <

    < Examples <

    --- >

    Examples

    83c78 < Foo' --- > Foo' 96,101c91 <

    < Examples <

    --- >

    Examples

    111c101 < Bar' --- > Bar' diff old/Bug973.html new/Bug973.html 54,56c54,60 < showRead' :: forall b < a. (Show a, < Read b) => a -> b --- > showRead' :: > forall b a. ( href="#" > title="Text.Show" > >Show > > a, Read b) => a -> b 95c99 < showRead' --- > showRead' diff old/BugExportHeadings.html new/BugExportHeadings.html 83c83 <

    Foo

    --- >

    Foo

    91c91 <

    Bar

    --- >

    Bar

    99c99 <

    Baz

    --- >

    Baz

    107c107 <

    One

    --- >

    One

    118c118 <

    Two

    --- >

    Two

    129c129 <

    Three

    --- >

    Three

    diff old/BundledPatterns.html new/BundledPatterns.html 100,109c100,108 <
  • Lists with their length encoded in their type
  • <
  • < Vector elements have an ASCENDING subscript < starting from 0 and ending at < length - < 1. <
  • --- > Lists with their length encoded in their type >Vec >tor elements have an > ASCENDING > subscript starting from 0 and ending at > >length - > 1 >. 139,161c138,144 <
    >>> 3:>4:>5:>Nil
    < <3,4,5>
    < >>> let x = 3:>4:>5:>Nil
    < >>> :t x
    < x :: Num a => Vec 3 a
    ---
    >                   
                         class="screen"
    >                   >>>> 3:>4:>5:>Nil
    > <3,4,5>
    > >>> let x = 3:>4:>5:>Nil
    > >>> :t x
    > x :: Num a => Vec 3 a
    164,186c147,153
    <                   
    >>> let f (x :> y :> _) = x + y
    < >>> :t f
    < f :: Num a => Vec ((n + 1) + 1) a -> a
    < >>> f (3:>4:>5:>6:>7:>Nil)
    < 7
    ---
    >                   
                         class="screen"
    >                   >>>> let f (x :> y :> _) = x + y
    > >>> :t f
    > f :: Num a => Vec ((n + 1) + 1) a -> a
    > >>> f (3:>4:>5:>6:>7:>Nil)
    > 7
    189,211c156,162
    <                   
    >>> let g (a :> b :> (_ :< y :< x)) = a + b +  x + y
    < >>> :t g
    < g :: Num a => Vec ((((n + 1) + 1) + 1) + 1) a -> a
    < >>> g (1:>2:>3:>4:>5:>Nil)
    < 12
    ---
    >                   
                         class="screen"
    >                   >>>> let g (a :> b :> (_ :< y :< x)) = a + b +  x + y
    > >>> :t g
    > g :: Num a => Vec ((((n + 1) + 1) + 1) + 1) a -> a
    > >>> g (1:>2:>3:>4:>5:>Nil)
    > 12
    229,230c180,184
    <               
  • Only has elements at the leaf of the tree
  • <
  • A tree of depth d has 2^d elements.
  • --- > Only has elements at the leaf of the treeA tree of depth > d > has > 2^d > elements. 244,266c198,204 <
    >>> LR 1
    < 1
    < >>> let x = LR 1
    < >>> :t x
    < x :: Num a => RTree 0 a
    ---
    >                   
                         class="screen"
    >                   >>>> LR 1
    > 1
    > >>> let x = LR 1
    > >>> :t x
    > x :: Num a => RTree 0 a
    269,291c207,213
    <                   
    >>> let f (LR a) (LR b) = a + b
    < >>> :t f
    < f :: Num a => RTree 0 a -> RTree 0 a -> a
    < >>> f (LR 1) (LR 2)
    < 3
    ---
    >                   
                         class="screen"
    >                   >>>> let f (LR a) (LR b) = a + b
    > >>> :t f
    > f :: Num a => RTree 0 a -> RTree 0 a -> a
    > >>> f (LR 1) (LR 2)
    > 3
    306,328c228,234
    <                   
    >>> BR (LR 1) (LR 2)
    < <1,2>
    < >>> let x = BR (LR 1) (LR 2)
    < >>> :t x
    < x :: Num a => RTree 1 a
    ---
    >                   
                         class="screen"
    >                   >>>> BR (LR 1) (LR 2)
    > <1,2>
    > >>> let x = BR (LR 1) (LR 2)
    > >>> :t x
    > x :: Num a => RTree 1 a
    331,353c237,243
    <                   
    >>> let f (BR (LR a) (LR b)) = LR (a + b)
    < >>> :t f
    < f :: Num a => RTree 1 a -> RTree 0 a
    < >>> f (BR (LR 1) (LR 2))
    < 3
    ---
    >                   
                         class="screen"
    >                   >>>> let f (BR (LR a) (LR b)) = LR (a + b)
    > >>> :t f
    > f :: Num a => RTree 1 a -> RTree 0 a
    > >>> f (BR (LR 1) (LR 2))
    > 3
    diff old/BundledPatterns2.html new/BundledPatterns2.html
    100,109c100,108
    <               
  • Lists with their length encoded in their type
  • <
  • < Vector elements have an ASCENDING subscript < starting from 0 and ending at < length - < 1. <
  • --- > Lists with their length encoded in their type >Vec >tor elements have an > ASCENDING > subscript starting from 0 and ending at > >length - > 1 >. 127,149c126,132 <
    >>> 3:>4:>5:>Nil
    < <3,4,5>
    < >>> let x = 3:>4:>5:>Nil
    < >>> :t x
    < x :: Num a => Vec 3 a
    ---
    >                   
                         class="screen"
    >                   >>>> 3:>4:>5:>Nil
    > <3,4,5>
    > >>> let x = 3:>4:>5:>Nil
    > >>> :t x
    > x :: Num a => Vec 3 a
    152,174c135,141
    <                   
    >>> let f (x :> y :> _) = x + y
    < >>> :t f
    < f :: Num a => Vec ((n + 1) + 1) a -> a
    < >>> f (3:>4:>5:>6:>7:>Nil)
    < 7
    ---
    >                   
                         class="screen"
    >                   >>>> let f (x :> y :> _) = x + y
    > >>> :t f
    > f :: Num a => Vec ((n + 1) + 1) a -> a
    > >>> f (3:>4:>5:>6:>7:>Nil)
    > 7
    177,199c144,150
    <                   
    >>> let g (a :> b :> (_ :< y :< x)) = a + b +  x + y
    < >>> :t g
    < g :: Num a => Vec ((((n + 1) + 1) + 1) + 1) a -> a
    < >>> g (1:>2:>3:>4:>5:>Nil)
    < 12
    ---
    >                   
                         class="screen"
    >                   >>>> let g (a :> b :> (_ :< y :< x)) = a + b +  x + y
    > >>> :t g
    > g :: Num a => Vec ((((n + 1) + 1) + 1) + 1) a -> a
    > >>> g (1:>2:>3:>4:>5:>Nil)
    > 12
    225,226c176,180
    <               
  • Only has elements at the leaf of the tree
  • <
  • A tree of depth d has 2^d elements.
  • --- > Only has elements at the leaf of the treeA tree of depth > d > has > 2^d > elements. 240,262c194,200 <
    >>> LR 1
    < 1
    < >>> let x = LR 1
    < >>> :t x
    < x :: Num a => RTree 0 a
    ---
    >                   
                         class="screen"
    >                   >>>> LR 1
    > 1
    > >>> let x = LR 1
    > >>> :t x
    > x :: Num a => RTree 0 a
    265,287c203,209
    <                   
    >>> let f (LR a) (LR b) = a + b
    < >>> :t f
    < f :: Num a => RTree 0 a -> RTree 0 a -> a
    < >>> f (LR 1) (LR 2)
    < 3
    ---
    >                   
                         class="screen"
    >                   >>>> let f (LR a) (LR b) = a + b
    > >>> :t f
    > f :: Num a => RTree 0 a -> RTree 0 a -> a
    > >>> f (LR 1) (LR 2)
    > 3
    302,324c224,230
    <                   
    >>> BR (LR 1) (LR 2)
    < <1,2>
    < >>> let x = BR (LR 1) (LR 2)
    < >>> :t x
    < x :: Num a => RTree 1 a
    ---
    >                   
                         class="screen"
    >                   >>>> BR (LR 1) (LR 2)
    > <1,2>
    > >>> let x = BR (LR 1) (LR 2)
    > >>> :t x
    > x :: Num a => RTree 1 a
    327,349c233,239
    <                   
    >>> let f (BR (LR a) (LR b)) = LR (a + b)
    < >>> :t f
    < f :: Num a => RTree 1 a -> RTree 0 a
    < >>> f (BR (LR 1) (LR 2))
    < 3
    ---
    >                   
                         class="screen"
    >                   >>>> let f (BR (LR a) (LR b)) = LR (a + b)
    > >>> :t f
    > f :: Num a => RTree 1 a -> RTree 0 a
    > >>> f (BR (LR 1) (LR 2))
    > 3
    diff old/ConstructorArgs.html new/ConstructorArgs.html
    105c105,106
    <                   pattern Fo' ::
    ---
    >                   pattern
    >                   Fo' ::
    117c118
    <               pattern Bo' ::
    ---
    >               pattern Bo' ::
    139,141c140
    <               
    <               
    <                 
    ---
    >                 
    148c147,163
    <                           String                           String
    >                           
    >

    > doc on the > > >String > > > field of > > >Rec > > >

    >
    <

    < doc on the < String < field of < Rec <

    < 166c169,185 < String String >
    >

    > doc on the > > >String > > > field of > > >Rec > > >

    >
    <

    < doc on the < String < field of < Rec <

    < 206,208c213 < < < --- > 214c219,231 < >!Int >!Int >
    >

    > doc on the > Int > field of > > >Boa > > >

    >
    <

    < doc on the < Int < field of < Boa <

    < 229,242c236,253 < >!String <
    <

    < doc on the < String < field of < Boa <

    <
    --- > >!String >
    >

    > doc on the > > >String > > > field of > > >Boa > > >

    >
    > 269,271c280 < < < --- > 277c286,299 < >Int >Int >
    >

    > doc on the > Int > field of the > > >:* > > > constructor >

    >
    <

    < doc on the < Int < field of the < :* < constructor <

    < 293,307c304,322 < >String <
    <

    < doc on the < String < field of the < :* < constructor <

    <
    --- > >String >
    >

    > doc on the > > >String > > > field of the > > >:* > > > constructor >

    >
    > 338,340c353 < < < --- > 346c359,370 < >:: Int >:: Int >
    >

    > Int > field of > > >Foo > > >

    >
    <

    < Int < field of < Foo <

    < 360,372c375,391 < >-> String <
    <

    < String < field of < Foo <

    <
    --- > >-> String >
    >

    > > >String > > > field of > > >Foo > > >

    >
    > 376,386c395,406 < >-> < Boo <
    <

    < Make a < Boo <

    <
    --- > >-> Boo >
    >

    > Make a > > >Boo > > >

    >
    > 418,420c438 < < < --- > 426c444,450 < >:: Int >:: Int >
    >

    > an > Int >

    >
    <

    < an Int <

    < 436c455,465 < >-> String >-> String >
    >

    > a > > >String > > >

    >
    <

    < a < String <

    < 449,450c470,480 < >-> < Boo >-> Boo >
    >

    > a > > >Boo > > >

    >
    <

    < a < Boo <

    < 468c490 < Fo' :: --- > Fo' :: 527c549 < Bo' :: --- > Bo' :: diff old/DefaultSignatures.html new/DefaultSignatures.html 57c57 < baz' :: --- > baz' :: 104c104 < baz' :: --- > baz' :: 108c108 <

    Documentation for baz'.

    --- >

    Documentation for baz'.

    113c113 < baz' :: --- > baz' :: diff old/DeprecatedReExport.html new/DeprecatedReExport.html 58c58 <
  • Deprecation messages are shown for re-exported items.
  • --- > Deprecation messages are shown for re-exported items. 73c73 <

    Re-exported from an other module

    --- >

    Re-exported from an other module

    91c91 <

    Re-exported from an other package

    --- >

    Re-exported from an other package

    diff old/DeprecatedRecord.html new/DeprecatedRecord.html 80,82c80 < < < --- > 89c87,88 < String String >

    some name

    some name

    96c94,100 < Int Int >
    >
    >

    Deprecated: do not use this

    >
    >

    some value

    >
    <
    <

    Deprecated: do not use this

    <
    <

    some value

    < diff old/DuplicateRecordFields.html new/DuplicateRecordFields.html 60,62c60 < < < --- > 69c67,70 < Int Int >
    >

    The byte size of the first section.

    >
    <

    The byte size of the first section.

    < 77,78c75,78 < >headerCRC :: < Int >headerCRC :: Int >
    >

    The CRC of the first section.

    >
    <

    The CRC of the first section.

    < 86c83,84 < >header :: Int >header :: Int >

    The first section.

    The first section.

    93c90,93 < Int Int >
    >

    The byte size of the second section.

    >
    <

    The byte size of the second section.

    < 102c99,102 < Int Int >
    >

    The CRC of the second section.

    >
    <

    The CRC of the second section.

    < 110c107,108 < >content :: Int >content :: Int >

    The second section.

    The second section.

    116c113,121 < >footer :: Int >footer :: Int >
    >

    > Arbitrary data after the second section. In > replays generated by Rocket League, this is always > empty. However it is not technically invalid to > put something here. >

    >
    <

    < Arbitrary data after the second section. In replays < generated by Rocket League, this is always empty. < However it is not technically invalid to put < something here. <

    < diff old/Examples.html new/Examples.html 72,87c72,77 <
    >>> fib 5
    < 5
    < >>> fib 10
    < 55
    ---
    >             
                   class="screen"
    >             >>>> fib 5
    > 5
    > >>> fib 10
    > 55
    89,96c79,82
    <             
    >>> fib 10
    < 55
    ---
    >             
                   class="screen"
    >             >>>> fib 10
    > 55
    99,106c85,88
    <             
    >>> fib 5
    < 5
    ---
    >             
                   class="screen"
    >             >>>> fib 5
    > 5
    109,116c91,94
    <             
    >>> fib 5
    < 5
    ---
    >             
                   class="screen"
    >             >>>> fib 5
    > 5
    119,133c97,101
    <             
    >>> import Data.Char
    < >>> isSpace 'a'
    < False
    ---
    >             
                   class="screen"
    >             >>>> import Data.Char
    > >>> isSpace 'a'
    > False
    135,142c103,106
    <             
    >>> putStrLn "foo\n\nbar"
    < foo
    ---
    >             
                   class="screen"
    >             >>>> putStrLn "foo\n\nbar"
    > foo
    diff old/FunArgs.html new/FunArgs.html
    151c151
    <                   ~ '                   ~ '
    <               
    <                 
    ---
    >                 
    115c113,114
    <                           Int                           Int
    >                           

    hello docs

    hello docs

    124c122,123 < Int Int >
     
      135,137c133 < < < --- > 143,144c139,140 < >:: { field2 :: < a >:: { field2 :: a >

    hello2 docs

    hello2 docs

    152c147,148 < Int a Int a >
     
      diff old/GadtConstructorArgs.html new/GadtConstructorArgs.html 58,60c58 < < < --- > 67c65,75 < Int Int >
    >

    > an > > >x > > >

    >
    <

    < an < x <

    < 83c81,91 < Int Int >
    >

    > a > > >y > > >

    >
    <

    < a < y <

    < 99c97,98 < Boo Boo >
     
      110,112c108 < < < --- > 119c115,125 < Int Int >
    >

    > a > > >w > > >

    >
    <

    < a < w <

    < 135c131,141 < Int Int >
    >

    > a > > >z > > >

    >
    <

    < a < z <

    < 151c147,157 < Boo Boo >
    >

    > a > > >Boo > > >

    >
    <

    < a < Boo <

    < diff old/Hash.html new/Hash.html 116,117c116,117 <

    The HashTable type

    >

    The HashTable type

    Operations on HashTables

    >

    Operations on HashTables

    The Hash class

    >

    The Hash class

    < < --- > 269,271c267 < < < --- > 303,305c299 < < < --- > diff old/HiddenInstances.html new/HiddenInstances.html 89,91c89 < < < --- > 113,115c111 < < < --- > 158,160c154 < < < --- > 239,241c233 < < < --- > diff old/HiddenInstancesB.html new/HiddenInstancesB.html 89,91c89 < < < --- > 133,135c131 < < < --- > diff old/Identifiers.html new/Identifiers.html 100,182c100,173 <
  • <

    Unadorned:

    < <
  • <
  • <

    Parenthesized:

    <
      <
    • < Unqualified: < (++) < [1,2,3] [4,5,6] <
    • <
    • < Qualified: < (++) < [1,2,3] [4,5,6] <
    • <
    • < Namespaced: < (++), ++, < (:*), (:*) <
    • <
    <
  • <
  • <

    Backticked:

    <
      <
    • < Unqualified: < 1 < `elem` < [-3..3] <
    • <
    • < Qualified: < 1 < `elem` < [-3..3] <
    • <
    • < Namespaced: < `elem`, `elem`, < `Id`, `Id` <
    • <
    <
  • <
  • <

    Edge cases:

    <
      <
    • Tuples: (), (,,,)
    • <
    <
  • --- >

    Unadorned:

    >
      > Unqualified: > ++ >, > elem >Qualified: > ++ >, > elem >Namespaced: > ++ >, > ++ >, > elem >, > elem >, > Id >, > Id >, > :* >, > :* >
    >

    Parenthesized:

    >
      > Unqualified: > >(++) [1,2,3] > [4,5,6] >Qualified: > >(++) [1,2,3] > [4,5,6] >Namespaced: > (++) >, > ++ >, > (:*) >, > (:*) >
    >

    Backticked:

    >
      > Unqualified: > >1 > `elem` > [-3..3] >Qualified: > >1 > `elem` > [-3..3] >Namespaced: > `elem` >, > `elem` >, > `Id` >, > `Id` >
    >

    Edge cases:

    >
      > Tuples: > () >, > (,,,) >
    diff old/Instances.html new/Instances.html 90,92c90 < < < --- > 108c106 < foo' :: (a --- > foo' :: (a 144c142 < foo' :: f (f a) -> --- > foo' :: f (f a) -> 173,175c171 < < < --- > 191c187 < foo' :: --- > foo' :: 223,225c219 < < < --- > 240c234 < foo' :: [[a]] -> --- > foo' :: [[a]] -> 268,270c262 < < < --- > 286c278 < foo' :: --- > foo' :: 322,324c314 < < < --- > 340c330 < foo' :: (a --- > foo' :: (a 372,374c362 < < < --- > 388c376 < foo' :: (f a, (f a, a0)) -> --- > foo' :: (f a, (f a, a0)) -> 414,416c402 < < < --- > 432c418 < foo' :: --- > foo' :: 469,471c455 < < < --- > 485c469 < foo' :: (a, a, (a, a, a0)) -> --- > foo' :: (a, a, (a, a, a0)) -> 506,508c490 < < < --- > 522,524c504,506 < foo' :: (a -> (a -> a0)) -> < Int -> a -> (a < -> Int) --- > foo' :: (a -> (a -> a0)) > -> Int -> a > -> (a -> Int) 555,556c537,538 < bar' :: f (f a) -> f (f (f < b)) # --- > bar' :: f (f a) -> f (f > (f b)) # 591,593c573 < < < --- > 611c591 < bar' :: --- > bar' :: 675,677c655 < < < --- > 693c671 < bar' :: --- > bar' :: 747,749c725 < < < --- > 765c741 < bar' :: [[(a, a)]] -> [[[b]]] --- > bar' :: [[(a, a)]] -> [[[b]]] 798,800c774 < < < --- > 816c790 < bar' :: --- > bar' :: 878,880c852 < < < --- > 901c873 < bar' :: --- > bar' :: 970,972c942 < < < --- > 986c956 < bar' :: (a, b, (a, b, (a, b, a))) --- > bar' :: (a, b, (a, b, (a, b, a))) 1030c1000 < baz' :: b -> ( baz' :: b -> (baz'' :: b -> ( baz'' :: b -> > (forall b. (forall b. b -> a) -> c) < -> forall c. c -> b --- > b. b -> a) -> c) -> > forall c. c -> b 1069,1071c1039 < < < --- > 1089c1057,1058 < baz' :: b -> ( baz' :: b -> ( class="keyword" 1099c1068 < baz'' :: b -> ( baz'' :: b -> ( < < --- > 1145c1112 < baz' :: b0 -> ( baz' :: b0 -> (baz'' :: b0 -> ( baz'' :: b0 -> ( < < --- > 1205c1170 < baz' :: b0 -> ( baz' :: b0 -> (baz'' :: b0 -> ( baz'' :: b0 -> ( < < --- > 1262c1225 < baz' :: b0 -> ( baz' :: b0 -> (baz'' :: b0 -> ( baz'' :: b0 -> ( < < --- > 1319c1280 < baz' :: b0 -> ( baz' :: b0 -> (baz'' :: b0 -> ( baz'' :: b0 -> ( < < --- > 1416c1375 < foo' :: --- > foo' :: 1453,1455c1412 < < < --- > 1476c1433 < bar' :: --- > bar' :: 1540,1542c1497 < < < --- > 1559c1514 < baz' :: b0 -> ( baz' :: b0 -> (baz'' :: b0 -> ( baz'' :: b0 -> ( < < --- > 1693,1695c1646 < < < --- > 1748,1750c1699 < < < --- > diff old/NamespacedIdentifiers.html new/NamespacedIdentifiers.html 77,104c77,94 <
  • < the type < Bar <
  • <
  • < the constructor < Bar <
  • <
  • < the unimported but qualified type < A <
  • <
  • < the unimported but qualified value < A <
  • --- > the type > > href="NamespacedIdentifiers.html#t:Bar" > title="NamespacedIdentifiers" > >Bar > >the constructor > > href="NamespacedIdentifiers.html#v:Bar" > title="NamespacedIdentifiers" > >Bar > >the unimported but qualified type > A >the unimported but qualified value > A 123c113,115 <

    A link to the value Foo (which shouldn't exist).

    --- >

    > A link to the value Foo (which shouldn't exist). >

    diff old/Nesting.html new/Nesting.html 68,79c68,75 <
  • <

    We can

    <
      <
    • <

      easily go back

      <
        <
      1. some indentation
      2. <
      <
    • <
    • levels
    • <
    <
  • --- >

    We can

    >
      >

      easily go back

      >
        >
      1. some indentation
      2. >
      > levels >
    93,102c89,94 <
  • <

    Beginning of list

    <
      <
    • second list
    • <
    <
  • <
  • < Some indented list but the presence of this text pushes it out < of nesting back to the top. <
  • --- >

    Beginning of list

    >
      > second list >
    > Some indented list but the presence of this text pushes it out of > nesting back to the top. 113,115c105,106 <
  • <

    Beginning of list

    <
    ---
    >               

    Beginning of list

    >
    119,120c110
    <                 >
    <               
  • --- > > 131,136c121,124 <
  • <

    Beginning of list

    <
      <
    • Nested list
    • <
    <
  • --- >

    Beginning of list

    >
      > Nested list >
    147,149c135,136 <
  • <

    Beginning of list

    <
    ---
    >               

    Beginning of list

    >
    153,154c140
    <                 >
    <               
  • --- > > 165,167c151,152 <
  • <

    Beginning of list This belongs to the list above!

    <
    ---
    >               

    Beginning of list This belongs to the list above!

    >
    174,175c159,160
    <                 >
    <                 
    ---
    >               >
    >               
    178,181c163,169
    <                 >
    <                 
      <
    • <

      Next list More of the indented list.

      --- > > >
        >

        Next list More of the indented list.

        >
          >

          Deeper

          >
            >

            Deeper

            183,196c171 <
          • <

            Deeper

            <
              <
            • <

              Deeper

              <
                <
              • Even deeper!
              • <
              • < No newline separation even in indented lists. <
              • <
              <
            • <
            <
          • --- > Even deeper!No newline separation even in indented lists. 198c173 < --- >
          200c175 < --- >
        220,236c195,206 <
      • <

        Next list with more of the indented list content.

        <

        Even more content on a new line.

        <
          <
        1. <

          Different type of list

          <
            <
          1. Deeper
          2. <
          <
          >>> Here's an example in a list
          < example result
          ---
          >                   

          Next list with more of the indented list content.

          >

          Even more content on a new line.

          >
            >
          1. >

            Different type of list

            >
              >
            1. Deeper
            2. >
            >
                                     class="screen"
            >                       >>>> Here's an example in a list
            > example result
            238,255c208,224
            <                         
            <
            b
            <
            Even deeper!
            <
            c
            <
            < No newline separation even in indented lists. We can < have any paragraph level element that we normally < can, like headers <
            <
            <

            Level 3 header

            <

            with some content…

            <
              <
            • and even more lists inside
            • <
            <
          2. <
          <
        2. --- >
          >
          b
          >
          Even deeper!
          >
          c
          >
          > No newline separation even in indented lists. We can > have any paragraph level element that we normally can, > like headers >
          >
          >

          Level 3 header

          >

          with some content…

          >
            > and even more lists inside >
          > >
        268,278c237,243 <
      • list may start at arbitrary depth
      • <
      • < and consecutive items at that depth belong to the same list <
      • <
      • <

        of course we can still

        <
          <
        • nest items like we are used to
        • <
        <
      • <
      • and then get back to initial list
      • --- > list may start at arbitrary depthand consecutive items at that > depth belong to the same list >

        of course we can still

        >
          > nest items like we are used to >
        > and then get back to initial list diff old/OrphanInstances.html new/OrphanInstances.html 69,71c69 < < < --- > diff old/OrphanInstancesClass.html new/OrphanInstancesClass.html 84,86c84 < < < --- > diff old/OrphanInstancesType.html new/OrphanInstancesType.html 87,89c87 < < < --- > diff old/PatternSyns.html new/PatternSyns.html 269,270c269,270 < Earlier ghc versions didn't allow explicit signatures on pattern < synonyms. --- > Earlier ghc versions didn't allow explicit signatures on > pattern synonyms. diff old/PromotedTypes.html new/PromotedTypes.html 82c82 < Pattern '[] --- > Pattern '[] 91c91 < Pattern (h ': t) --- > Pattern (h ': t) 143c143 < Tuple '(a, b) --- > Tuple '(a, b) diff old/PruneWithWarning.html new/PruneWithWarning.html 49,52c49,52 <
      • < If a binding has a deprecation message but no documentation, it is < pruned when OPTIONS_HADDOCK prune is used. <
      • --- > If a binding has a deprecation message but no documentation, it is > pruned when > OPTIONS_HADDOCK prune > is used. diff old/QuasiExpr.html new/QuasiExpr.html 110,112c110 < < < --- > 199,201c197 < < < --- > diff old/SectionLabels.html new/SectionLabels.html 63c63 <

        Section heading

        --- >

        Section heading

        diff old/SpuriousSuperclassConstraints.html new/SpuriousSuperclassConstraints.html 106,108c106 < < < --- > 206,208c204 < < < --- > diff old/Test.html new/Test.html 390c390 < f' :: Int --- > f' :: Int 400,401c400,401 <

        Type declarations

        Data types

        --- >

        Type declarations

        >

        Data types

        596,598c596 < < < --- > 604c602,603 < >n :: a b >n :: a b >
         
          630,632c628 < < < --- > 638c634,640 < >n3 :: a b >n3 :: a b >
        >

        > this is the > n3 field >

        >
        <

        < this is the < n3 field <

        < 662c658 < because the difference isn't visible to the programmer for an --- > because the difference isn't visible to the programmer for an 679,681c675 < < < --- > 687c681,684 < >n5 :: a b >n5 :: a b >
        >

        no docs on the datatype or the constructor

        >
        <

        no docs on the datatype or the constructor

        < 712,714c706 < < < --- > 720c712,713 < >n6 :: a b >n6 :: a b >
         
          748,750c740 < < < --- > 756c746,747 < >n7 :: a b >n7 :: a b >
         
          767c757 <

        Records

        --- >

        Records

        796,798c786 < < < --- > 805c793,799 < Int Int >
        >

        > This comment applies to the > p field >

        >
        <

        < This comment applies to the < p field <

        < 817c805,811 < forall a. a -> a forall a. a -> a >
        >

        > This comment applies to the > q field >

        >
        <

        < This comment applies to the < q field <

        < 830c818,825 < Int Int >
        >

        > This comment applies to both > r and > s >

        >
        <

        < This comment applies to both < r and < s <

        < 853,855c841 < < < --- > 871c857,858 < T5 () () T5 () () >
         
          879c865,866 < Int Int >
         
          910,912c896 < < < --- > 919c903,910 < Int Int >
        >

        > The > s1 > record selector >

        >
        <

        < The < s1 record < selector <

        < 932c916,923 < Int Int >
        >

        > The > s2 > record selector >

        >
        <

        < The < s2 record < selector <

        < 945c929,936 < Int Int >
        >

        > The > s3 > record selector >

        >
        <

        < The < s3 record < selector <

        < 1001c985 <

        Class declarations

        --- >

        Class declarations

        1085,1087c1069 < < < --- > 1123,1125c1105 < < < --- > 1198c1178 <

        Function types

        --- >

        Function types

        1214,1215c1194,1195 <
      • This is a bulleted list
      • <
      • This is the next item (different kind of bullet)
      • --- > This is a bulleted listThis is the next item (different kind of > bullet) 1229,1233c1209 <
             This is a block of code, which can include other markup: R
        ---
        >             
             This is a block of code, which can include other markup: R
        1254c1230
        <         

        Auxiliary stuff

        --- >

        Auxiliary stuff

        1341c1317 < each line must begin with > (which isn't significant unless it --- > each line must begin with > (which isn't significant unless it 1345c1321 <

        A hidden module

        --- >

        A hidden module

        1354c1330 <

        A visible module

        --- >

        A visible module

        1359c1335 <

        Existential / Universal types

        --- >

        Existential / Universal types

        1408c1384 <

        Type signatures with argument docs

        --- >

        Type signatures with argument docs

        1431c1407,1409 <

        This argument has type 'T2 Int Int'

        --- > >

        This argument has type 'T2 Int Int'

        > 1545,1546c1523,1524 <

        A section

        A subsection

        --- >

        A section

        >

        A subsection

        1553c1531 < f' :: --- > f' :: 1560,1561c1538,1539 < f' but f' doesn't get < link'd 'f'' --- > f' but f' > doesn't get link'd 'f'' diff old/Threaded.html new/Threaded.html 70c70 < $(forkTH) fails at compile time if haddock isn't --- > $(forkTH) fails at compile time if haddock isn't diff old/Threaded_TH.html new/Threaded_TH.html 48,49c48,49 < Imported by Threaded, since a TH splice can't be used < in the module where it is defined. --- > Imported by Threaded, since a TH splice can't be > used in the module where it is defined. diff old/TitledPicture.html new/TitledPicture.html 83c83 < --- > diff old/TypeFamilies.html new/TypeFamilies.html 158,160c158 < < < --- > 197,199c195 < < < --- > 215,216c211,212 < 'XX < >< ' 'XX > >< ' < < --- > 250,252c244 < < < --- > 281,283c273 < < < --- > 312,314c302 < < < --- > 345,347c333 < < < --- > 395,397c381 < < < --- > 419c403 < type ' type '<> ' <> ' < < --- > 442c424 < type ' type '<> ' <> ' Bat 'Bat ' Bat ' < < --- > 902,904c862 < < < --- > 948,950c906 < < < --- > 979,981c935 < < < --- > 1031,1033c985 < < < --- > 1048c1000 < Bat ' Bat 'Bat ' Bat ' < < --- > 1131,1133c1081 < < < --- > 1198,1200c1146 < < < --- > 1237,1239c1183 < < < --- > 1319c1263 < type ' type '<> ' <> ' < < --- > 1342c1284 < type ' type '<> ' <> 'XX < >< ' 'XX > >< ' < < --- > diff old/TypeFamilies2.html new/TypeFamilies2.html 97,99c97 < < < --- > 130,132c128 < < < --- > 181,183c177 < < < --- > 214,216c208 < < < --- > 265,267c257 < < < --- > 300,302c290 < < < --- > diff old/TypeFamilies3.html new/TypeFamilies3.html 120,122c120 < < < --- > 150,152c148 < < < --- > 200,202c196 < < < --- > 230,232c224 < < < --- > 262,264c254 < < < --- > diff old/TypeOperators.html new/TypeOperators.html 77,79c77 < < < --- > 85c83,84 < >unO :: g (f a) >unO :: g (f a) >
         
          diff old/UnboxedStuff.html new/UnboxedStuff.html 107c107 <

        Unboxed type constructors

        --- >

        Unboxed type constructors

        diff old/Unicode.html new/Unicode.html 62c62 <

        γλώσσα

        --- >

        γλώσσα

        diff old/Unicode2.html new/Unicode2.html 48c48 <
      • ü :: ()
      • --- >
      • ü :: ()
      • 56c56 < ü :: () --- > ü :: () 60c60 <

        All of the following work with a unicode character ü:

        --- >

        All of the following work with a unicode character ü:

        62,64c62,66 <
      • an italicized ü
      • <
      • inline code ü
      • <
      • a code block:
      • --- > an italicized > ü >inline code > ü >a code block: 66c68 <
        ü
        --- >
        ü
        68,73c70,73 <
      • < a url https://www.google.com/search?q=ü <
      • <
      • < a link to ü <
      • --- > a url > https://www.google.com/search?q=ü >a link to > ü ```

        This output is generated by the script ./goldens.sh and an up-to-date output saved to ./goldens.diff, currently part of the PR.

        AriFordsham commented 1 year ago

        As far as I can see, the output now of the golden tests now matches the originals.

        AriFordsham commented 1 year ago

        Didn't realise @parsonsmatt was already on to this: https://github.com/haskell/haddock/pull/1561. Should this be closed?

        Bodigrim commented 1 year ago

        @AriFordsham I'm not sure whether this repo accepts contributions (@Kleidukos?). You might get more engagement from submitting your patch at https://gitlab.haskell.org/ghc/haddock.

        FinleyMcIlwaine commented 1 year ago

        @AriFordsham I don't think this patch is worth pursuing further, for the time being. Adding lucid as a boot library, and transitively blaze-markup, would require a disproportionate amount of maintenance overhead for the potential improvements (based on those reported in the existing patch). A simpler and more incremental win appears to be optimizing xhtml directly, and I think that's the way to go for now.

        Kleidukos commented 1 year ago

        I'd like to approach this again after GHC 9.8 is release, which will mark the return of Haddock in the GHC tree. Indeed while the question of dependencies is critical, lucid2 is dropping the non-boot dependency on blaze-builder https://github.com/chrisdone/lucid/issues/143.

        This will allow us to add lucid2 as a dependency and remove xhtml from GHC's boot dependencies.

        Kleidukos commented 1 year ago

        @AriFordsham Thanks for starting this btw, I'm closing this PR but the effort will continue on the Haskell GitLab once Haddock moves there. :)

        Bodigrim commented 1 year ago

        @Kleidukos if this mirror does not accept contributions, could you possibly mark it as archived and provide a redirection in description? It already fooled too many people.

        AriFordsham commented 1 month ago

        @Kleidukos bumping this PR, as Haddock is now in GHC and Lucid's blaze-builder dependency is gone. I unfortunately don't have the time for this anymore, but I wanted to bring it back to your attention.