Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Ill-formed tables cause haddock to crash #1187

Open
@thufschmitt

Description

@thufschmitt

Some ill-formed tables in haddock markup cause haddock to crash with

Haddock coverage:
haddock: internal error: Data.Text.Internal.Fusion.Common.index: Index too large
CallStack (from HasCallStack):
  error, called at libraries/text/Data/Text/Internal/Fusion/Common.hs:943:24 in text-1.2.4.0:Data.Text.Internal.Fusion.Common

For example, the following file cause this crash:

module Test where

-- |
-- +-------+-----+
-- | a     | b   |
-- +=======+====+
foo :: Int
foo = 1

I can exhibit this with haddock 2.23.0 (ghc 8.8.3). haddock 2.22.0 (with ghc 8.6.5) doesn't crash but outputs garbage instead of the table

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions