Ticket #184 (closed defect: fixed)

Opened 3 years ago

Last modified 22 months ago

Internal failure w/ bad error message for section heading inside class

Reported by: rrnewton Owned by:
Priority: major Milestone:
Version: 2.9.2 Keywords:
Cc:

Description

After a refactoring I ended up with something like the following:

module FooM where class Foo d where

foo
d -- * Silly section
bar
d

Which trips what seems to be an incomplete pattern match in Create.hs:

haddock: internal error: unexpected argument to declNames

Unfortunately since this had no line number a binary search for the offending part of the file ensued ;-).

Change History

Changed 3 years ago by rrnewton

Oops, the formatting above came out wrong. This should be a block quote:

  module FooM where
  class Foo d where
     foo :: d
     -- * Silly section
     bar :: d

Changed 3 years ago by rrnewton

Update: A small patch here:

https://github.com/rrnewton/haddock/commit/8ae2b7df6749d37df93a4ba5d7e3a6a2e7002b1a

In the above case we're hitting the "DocD" HsDecl? constructor. I don't know this code, but it would seem that there's no way to get a "name" from a DocD so I returned the empty list for that case.

Changed 3 years ago by waern

  • status changed from new to closed
  • resolution set to fixed

Patch applied, thanks!

Changed 22 months ago by anonymous

  • milestone 2.10.0 deleted

Milestone 2.10.0 deleted

Note: See TracTickets for help on using tickets.