Skip to content

ghc -haddock fails to parse doc comments in closed type families

GHC with -haddock fails to parse the following program:

{-# LANGUAGE TypeFamilies #-}
module Bug where

type family Closed a where
  -- |This comment fails to parse
  Closed Int = Bool
ghc -haddock Bug.hs
[1 of 1] Compiling Bug              ( Bug.hs, Bug.o )

Bug.hs:5:3: parse error on input ‘-- |This comment fails to parse’

(tested with 7.10.3 and an slightly out-of-date HEAD)

Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information