Ticket #171 (assigned defect)

Opened 3 years ago

Last modified 7 months ago

haddock fails to parse {- # ... #-} (note the space) pragma

Reported by: slyfox Owned by: Fūzetsu
Priority: minor Milestone:
Version: Keywords:
Cc:

Description

The problem was found on xmonad-0.9.2 haddock failure.

Minimal complete test looks as such:

$ haddock Fail.hs 

Fail.hs:1:3: parse error on input `#'
$ cat Fail.hs
{- # OPTIONS_GHC -fglasgow-exts    #-}

module Fail where

Reproducible with haddock-2.7.2 and 2.9.2.

Change History

follow-up: ↓ 2   Changed 3 years ago by isaacdupree

So:

That's not a pragma, according to Haskell standard (IIRC); it's a comment.

Next, Haddock looks at it as a comment, as it looks at all comments, to determine whether it is Haddockumentation.

Comments -- # or {- # denoted a Haddock-pragma in Haddock 0.x (rather as -- | and {- | denote Haddock-comments still). Could that be related?

in reply to: ↑ 1   Changed 3 years ago by waern

Comments -- # or {- # denoted a Haddock-pragma in Haddock 0.x (rather as -- | and {- | denote Haddock-comments still). Could that be related?

Yes, I think that's it. We still support that form, but we should probably just get rid of it.

  Changed 3 years ago by slyfox

  • version changed from 2.9.1 to 2.9.2
  • milestone changed from 2.7.0 to 2.9.0

  Changed 19 months ago by anonymous

  • milestone 2.9.0 deleted

Milestone 2.9.0 deleted

  Changed 7 months ago by Fūzetsu

  • owner set to Fūzetsu
  • status changed from new to assigned
  • version 2.9.2 deleted

I'm going to see whether we can get rid of the -- # form all together before 7.8. It hasn't been documented for ages and the bug is just remains of 0.x to begin with (although still present).

  Changed 7 months ago by Fūzetsu

  • priority changed from major to minor
Note: See TracTickets for help on using tickets.